From 19c8ed3b10e9e4340b58fe1a0fedb8ef817ea394 Mon Sep 17 00:00:00 2001 From: Gremlin Date: Thu, 19 Mar 2026 17:01:31 +0000 Subject: [PATCH] Add macOS arm64 Gitea workflow --- .gitea/workflows/qt-macos-arm64.yml | 62 +++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .gitea/workflows/qt-macos-arm64.yml diff --git a/.gitea/workflows/qt-macos-arm64.yml b/.gitea/workflows/qt-macos-arm64.yml new file mode 100644 index 0000000..7c0d631 --- /dev/null +++ b/.gitea/workflows/qt-macos-arm64.yml @@ -0,0 +1,62 @@ +name: qt-macos-arm64 + +on: + push: + branches: [ main ] + tags: [ 'v*' ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + qt-macos-arm64: + runs-on: macos-arm64 + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + + - name: Prepare PATH + run: | + echo "/opt/homebrew/bin" >> "$GITHUB_PATH" + echo "/opt/homebrew/opt/qt/bin" >> "$GITHUB_PATH" + + - name: Verify toolchain + run: | + set -euo pipefail + cmake --version | head -n1 + qmake --version | head -n2 + which macdeployqt + xcode-select -p + + - name: Configure + build app bundle + run: | + set -euo pipefail + rm -rf build-out artifacts + cmake -S . -B build-out -G Ninja -DCMAKE_BUILD_TYPE=Release + cmake --build build-out --parallel "$(sysctl -n hw.ncpu)" + + - name: Deploy Qt app bundle + run: | + set -euo pipefail + app_path="$(find build-out -maxdepth 2 -type d -name 'qt_tray_demo.app' | head -n1 || true)" + [ -n "$app_path" ] || { echo 'No Qt .app bundle produced'; exit 1; } + macdeployqt "$app_path" + + - name: Pack artifact and copy to Desktop + run: | + set -euo pipefail + mkdir -p artifacts "$HOME/Desktop" + app_path="$(find build-out -maxdepth 2 -type d -name 'qt_tray_demo.app' | head -n1 || true)" + [ -n "$app_path" ] || { echo 'No deployed Qt .app bundle found'; exit 1; } + out="qt_tray_demo-macos-arm64-run${{ github.run_number }}.zip" + ditto -c -k --sequesterRsrc --keepParent "$app_path" "artifacts/$out" + cp "artifacts/$out" "$HOME/Desktop/$out" + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: qt_tray_demo-macos-arm64-run${{ github.run_number }} + path: artifacts/ + retention-days: 14