woc #113
Workflow file for this run
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: macOS | |
on: | |
push: | |
paths: | |
- "*.txt" | |
- "src/**" | |
- "!**.qml" | |
- "!**.md" | |
- "!**.cmake" | |
- ".github/**" | |
pull_request: | |
paths: | |
- "src/**" | |
- "!**.qml" | |
- "!**.md" | |
- "!**.cmake" | |
workflow_dispatch: | |
permissions: write-all | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest] | |
qt_ver: [6.6.1] | |
qt_arch: [clang_64] | |
env: | |
targetName: sast-music | |
QT_MODULES: "qt5compat qthttpserver qtshadertools qtmultimedia" | |
steps: | |
- name: check out repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: set up Ninja | |
uses: seanmiddleditch/gha-setup-ninja@v3 | |
with: | |
version: 1.10.2 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.qt_ver }} | |
cache: ${{ steps.cache-qt.outputs.cache-hit }} | |
arch: ${{ matrix.qt_arch }} | |
modules: ${{ env.QT_MODULES }} | |
- name: build macos | |
run: | | |
cmake --version | |
mkdir build | |
cd build | |
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=${{env.Qt6_DIR}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -GNinja .. | |
cmake --build . --target all --config Release --parallel | |
- name: pakage | |
if: startsWith(github.event.ref, 'refs/tags/') | |
run: | | |
sudo find /Users/runner/work/sast-music/Qt/6.6.1/macos/qml -name "*.dSYM" | xargs rm -r | |
sudo macdeployqt bin/release/sast_music.app -qmldir=. -verbose=1 -dmg | |
- uses: actions/upload-artifact@v2 | |
if: startsWith(github.event.ref, 'refs/tags/') | |
with: | |
name: ${{ env.targetName }}_${{ matrix.os }} | |
path: bin/release/sast_music.app | |
- name: upload release | |
if: startsWith(github.event.ref, 'refs/tags/') | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: bin/release/sast_music.dmg | |
asset_name: ${{ env.targetName }}_macOS.dmg | |
tag: ${{ github.ref }} | |
overwrite: true | |