Skip to content

split workflows

split workflows #1

Workflow file for this run

# SPDX-FileCopyrightText: 2024 Denis Danilov
# SPDX-License-Identifier: GPL-3.0-only
name: mac
on: [push, pull_request]
permissions:
contents: write
defaults:
run:
shell: bash
jobs:
macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
qt-version: ['6.7.3']
build-type: [Release]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install aqt
run: |
pipx install aqtinstall
- name: install build tools
run: |
brew install librsvg
- name: install Qt
run: |
O_DIR=$HOME/Qt
echo "O_DIR=$O_DIR" >>$GITHUB_ENV
aqt install-qt mac desktop ${{ matrix.qt-version }} -m qtmultimedia -O $O_DIR
- name: Qt dir
run: |
Qt6_QMAKE=`find $O_DIR -name "qmake6*"`
Qt6_BINDIR=`dirname $Qt6_QMAKE`
Qt6_DIR=`dirname $Qt6_BINDIR`
QT_PLUGIN_PATH=$Qt6_DIR/plugins
QML2_IMPORT_PATH=$Qt6_DIR/qml
echo "Qt6_DIR=$Qt6_DIR" >>$GITHUB_ENV
echo "Qt6_BINDIR=$Qt6_BINDIR" >>$GITHUB_ENV
echo "QT_PLUGIN_PATH=$QT_PLUGIN_PATH" >>$GITHUB_ENV
echo "QML2_IMPORT_PATH=$QML2_IMPORT_PATH" >>$GITHUB_ENV
- name: configure
run: |
BUILD_DIR=build
echo "BUILD_DIR=$BUILD_DIR" >>$GITHUB_ENV
cmake -DWITH_DEPLOY_SCRIPT=ON -DCMAKE_PREFIX_PATH=$Qt6_DIR -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -B $BUILD_DIR
- name: build
run: |
cmake --build $BUILD_DIR --target package
- name: upload artefacts
uses: actions/upload-artifact@v4
with:
name: macos
path: ${{ env.BUILD_DIR }}/soundscape-*
- name: test
run: |
ctest --output-on-failure --test-dir $BUILD_DIR/tests --repeat until-pass:5
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: ${{ env.BUILD_DIR }}/soundscape-*