Skip to content

Commit

Permalink
Add libMM2 for Linux/Windows #696 (#697)
Browse files Browse the repository at this point in the history
* Add libMM2 for Linux/Windows

Adds the library version of MM2 into the Linux and Windows packages for Debug and Release

* Adds MM2 library in Darwin package

* Fix adding mm2 library in bad package
  • Loading branch information
DaemonSnake authored Jul 9, 2020
1 parent 8a284f0 commit bda7a24
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions azure-pipelines-release-stage-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ jobs:
displayName: 'Build MM2 Debug'
condition: eq( variables['DEBUG_UPLOADED'], '' )
- bash: |
zip upload/mm2-$(COMMIT_HASH)-$(Agent.OS)-Debug target-xenial/debug/mm2 -j
zip upload/mm2-$(COMMIT_HASH)-$(Agent.OS)-Debug target-xenial/debug/mm2 target-xenial/debug/libmm2.a -j
displayName: 'Prepare debug build upload Linux'
condition: and( eq( variables['Agent.OS'], 'Linux' ), eq( variables['DEBUG_UPLOADED'], '' ) )
- bash: |
cd target/debug
zip ../../upload/mm2-$(COMMIT_HASH)-$(Agent.OS)-Debug mm2.dSYM mm2 -r
zip ../../upload/mm2-$(COMMIT_HASH)-$(Agent.OS)-Debug mm2.dSYM mm2 libmm2.a -r
displayName: 'Prepare debug build upload MacOS'
condition: and( eq( variables['Agent.OS'], 'Darwin' ), eq( variables['DEBUG_UPLOADED'], '' ) )
- powershell: |
7z a .\upload\mm2-$(COMMIT_HASH)-$(Agent.OS)-Debug.zip .\target\debug\mm2.exe .\target\debug\*.dll "$Env:windir\system32\msvcr100.dll" "$Env:windir\system32\msvcp140.dll" "$Env:windir\system32\vcruntime140.dll"
7z a .\upload\mm2-$(COMMIT_HASH)-$(Agent.OS)-Debug.zip .\target\debug\mm2.exe .\target\debug\mm2.lib .\target\debug\*.dll "$Env:windir\system32\msvcr100.dll" "$Env:windir\system32\msvcp140.dll" "$Env:windir\system32\vcruntime140.dll"
displayName: 'Prepare debug build upload Windows'
condition: and( eq( variables['Agent.OS'], 'Windows_NT' ), eq( variables['DEBUG_UPLOADED'], '' ) )
- bash: |
Expand Down Expand Up @@ -106,14 +106,16 @@ jobs:
condition: eq( variables['RELEASE_UPLOADED'], '' )
- bash: |
objcopy --only-keep-debug target-xenial/release/mm2 target-xenial/release/mm2.debug
objcopy --only-keep-debug target-xenial/release/libmm2.a target-xenial/release/libmm2.debug.a
strip -g target-xenial/release/mm2
zip upload/mm2-$(COMMIT_HASH)-$(Agent.OS)-Release target-xenial/release/mm2 -j
zip upload/mm2-$(COMMIT_HASH)-$(Agent.OS)-Release-debuginfo.zip target-xenial/release/mm2.debug -j
strip -g target-xenial/release/libmm2.a
zip upload/mm2-$(COMMIT_HASH)-$(Agent.OS)-Release target-xenial/release/mm2 target-xenial/release/libmm2.a -j
zip upload/mm2-$(COMMIT_HASH)-$(Agent.OS)-Release-debuginfo.zip target-xenial/release/mm2.debug target-xenial/release/libmm2.debug.a -j
displayName: 'Prepare release build upload Linux'
condition: and( eq( variables['Agent.OS'], 'Linux' ), eq( variables['RELEASE_UPLOADED'], '' ) )
- bash: |
cd target/release
zip ../../upload/mm2-$(COMMIT_HASH)-$(Agent.OS)-Release.zip mm2
zip ../../upload/mm2-$(COMMIT_HASH)-$(Agent.OS)-Release.zip mm2 libmm2.a
zip ../../upload/mm2-$(COMMIT_HASH)-$(Agent.OS)-Release.dSYM.zip mm2.dSYM -r
displayName: 'Prepare release build upload MacOS'
condition: and( eq( variables['Agent.OS'], 'Darwin' ), eq( variables['RELEASE_UPLOADED'], '' ) )
Expand All @@ -128,7 +130,7 @@ jobs:
$(RELEASE_TAG)
Dockerfile: Dockerfile.release
- powershell: |
7z a .\upload\mm2-$(COMMIT_HASH)-$(Agent.OS)-Release.zip .\target\release\mm2.exe .\target\release\*.dll "$Env:windir\system32\msvcr100.dll" "$Env:windir\system32\msvcp140.dll" "$Env:windir\system32\vcruntime140.dll"
7z a .\upload\mm2-$(COMMIT_HASH)-$(Agent.OS)-Release.zip .\target\release\mm2.exe .\target\release\mm2.lib .\target\release\*.dll "$Env:windir\system32\msvcr100.dll" "$Env:windir\system32\msvcp140.dll" "$Env:windir\system32\vcruntime140.dll"
displayName: 'Prepare release build upload Windows'
condition: and( eq( variables['Agent.OS'], 'Windows_NT' ), eq( variables['RELEASE_UPLOADED'], '' ) )
- task: GitHubRelease@0
Expand Down

0 comments on commit bda7a24

Please sign in to comment.