build-macos-silicon #5
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
name: build-macos-silicon | |
on: | |
workflow_dispatch: | |
env: | |
REF_TAG: v1.1.1 | |
jobs: | |
user-manual: | |
uses: ./.github/workflows/user-manual.yml | |
with: | |
runs-on: ubuntu-latest | |
build: | |
runs-on: macos-14 | |
needs: user-manual | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: ctlcltd/e2-sat-editor | |
# ref: ${{ env.REF_TAG }} | |
path: e2-sat-editor | |
- name: Setup Homebrew | |
run: brew install cmake ninja qt6 curl | |
- name: Configure CMake | |
working-directory: ${{github.workspace}}/e2-sat-editor/src | |
run: | | |
export PKG_CONFIG_PATH="/opt/homebrew/opt/curl/lib/pkgconfig" | |
cmake \ | |
-G Ninja \ | |
-B build \ | |
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} | |
- name: Build | |
working-directory: ${{github.workspace}}/e2-sat-editor/src | |
run: cmake --build build --config ${{ env.BUILD_TYPE }} | |
- name: Download user-manual artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: user-manual | |
path: user-manual | |
run-id: ${{ needs.user-manual.outputs.run-id }} | |
- name: Deploy | |
working-directory: ${{github.workspace}}/e2-sat-editor/src | |
continue-on-error: true | |
run: | | |
DESTDIR=../AppDir ninja -C build install | |
cp ../dist/macos/PkgInfo.in AppDir/usr/local/e2\ SAT\ Editor.app/Contents/PkgInfo | |
# copy translations | |
QMDIR=AppDir/usr/local/e2\ SAT\ Editor.app/Contents/Resources/translations | |
mkdir -p "$QMDIR" | |
cp ../dist/translations/*.qm "$QMDIR" | |
cp /opt/homebrew/opt/qt/share/qt/translations/qt_*.qm "$QMDIR" | |
cp /opt/homebrew/opt/qt/share/qt/translations/qtbase_*.qm "$QMDIR" | |
rm -R "$QMDIR"/qt_help_*.qm | |
# run deploy script | |
bash ../scripts/deployqtmacx.sh AppDir/usr/local/e2\ SAT\ Editor.app | |
# strip binaries | |
strip AppDir/usr/local/e2\ SAT\ Editor.app/Contents/e2\ SAT\ Editor | |
strip AppDir/usr/local/e2se-cli | |
# package | |
mkdir -p ../dist/{cli,user-manual} | |
cp ../README.md ../dist/ | |
cp COPYING ../dist/ | |
mv AppDir/usr/local/e2\ SAT\ Editor.app ../dist/ | |
mv AppDir/usr/local/e2se-cli ../dist/cli/ | |
mv -R ${{github.workspace}}/user-manual ../dist/user-manual | |
# - name: Test | |
# working-directory: ${{github.workspace}}/e2-sat-editor/dist | |
# continue-on-error: true | |
# timeout-minutes: 1 | |
# run: | | |
# mv /opt/homebrew/Cellar /opt/homebrew/Cellar.bak | |
# DEBUG=1 QT_QPA_PLATFORM=minimal ./e2\ SAT\ Editor.app/Contents/MacOS/e2\ SAT\ Editor | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{github.workspace}}/e2-sat-editor/dist |