deskflow/CI/MacOS/mac-build.yml
Jnewbon 448a787ab8
Migrated to Azure pipline for CI and builds
Also added Deb 10 to CI and builds
2020-07-08 13:17:06 +01:00

108 lines
4.1 KiB
YAML

steps:
- task: InstallAppleCertificate@2
inputs:
certSecureFile: 'AppleSigningCert.cer'
certPwd: '$(AppleCertPass)'
keychain: 'temp'
condition: eq(variables['Build.Reason'], 'Manual')
- task: AzureKeyVault@1
inputs:
azureSubscription: 'Free Trial (796b9556-9614-41a6-8040-0eb14d81fe6f'
KeyVaultName: 'Symless'
SecretsFilter: '*'
displayName: "Get keys"
condition: eq(variables['Build.Reason'], 'Manual')
- task: CmdLine@2
inputs:
script: 'brew install qt'
displayName: 'Installing QT'
- task: CmdLine@2
inputs:
script: |
export PATH="$(QT_PATH):$PATH"
mkdir build
cd build
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=$(version) -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release ..
displayName: 'Cmake standard'
condition: eq(variables['buildType'], 'standard')
- task: CmdLine@2
inputs:
script: |
export PATH="$(QT_PATH):$PATH"
export SYNERGY_ENTERPRISE=1
mkdir build
cd build
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -DSYNERGY_ENTERPRISE=ON ..
displayName: 'Cmake enterprise'
condition: eq(variables['buildType'], 'enterprise')
- task: CmdLine@2
inputs:
script: |
cd build
make -j
make install/strip
displayName: 'Compiling'
- task: CmdLine@2
inputs:
script: |
export PATH="$(QT_PATH):$PATH"
macdeployqt $(Build.Repository.LocalPath)/build/bundle/Synergy.app -codesign="$CODESIGN_ID"
codesign -f --options runtime --deep -s "$CODESIGN_ID" $(Build.Repository.LocalPath)/build/bundle/Synergy.app
ln -s /Applications $(Build.Repository.LocalPath)/build/bundle/Applications
displayName: 'Signing'
env:
CODESIGN_ID: "Developer ID Application: Symless Ltd (4HX897Y6GJ)"
condition: eq(variables['Build.Reason'], 'Manual')
- script: |
. ./build/version
SYNERGY_VERSION="$SYNERGY_VERSION_MAJOR.$SYNERGY_VERSION_MINOR.$SYNERGY_VERSION_PATCH"
SYNERGY_REVISION=`git rev-parse --short=8 HEAD`
SYNERGY_DMG_VERSION="${SYNERGY_VERSION}-${SYNERGY_VERSION_STAGE}_b$(Build.BuildNumber)-${SYNERGY_REVISION}"
SYNERGY_DMG_FILENAME=$(prefix)_v${SYNERGY_DMG_VERSION}_macos_$(name).dmg
echo "##vso[task.setvariable variable=SYNERGY_VERSION_STAGE]${SYNERGY_VERSION_STAGE}"
echo "##vso[task.setvariable variable=SYNERGY_VERSION]${SYNERGY_VERSION}"
echo "##vso[task.setvariable variable=SYNERGY_REVISION]${SYNERGY_REVISION}"
echo "##vso[task.setvariable variable=SYNERGY_DMG_VERSION]${SYNERGY_DMG_VERSION}"
echo "##vso[task.setvariable variable=SYNERGY_DMG_FILENAME]${SYNERGY_DMG_FILENAME}"
displayName: "Setup variables"
condition: eq(variables['Build.Reason'], 'Manual')
- task: CmdLine@2
inputs:
script: |
hdiutil create -volname Synergy -srcfolder $(Build.Repository.LocalPath)/build/bundle/ -ov -format UDZO $(SYNERGY_DMG_FILENAME)
mkdir pkg
mv $(SYNERGY_DMG_FILENAME) pkg/
cd pkg
md5 -r $(SYNERGY_DMG_FILENAME) >> $(SYNERGY_DMG_FILENAME).md5
shasum $(SYNERGY_DMG_FILENAME) >> $(SYNERGY_DMG_FILENAME).sha1
shasum -a 256 $(SYNERGY_DMG_FILENAME) >> $(SYNERGY_DMG_FILENAME).sha256
displayName: 'Create Installer'
condition: eq(variables['Build.Reason'], 'Manual')
- task: Bash@3
inputs:
filePath: 'CI/MacOS/notorize.sh'
workingDirectory: 'pkg/'
env:
ASC_USERNAME: $(ASC_USERNAME)
NOTORY_APP_PASSWORD: $(NOTORY_APP_PASSWORD)
displayName: 'Submit for Notarization'
condition: eq(variables['Build.Reason'], 'Manual')
- task: CopyFilesOverSSH@0
inputs:
sshEndpoint: 'Azure on Sandor'
sourceFolder: '$(Build.Repository.LocalPath)/pkg'
contents: '*'
targetFolder: 'synergy-core/v1-core-$(buildType)/$(SYNERGY_VERSION)/$(SYNERGY_VERSION_STAGE)/$(SYNERGY_REVISION)/'
readyTimeout: '20000'
displayName: 'Send Package to sandor'
condition: eq(variables['Build.Reason'], 'Manual')