Add cross-platform downloads and CMOD release packages #120
Workflow file for this run
This file contains hidden or 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: Build | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - '**/*.cpp' | |
| - '**/*.hpp' | |
| - '**/*.h' | |
| - '**/CMakeLists.txt' | |
| - '**/*.cmake' | |
| - '.github/workflows/build.yml' | |
| pull_request: | |
| paths: | |
| - '**/*.cpp' | |
| - '**/*.hpp' | |
| - '**/*.h' | |
| - '**/CMakeLists.txt' | |
| - '**/*.cmake' | |
| - '.github/workflows/build.yml' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.event_name == 'pull_request' && format('build-pr-{0}', github.head_ref) || 'build-main' }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| linux: | |
| name: Linux build | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential cmake ninja-build \ | |
| libsndfile1-dev \ | |
| libgl1-mesa-dev libfuse2 \ | |
| libxkbcommon-dev '^libxcb.*-dev' libx11-xcb-dev \ | |
| libglu1-mesa-dev libxrender-dev libxi-dev libxkbfile-dev | |
| - name: Install Qt 6.8 | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: "6.8.0" | |
| host: linux | |
| target: desktop | |
| arch: linux_gcc_64 | |
| modules: "" | |
| cache: true | |
| - name: Configure | |
| run: | | |
| cmake -S . -B build -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_PREFIX_PATH="${Qt6_DIR}" | |
| - name: Build | |
| run: cmake --build build --parallel | |
| windows: | |
| name: Windows build | |
| runs-on: windows-2022 | |
| defaults: | |
| run: | |
| shell: pwsh | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Configure MSVC environment | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Install Qt 6.8 | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: "6.8.0" | |
| host: windows | |
| target: desktop | |
| arch: win64_msvc2022_64 | |
| cache: true | |
| - name: Install vcpkg dependencies | |
| run: | | |
| $vcpkgRoot = "$env:RUNNER_TEMP\vcpkg" | |
| git clone --depth 1 https://github.com/microsoft/vcpkg.git $vcpkgRoot | |
| & "$vcpkgRoot\bootstrap-vcpkg.bat" -disableMetrics | |
| & "$vcpkgRoot\vcpkg.exe" install ` | |
| libsndfile:x64-windows ` | |
| dirent:x64-windows | |
| - name: Configure | |
| env: | |
| CL: /EHsc /DNOMINMAX /DNOGDI /DMUPARSER_STATIC /D_CRT_SECURE_NO_WARNINGS | |
| run: | | |
| $vcpkgRoot = "$env:RUNNER_TEMP\vcpkg" | |
| Write-Host "MSVC flags: $env:CL" | |
| cmake -S . -B build -G Ninja ` | |
| -DCMAKE_BUILD_TYPE=Release ` | |
| "-DCMAKE_PREFIX_PATH=$env:Qt6_DIR" ` | |
| "-DCMAKE_TOOLCHAIN_FILE=$vcpkgRoot\scripts\buildsystems\vcpkg.cmake" ` | |
| -DVCPKG_TARGET_TRIPLET=x64-windows ` | |
| -DBUILD_SHARED_LIBS=OFF ` | |
| "-DSNDFILE_INCLUDE_DIR=$vcpkgRoot\installed\x64-windows\include" ` | |
| "-DSNDFILE_LIBRARY=$vcpkgRoot\installed\x64-windows\lib\sndfile.lib" | |
| - name: Build | |
| env: | |
| CL: /EHsc /DNOMINMAX /DNOGDI /DMUPARSER_STATIC /D_CRT_SECURE_NO_WARNINGS | |
| run: | | |
| Write-Host "MSVC flags: $env:CL" | |
| cmake --build build --parallel --verbose | |
| macos: | |
| name: macOS build | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install dependencies | |
| run: | | |
| brew update | |
| brew install cmake ninja libsndfile | |
| - name: Install Qt 6.8 | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: "6.8.0" | |
| host: mac | |
| target: desktop | |
| arch: clang_64 | |
| modules: "" | |
| cache: true | |
| - name: Configure | |
| run: | | |
| cmake -S . -B build -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_PREFIX_PATH="${Qt6_DIR}" | |
| - name: Build | |
| run: cmake --build build --parallel |