repeat tests until they pass #101
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
# SPDX-FileCopyrightText: 2022-2024 Denis Danilov | |
# SPDX-License-Identifier: GPL-3.0-only | |
name: CI | |
on: [push, pull_request] | |
permissions: | |
contents: write | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
windows: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
qt-version: ['6.7.3'] | |
qt-arch: [win64_mingw] | |
build-type: [Release] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: install aqt | |
run: | | |
pip3 install aqtinstall | |
- name: install build tools | |
run: | | |
O_DIR=$HOME/Qt | |
echo "O_DIR=$O_DIR" >>$GITHUB_ENV | |
aqt install-tool windows desktop tools_cmake -O $O_DIR | |
CMake_BIN=$O_DIR/Tools/CMake_64/bin | |
echo "CMake_BIN=$CMake_BIN" >>$GITHUB_ENV | |
aqt install-tool windows desktop tools_ninja -O $O_DIR | |
Ninja_BIN=$O_DIR/Tools/Ninja | |
echo "Ninja_BIN=$Ninja_BIN" >>$GITHUB_ENV | |
- name: install Qt | |
run: | | |
aqt install-qt windows desktop ${{ matrix.qt-version }} ${{ matrix.qt-arch }} -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: install MinGW | |
run: | | |
aqt install-tool windows desktop tools_mingw90 -O $O_DIR | |
MinGW_BIN=$O_DIR/Tools/mingw1120_64/bin | |
echo "MinGW_BIN=$MinGW_BIN" >>$GITHUB_ENV | |
- name: configure | |
run: | | |
PATH=$MinGW_BIN:$CMake_BIN:$Ninja_BIN:$PATH | |
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 }} -GNinja -B $BUILD_DIR | |
- name: build | |
run: | | |
PATH=$MinGW_BIN:$CMake_BIN:$Ninja_BIN:$PATH | |
cmake --build $BUILD_DIR --target package | |
- name: upload artefacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows | |
path: ${{ env.BUILD_DIR }}/soundscape-* | |
- name: setup audio | |
uses: LABSN/sound-ci-helpers@v1 | |
- name: test | |
run: | | |
PATH=$Qt6_BINDIR:$MinGW_BIN:$PATH | |
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-* | |
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-* | |
linux: | |
runs-on: ubuntu-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: | | |
pip3 install aqtinstall | |
- name: install Qt | |
run: | | |
O_DIR=$HOME/Qt | |
echo "O_DIR=$O_DIR" >>$GITHUB_ENV | |
aqt install-qt linux 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: build dependencies | |
run: | | |
sudo apt-get -qq update | |
sudo apt-get install --assume-yes libgl1-mesa-dev | |
sudo apt-get install --assume-yes libpulse0 | |
sudo apt-get install --assume-yes libqt5gui5 | |
sudo apt-get install --assume-yes libxcb-cursor0 | |
sudo apt-get install --assume-yes pulseaudio | |
sudo apt-get install --assume-yes xvfb | |
- 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: linux | |
path: ${{ env.BUILD_DIR }}/soundscape-* | |
- name: test | |
run: | | |
systemctl --user start pulseaudio | |
xvfb-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-* |