diff --git a/.gitea/workflows/qt-macos-arm64.yml b/.gitea/workflows/qt-macos-arm64.yml new file mode 100644 index 0000000..7d63e01 --- /dev/null +++ b/.gitea/workflows/qt-macos-arm64.yml @@ -0,0 +1,49 @@ +name: qt-macos-arm64 + +on: + push: + branches: [ main ] + tags: [ 'v*' ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + qt-macos-arm64: + runs-on: macos-arm64 + steps: + - uses: actions/checkout@v4 + + - name: Install build dependencies + run: | + set -eu + brew update + brew install cmake ninja qt + + - name: Configure + build + run: | + set -eu + cmake -S . -B build-out -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$(brew --prefix qt)" + cmake --build build-out --parallel "$(sysctl -n hw.ncpu)" + + - name: Pack artifacts + run: | + set -eu + rm -rf artifacts + mkdir -p artifacts + if [ -d build-out/qt_tray_demo.app ]; then + tar -C build-out -czf artifacts/qt_tray_demo-macos-arm64-run${{ github.run_number }}.app.tar.gz qt_tray_demo.app + elif [ -f build-out/qt_tray_demo ]; then + cp build-out/qt_tray_demo artifacts/qt_tray_demo-macos-arm64-run${{ github.run_number }} + chmod +x artifacts/qt_tray_demo-macos-arm64-run${{ github.run_number }} + else + echo 'No Qt macOS output found'; + exit 1 + fi + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: qt_tray_demo-macos-arm64-run${{ github.run_number }} + path: artifacts/ + retention-days: 14