- Replaced foreach() macros with C++ for() constructs. #281
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
# This is a basic workflow to help you get started with Actions | |
name: main | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# Linux build | |
linux: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# do builds with both Jack 1 and Jack 2 | |
strategy: | |
matrix: | |
jack_package: | |
- libjack-jackd2-dev | |
- libjack-dev | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential ninja-build cmake qttools5-dev qtbase5-dev libqt5svg5-dev libasound2-dev portaudio19-dev ${{ matrix.jack_package }} | |
# Runs a set of commands using the runners shell | |
- name: Build | |
run: | | |
git submodule -q update --init --recursive | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
# - name: Upload a Build Artifact | |
# uses: actions/[email protected] | |
# with: | |
# # Artifact name | |
# name: "qjackctl-${{ runner.os }}-${{ github.job }}-${{ matrix.jack_package }}.tar.gz" # optional, default is artifact | |
# # A file, directory or wildcard pattern that describes what to upload | |
# path: build/qjackctl*.tar.gz | |
# MacOS build | |
macos: | |
# The type of runner that the job will run on | |
runs-on: macos-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
brew install cmake ninja qt jack | |
# Runs a set of commands using the runners shell | |
- name: Build | |
run: | | |
git submodule -q update --init --recursive | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCONFIG_INSTALL_QT=ON | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
echo "otool -L" | |
otool -L ${{github.workspace}}/build/src/QjackCtl.app/Contents/MacOS/QjackCtl | |
echo "otool -l" | |
otool -l ${{github.workspace}}/build/src/QjackCtl.app/Contents/MacOS/QjackCtl | |
# - name: Upload a Build Artifact | |
# uses: actions/[email protected] | |
# with: | |
# # Artifact name | |
# name: "qjackctl-${{ runner.os }}-${{ github.job }}.tar.gz" # optional, default is artifact | |
# # A file, directory or wildcard pattern that describes what to upload | |
# path: build/qjackctl*.tar.gz | |
# Windows 32 and 64 bits build | |
windows: | |
# The type of runner that the job will run on | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- arch: 32 | |
- arch: 64 | |
jack_version: | |
- "$jack_latest_version" | |
- "$jack_previous_version" | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
# Use ::set-output to reuse the jack version in artifact name | |
- name: Install dependencies | |
id: dependencies | |
run: | | |
echo "Checking latest version of Jack ..." | |
$JACK_RELEASES_URL = "https://api.github.com/repos/jackaudio/jack2/releases" | |
$jack_releases = Invoke-WebRequest $JACK_RELEASES_URL | ConvertFrom-Json | |
$jack_latest_version = $jack_releases[0].tag_name | |
$jack_previous_version = $jack_releases[1].tag_name | |
echo "Downloading Jack win${{ matrix.config.arch }} ${{ matrix.jack_version }} ..." | |
$downloadUrl = "https://github.com/jackaudio/jack2-releases/releases/download/${{ matrix.jack_version }}/jack2-win${{ matrix.config.arch }}-${{ matrix.jack_version }}.exe" | |
$exePath = "$($env:TEMP)\jack2_installer.exe" | |
echo "Downloading from $downloadUrl" | |
(New-Object Net.WebClient).DownloadFile($downloadUrl, $exePath) | |
echo "Installing..." | |
cmd /c start /wait $exePath /SILENT /NORESTART /NOICONS /TYPE=full | |
echo "Done installing Jack win${{ matrix.config.arch }} ${{ matrix.jack_version }}" | |
echo "::set-output name=JACK_VERSION::${{ matrix.jack_version }}" | |
pip install -U pip | |
pip install --pre aqtinstall | |
pip show aqtinstall | |
$qt_latest_version = python3 -m aqt list-qt windows desktop --spec 5 --latest-version | |
echo "Installing Qt $qt_latest_version" | |
$cnt = 0 | |
do { | |
$cnt++ | |
python3 -m aqt install-qt -O c:\Qt windows desktop $qt_latest_version win${{ matrix.config.arch }}_mingw81 | |
if ($lastexitcode -ne 0 -and $cnt -ge 5) { | |
exit $lastexitcode | |
} | |
} while ($lastexitcode -ne 0) | |
echo "Installing win${{ matrix.config.arch }}_mingw810" | |
$cnt = 0 | |
do { | |
$cnt++ | |
python3 -m aqt install-tool -O C:\Qt windows desktop tools_mingw qt.tools.win${{ matrix.config.arch }}_mingw810 | |
if ($lastexitcode -ne 0 -and $cnt -ge 5) { | |
exit $lastexitcode | |
} | |
} while ($lastexitcode -ne 0) | |
echo "::set-output name=QT_PATH::C:\Qt\$qt_latest_version\mingw81_${{ matrix.config.arch }}" | |
echo "::set-output name=MINGW_PATH::C:\Qt\Tools\mingw810_${{ matrix.config.arch }}" | |
# Runs a set of commands using the runners shell | |
- name: Build | |
run: | | |
echo "Using MinGW at ${{ steps.dependencies.outputs.MINGW_PATH }}" | |
echo "Using Qt at ${{ steps.dependencies.outputs.QT_PATH }}" | |
$env:CC="gcc.exe" | |
$env:CXX="g++.exe" | |
$env:PATH="${{ steps.dependencies.outputs.MINGW_PATH }}\bin;$env:PATH" | |
git submodule -q update --init --recursive | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} "-GMinGW Makefiles" "-DCMAKE_PREFIX_PATH=${{steps.dependencies.outputs.QT_PATH}}\lib\cmake" -DCONFIG_INSTALL_QT=ON | |
if ($lastexitcode -ne 0) { exit $lastexitcode } | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j4 | |
if ($lastexitcode -ne 0) { exit $lastexitcode } | |
# - name: Upload a Build Artifact | |
# uses: actions/[email protected] | |
# with: | |
# # Artifact name | |
# name: "qjackctl-${{ runner.os }}-${{ github.job }}${{ matrix.config.arch }}-jack-${{ steps.dependencies.outputs.JACK_VERSION }}.zip" # optional, default is artifact | |
# # A file, directory or wildcard pattern that describes what to upload | |
# path: build/qjackctl*.zip |