deskflow/CI/MacOS/mac-build.yml
Kyle Bloom dd7c527456
Mac build failures (#6922)
* Add ssl links to cmake commands

* Comment out centos 7.6

* Update ChangeLog

* Remove ubuntu1604
2021-01-22 12:26:33 +02:00

134 lines
4.7 KiB
YAML

steps:
- task: InstallAppleCertificate@2
inputs:
certSecureFile: 'AppleSigningCert.cer'
certPwd: '$(AppleCertPass)'
keychain: 'temp'
- task: CmdLine@2
inputs:
script: |
python3 CI/build_version.py
displayName: 'Update Version.cmake'
- task: CmdLine@2
inputs:
script: |
python3 -m pip install dmgbuild
python3 -m pip install aqtinstall
displayName: 'Installing utilities'
- task: CmdLine@2
inputs:
script: |
python3 -m aqt install $(QT_VERSION) mac desktop -O $(QT_PATH)
displayName: 'Installing QT'
- task: CmdLine@2
inputs:
script: |
export PATH="$(Qt5_DIR)/bin:$PATH"
mkdir build
cd build
cmake \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$(version) \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CONFIGURATION_TYPES=Release \
-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl \
-DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib ..
displayName: 'Cmake standard'
condition: eq(variables['buildType'], 'standard')
env:
GIT_COMMIT: $(Build.SourceVersion)
- task: CmdLine@2
inputs:
script: |
export PATH="$(Qt5_DIR)/bin:$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 \
-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl \
-DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib ..
displayName: 'Cmake enterprise'
condition: eq(variables['buildType'], 'enterprise')
env:
GIT_COMMIT: $(Build.SourceVersion)
- task: CmdLine@2
inputs:
script: |
cd build
. ./version
make -j
make install/strip
displayName: 'Compiling'
env:
GIT_COMMIT: $(Build.SourceVersion)
- 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)"
- 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}.${SYNERGY_REVISION}"
SYNERGY_DMG_FILENAME=$(prefix)_${SYNERGY_DMG_VERSION}_macos_$(platform).dmg
echo "##vso[task.setvariable variable=SYNERGY_VERSION_STAGE]${SYNERGY_VERSION_STAGE}"
echo "##vso[task.setvariable variable=SYNERGY_VERSION_BUILD]${SYNERGY_VERSION_BUILD}"
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"
- task: CmdLine@2
inputs:
script: |
dmgbuild \
-s CI/MacOS/installator_settings.py \
-D app=$(Build.Repository.LocalPath)/build/bundle/Synergy.app \
-D background=$(Build.Repository.LocalPath)/build/bundle/Synergy.app/Contents/Resources/.installer_background.tiff \
"Synergy" \
$(SYNERGY_DMG_FILENAME)
mkdir pkg
mv $(SYNERGY_DMG_FILENAME) pkg/
cd pkg
md5 -r $(SYNERGY_DMG_FILENAME) >> $(SYNERGY_DMG_FILENAME).checksum.txt
shasum $(SYNERGY_DMG_FILENAME) >> $(SYNERGY_DMG_FILENAME).checksum.txt
shasum -a 256 $(SYNERGY_DMG_FILENAME) >> $(SYNERGY_DMG_FILENAME).checksum.txt
displayName: 'Create Installer'
- 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'
- 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)/b$(SYNERGY_VERSION_BUILD)-$(SYNERGY_REVISION)/'
readyTimeout: '20000'
displayName: 'Send Package to sandor'