ci: add macOS arm64 workflow
This commit is contained in:
parent
7b056fb78e
commit
76c706af36
49
.gitea/workflows/qt-macos-arm64.yml
Normal file
49
.gitea/workflows/qt-macos-arm64.yml
Normal file
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user