* Add 10 min timeout to all workflows * Update ChangeLog * Set analysis jobs to 20 min timeouts * Update ChangeLog
134 lines
5.3 KiB
YAML
134 lines
5.3 KiB
YAML
name: "Build macOS 11"
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
defaults:
|
|
run:
|
|
shell: "/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}"
|
|
|
|
jobs:
|
|
build-mac-11:
|
|
runs-on: "macos-latest-xlarge"
|
|
timeout-minutes: 10
|
|
|
|
strategy:
|
|
matrix:
|
|
runtime:
|
|
- name: "synergy"
|
|
remote_folder: "v1-core-standard"
|
|
enterprise: ""
|
|
business: ""
|
|
- name: "synergy-enterprise"
|
|
remote_folder: "v1-core-enterprise"
|
|
enterprise: "1"
|
|
business: ""
|
|
- name: "synergy-business"
|
|
remote_folder: "v1-core-business"
|
|
enterprise: ""
|
|
business: "1"
|
|
|
|
env:
|
|
GIT_COMMIT: ${{ github.sha }}
|
|
SYNERGY_ENTERPRISE: ${{ matrix.runtime.enterprise }}
|
|
SYNERGY_BUSINESS: ${{ matrix.runtime.business }}
|
|
CODESIGN_ID: "Developer ID Application: Symless Ltd (4HX897Y6GJ)"
|
|
|
|
steps:
|
|
- name: Setup PATH
|
|
run: echo "/opt/homebrew/bin" >> $GITHUB_PATH
|
|
env:
|
|
ARCH: ${{ matrix.runtime.arch }}
|
|
|
|
- name: Checkout git repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: "recursive"
|
|
|
|
- name: Setup Environment
|
|
run: |
|
|
python3 -m pip install dmgbuild
|
|
brew bundle --file=- <<< "brew 'qt5'; brew 'openssl'"
|
|
|
|
- name: Build
|
|
env:
|
|
CMAKE_BUILD_TYPE: Release
|
|
run: |
|
|
python3 scripts/build_version.py
|
|
mkdir build
|
|
cd build
|
|
cmake \
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=11 \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_PREFIX_PATH="$(brew --prefix qt5);$(brew --prefix openssl)" ..
|
|
. ./version
|
|
make -j
|
|
make install/strip
|
|
|
|
- name: Version Info
|
|
id: version
|
|
run: |
|
|
. ./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}"
|
|
echo "::set-output name=SYNERGY_VERSION_MAJOR::$SYNERGY_VERSION_MAJOR"
|
|
echo "::set-output name=SYNERGY_VERSION_MINOR::$SYNERGY_VERSION_MINOR"
|
|
echo "::set-output name=SYNERGY_VERSION_PATCH::$SYNERGY_VERSION_PATCH"
|
|
echo "::set-output name=SYNERGY_VERSION_STAGE::$SYNERGY_VERSION_STAGE"
|
|
echo "::set-output name=SYNERGY_VERSION_BUILD::$SYNERGY_VERSION_BUILD"
|
|
echo "::set-output name=SYNERGY_VERSION::$SYNERGY_VERSION"
|
|
echo "::set-output name=SYNERGY_REVISION::$SYNERGY_REVISION"
|
|
echo "::set-output name=SYNERGY_DMG_VERSION::$SYNERGY_DMG_VERSION"
|
|
SYNERGY_PACKAGE_NAME=${{ matrix.runtime.name }}
|
|
SYNERGY_REMOTE_FOLDER="${{ matrix.runtime.remote_folder }}/${SYNERGY_VERSION}/${SYNERGY_VERSION_STAGE}/b${SYNERGY_VERSION_BUILD}-${SYNERGY_REVISION}"
|
|
SYNERGY_DMG_FILENAME="${SYNERGY_PACKAGE_NAME}_${SYNERGY_DMG_VERSION}_macos-arm64.dmg"
|
|
echo "SYNERGY_REMOTE_FOLDER: $SYNERGY_REMOTE_FOLDER"
|
|
echo "::set-output name=SYNERGY_REMOTE_FOLDER::$SYNERGY_REMOTE_FOLDER"
|
|
echo "::set-output name=SYNERGY_PACKAGE_NAME::$SYNERGY_PACKAGE_NAME"
|
|
echo "::set-output name=SYNERGY_DMG_FILENAME::$SYNERGY_DMG_FILENAME"
|
|
|
|
- name: Sign applicaiton
|
|
run: |
|
|
export PATH="$(brew --prefix qt5)/bin:$PATH"
|
|
macdeployqt ${{ github.workspace }}/build/bundle/Synergy.app -codesign="$CODESIGN_ID"
|
|
codesign -f --options runtime --deep -s "$CODESIGN_ID" ${{ github.workspace }}/build/bundle/Synergy.app
|
|
ln -s /Applications ${{ github.workspace }}/build/bundle/Applications
|
|
|
|
- name: Create Installer
|
|
env:
|
|
SYNERGY_DMG_FILENAME: ${{ steps.version.outputs.SYNERGY_DMG_FILENAME }}
|
|
run: |
|
|
dmgbuild \
|
|
-s CI/MacOS/installator_settings.py \
|
|
-D app=${{ github.workspace }}/build/bundle/Synergy.app \
|
|
-D background=${{ github.workspace }}/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
|
|
|
|
- name: Submit for Notarization
|
|
env:
|
|
ASC_USERNAME: ${{ secrets.ASC_USERNAME }}
|
|
NOTORY_APP_PASSWORD: ${{ secrets.NOTORY_APP_PASSWORD }}
|
|
SYNERGY_VERSION: ${{ steps.version.outputs.SYNERGY_VERSION }}
|
|
SYNERGY_REVISION: ${{ steps.version.outputs.SYNERGY_REVISION }}
|
|
SYNERGY_DMG_FILENAME: ${{ steps.version.outputs.SYNERGY_DMG_FILENAME }}
|
|
run: |
|
|
cd pkg
|
|
../CI/MacOS/notorize.sh
|
|
|
|
- name: Send package to Binary Storage
|
|
uses: garygrossgarten/github-action-scp@v0.7.3
|
|
with:
|
|
local: "${{ github.workspace }}/pkg/"
|
|
remote: "${{ secrets.BINARIES_SSH_DIR }}/${{ steps.version.outputs.SYNERGY_REMOTE_FOLDER }}/"
|
|
host: ${{ secrets.BINARIES_SSH_HOST }}
|
|
username: ${{ secrets.BINARIES_SSH_USER }}
|
|
privateKey: ${{ secrets.BINARIES_SSH_KEY }}
|