Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrated to Azure pipline for CI and builds
Also added Deb 10 to CI and builds
- Loading branch information
Showing
27 changed files
with
681 additions
and
513 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
steps: | ||
- script: | | ||
mkdir build-release | ||
cd build-release | ||
if [ -z $(which cmake) ]; then cmake3 -DCMAKE_BUILD_TYPE=Release ..; else cmake -DCMAKE_BUILD_TYPE=Release ..; fi | ||
make -j | ||
condition: eq(variables['packager'],'deb') | ||
displayName: 'Build Release deb' | ||
- script: | | ||
mkdir build-release | ||
cd build-release | ||
if [ -z $(which cmake) ]; then | ||
cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/rpm/BUILDROOT/usr ..; | ||
else cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/rpm/BUILDROOT/usr ..; | ||
fi | ||
make -j | ||
make install/strip | ||
condition: eq(variables['packager'],'rpm') | ||
displayName: 'Build Release rpm' | ||
- script: | | ||
mkdir build-ent | ||
cd build-ent | ||
export SYNERGY_ENTERPRISE=1 | ||
if [ -z $(which cmake) ]; then cmake3 -DCMAKE_BUILD_TYPE=Release -DSYNERGY_ENTERPRISE=ON ..; else cmake -DCMAKE_BUILD_TYPE=Release -DSYNERGY_ENTERPRISE=ON ..; fi | ||
make -j | ||
displayName: 'Build enterprise' | ||
condition: eq(variables['packager'],'deb') | ||
- script: | | ||
mkdir build-ent | ||
cd build-ent | ||
if [ -z $(which cmake) ]; then | ||
cmake3 -DCMAKE_BUILD_TYPE=Release -DSYNERGY_ENTERPRISE=ON -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/rpm/BUILDROOT/usr ..; | ||
else cmake -DCMAKE_BUILD_TYPE=Release -DSYNERGY_ENTERPRISE=ON -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/rpm/BUILDROOT/usr ..; | ||
fi | ||
make -j | ||
make install/strip | ||
condition: eq(variables['packager'],'rpm') | ||
displayName: 'Build enterprise rpm' | ||
- script: | | ||
. ./build-release/version | ||
SYNERGY_VERSION="$SYNERGY_VERSION_MAJOR.$SYNERGY_VERSION_MINOR.$SYNERGY_VERSION_PATCH" | ||
SYNERGY_REVISION=`git rev-parse --short=8 HEAD` | ||
SYNERGY_DEB_VERSION="${SYNERGY_VERSION}.${SYNERGY_VERSION_STAGE}~b$(Build.BuildNumber)+${SYNERGY_REVISION}" | ||
SYNERGY_RPM_VERSION="${SYNERGY_VERSION}-$(Build.BuildNumber).${SYNERGY_VERSION_STAGE}.${SYNERGY_REVISION}" | ||
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_DEB_VERSION]${SYNERGY_DEB_VERSION}" | ||
echo "##vso[task.setvariable variable=SYNERGY_RPM_VERSION]${SYNERGY_RPM_VERSION}" | ||
displayName: "Setup variables" | ||
condition: and(eq(variables['packager'],'deb'), eq(variables['Build.Reason'], 'Manual')) | ||
- script: | | ||
dch --create --package "synergy" --controlmaint --distribution unstable --newversion $SYNERGY_DEB_VERSION "Initial release" | ||
export DEB_BUILD_OPTIONS="parallel=8" | ||
export GPG_TTY=$(tty) | ||
debuild --preserve-envvar SYNERGY_* -us -uc | ||
mkdir standard_package | ||
cd .. | ||
filename=$(ls synergy_*.deb) | ||
filename_new="synergy_${SYNERGY_DEB_VERSION}_$(name)${filename##*${SYNERGY_REVISION}}" | ||
mv $filename $(Build.Repository.LocalPath)/standard_package/$filename_new | ||
cd $(Build.Repository.LocalPath)/standard_package | ||
md5sum $filename_new >> ${filename_new}.md5 | ||
sha1sum $filename_new >> ${filename_new}.sha1 | ||
sha256sum $filename_new >> ${filename_new}.sha256 | ||
ls -la | ||
displayName: "Package Binary DEB(Standard)" | ||
condition: and(eq(variables['packager'],'deb'), eq(variables['Build.Reason'], 'Manual')) | ||
- script: | | ||
export SYNERGY_ENTERPRISE=1 | ||
dch --create --package "synergy-enterprise_" --controlmaint --distribution unstable --newversion $(SYNERGY_DEB_VERSION) "Initial release" | ||
export DEB_BUILD_OPTIONS="parallel=8" | ||
export GPG_TTY=$(tty) | ||
debuild --preserve-envvar SYNERGY_* -us -uc | ||
mkdir enterprise_package | ||
cd .. | ||
filename=$(ls synergy_*.deb) | ||
filename_new="synergy-enterprise_$(SYNERGY_DEB_VERSION)_$(name)${filename##*$(SYNERGY_REVISION)}" | ||
mv $filename $(Build.Repository.LocalPath)/enterprise_package/$filename_new | ||
cd $(Build.Repository.LocalPath)/enterprise_package | ||
md5sum $filename_new >> ${filename_new}.md5 | ||
sha1sum $filename_new >> ${filename_new}.sha1 | ||
sha256sum $filename_new >> ${filename_new}.sha256 | ||
ls -la | ||
displayName: "Package Binary DEB(Enterprise)" | ||
condition: and(eq(variables['packager'],'deb'), eq(variables['Build.Reason'], 'Manual')) | ||
- script: | | ||
cd build-release/rpm | ||
rpmbuild -bb --define "_topdir $(pwd)" --buildroot $(pwd)/BUILDROOT synergy.spec | ||
rpmlint --verbose RPMS/x86_64/*.rpm | ||
cd RPMS/x86_64 | ||
filename=$(ls *.rpm) | ||
md5sum $filename >> ${filename}.md5 | ||
sha1sum $filename >> ${filename}.sha1 | ||
sha256sum $filename >> ${filename}.sha256 | ||
cd .. | ||
mv x86_64 $(Build.Repository.LocalPath)/standard_package | ||
displayName: "Package Binary RPM(standard)" | ||
condition: and(eq(variables['packager'],'rpm'), eq(variables['Build.Reason'], 'Manual')) | ||
- script: | | ||
cd build-ent/rpm | ||
rpmbuild -bb --define "_topdir $(pwd)" --buildroot $(pwd)/BUILDROOT synergy.spec | ||
rpmlint --verbose RPMS/x86_64/*.rpm | ||
cd RPMS/x86_64 | ||
filename=$(ls *.rpm) | ||
md5sum $filename >> ${filename}.md5 | ||
sha1sum $filename >> ${filename}.sha1 | ||
sha256sum $filename >> ${filename}.sha256 | ||
cd .. | ||
mv x86_64 $(Build.Repository.LocalPath)/enterprise_package | ||
ls -la | ||
displayName: "Package Binary RPM(enterprise)" | ||
condition: and(eq(variables['packager'],'rpm'), eq(variables['Build.Reason'], 'Manual')) | ||
- task: CopyFilesOverSSH@0 | ||
inputs: | ||
sshEndpoint: 'Azure on Sandor' | ||
sourceFolder: './standard_package' | ||
contents: '*' | ||
targetFolder: 'synergy-core/v1-core-standard/$(SYNERGY_VERSION)/$(SYNERGY_VERSION_STAGE)/$(SYNERGY_REVISION)/' | ||
readyTimeout: '20000' | ||
displayName: 'Send standard Package to sandor' | ||
condition: eq(variables['Build.Reason'], 'Manual') | ||
|
||
- task: CopyFilesOverSSH@0 | ||
inputs: | ||
sshEndpoint: 'Azure on Sandor' | ||
sourceFolder: './enterprise_package' | ||
contents: '*' | ||
targetFolder: 'synergy-core/v1-core-enterprise/$(SYNERGY_VERSION)/$(SYNERGY_VERSION_STAGE)/$(SYNERGY_REVISION)/' | ||
readyTimeout: '20000' | ||
displayName: 'Send enterprise Package to sandor' | ||
condition: eq(variables['Build.Reason'], 'Manual') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#Notarization script from https://github.com/rednoah/notarize-app/blob/master/notarize-app | ||
|
||
BUNDLE_ID=com.symless.synergy.${SYNERGY_VERSION}.${SYNERGY_REVISION} | ||
|
||
echo "User: ${ASC_USERNAME}" | ||
echo "Bundle: ${BUNDLE_ID}" | ||
|
||
# create temporary files | ||
NOTARIZE_APP_LOG=$(mktemp -t notarize-app) | ||
NOTARIZE_INFO_LOG=$(mktemp -t notarize-info) | ||
|
||
|
||
|
||
# submit app for notarization | ||
if xcrun altool --notarize-app --primary-bundle-id "$BUNDLE_ID" --username "$ASC_USERNAME" --password "${NOTORY_APP_PASSWORD}" -f "${SYNERGY_DMG_FILENAME}" > "$NOTARIZE_APP_LOG" 2>&1; then | ||
cat "$NOTARIZE_APP_LOG" | ||
RequestUUID=$(awk -F ' = ' '/RequestUUID/ {print $2}' "$NOTARIZE_APP_LOG") | ||
|
||
# check status periodically | ||
while sleep 60 && date; do | ||
# check notarization status | ||
if xcrun altool --notarization-info "$RequestUUID" --username "$ASC_USERNAME" --password "${NOTORY_APP_PASSWORD}" > "$NOTARIZE_INFO_LOG" 2>&1; then | ||
cat "$NOTARIZE_INFO_LOG" | ||
|
||
# once notarization is complete, run stapler and exit | ||
if ! grep -q "Status: in progress" "$NOTARIZE_INFO_LOG"; then | ||
xcrun stapler staple "${SYNERGY_DMG_FILENAME}" | ||
exit | ||
fi | ||
else | ||
cat "$NOTARIZE_INFO_LOG" 1>&2 | ||
exit 1 | ||
fi | ||
done | ||
else | ||
cat "$NOTARIZE_APP_LOG" 1>&2 | ||
exit 1 | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.