Merge pull request #2392 from Wasted-Audio/feature/heavy-game-audio #8214
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: CMake | |
| on: [push, workflow_dispatch] | |
| env: | |
| CMAKE_BUILD_PARALLEL_LEVEL: 4 | |
| jobs: | |
| macos-build: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: macOS-Universal | |
| runner: macos-latest | |
| artifact: plugdata-macOS-Universal.pkg | |
| cmake_args: "" | |
| - name: macOS-Legacy | |
| runner: macos-14 | |
| artifact: plugdata-macOS-Legacy.pkg | |
| cmake_args: -DNANOVG_METAL_IMPLEMENTATION=0 -DMACOS_LEGACY=1 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ matrix.name }} | |
| max-size: 800M | |
| - name: Configure CMake | |
| working-directory: ${{ github.workspace }} | |
| run: > | |
| cmake -Bbuild -GNinja | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| ${{ matrix.cmake_args }} | |
| - name: Check for Code-Signing secrets | |
| id: secret-check | |
| shell: bash | |
| run: | | |
| if [ "${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}" != '' ]; then | |
| echo "available=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "available=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Import Code-Signing Certificates | |
| uses: apple-actions/import-codesign-certs@v6 | |
| if: ${{ steps.secret-check.outputs.available == 'true' }} | |
| with: | |
| p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} | |
| p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} | |
| - name: Build | |
| working-directory: ${{ github.workspace }} | |
| run: cmake --build build --config Release | |
| - name: Creating Installer | |
| working-directory: ${{ github.workspace }} | |
| env: | |
| AC_USERNAME: ${{ secrets.AC_USERNAME }} | |
| AC_PASSWORD: ${{ secrets.AC_PASSWORD }} | |
| run: ./.github/scripts/package-macOS.sh ${{ matrix.artifact }} | |
| - name: Upload to Cloud Storage | |
| if: github.ref == 'refs/heads/develop' | |
| run: | | |
| aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY }} | |
| aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_KEY }} | |
| aws configure set default.region eu-north-1 | |
| aws s3 cp ./${{ matrix.artifact }} s3://plugdata-nightly/ | |
| aws s3 cp ./${{ matrix.artifact }}.txt s3://plugdata-nightly/ | |
| aws cloudfront create-invalidation \ | |
| --distribution-id E3OV68BQRGDGE2 \ | |
| --paths \ | |
| "/${{ matrix.artifact }}" \ | |
| "/${{ matrix.artifact }}.txt" | |
| - name: Archive Artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ${{ matrix.name }} | |
| path: ${{ matrix.artifact }} | |
| windows-build: | |
| name: ${{ matrix.name }} | |
| runs-on: windows-2022 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Windows-64 | |
| arch: x64 | |
| artifact: plugdata-Win64.msi | |
| cmake_args: -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl | |
| - name: Windows-32 | |
| arch: x86 | |
| artifact: plugdata-Win32.msi | |
| cmake_args: -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ matrix.name }} | |
| max-size: 800M | |
| - name: Set up MSVC environment | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: ${{ matrix.arch }} | |
| - name: Install Ninja | |
| uses: seanmiddleditch/gha-setup-ninja@v6 | |
| - name: Configure CMake | |
| working-directory: ${{ github.workspace }} | |
| run: > | |
| cmake -Bbuild -GNinja | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| ${{ matrix.cmake_args }} | |
| - name: Build | |
| working-directory: ${{ github.workspace }} | |
| run: cmake --build build --config Release | |
| - name: Creating Installer | |
| working-directory: ${{ github.workspace }} | |
| shell: bash | |
| run: ./.github/scripts/package-Windows.sh ${{ matrix.artifact }} | |
| - name: Upload to Cloud Storage | |
| if: github.ref == 'refs/heads/develop' | |
| shell: bash | |
| run: | | |
| choco install awscli | |
| aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY }} | |
| aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_KEY }} | |
| aws configure set default.region eu-north-1 | |
| aws s3 cp ./${{ matrix.artifact }} s3://plugdata-nightly/ | |
| aws s3 cp ./${{ matrix.artifact }}.txt s3://plugdata-nightly/ | |
| aws cloudfront create-invalidation \ | |
| --distribution-id E3OV68BQRGDGE2 \ | |
| --paths \ | |
| "/${{ matrix.artifact }}" \ | |
| "/${{ matrix.artifact }}.txt" | |
| - name: Archive Artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ${{ matrix.name }} | |
| path: ${{ matrix.artifact }} | |
| linux-build: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.runner }} | |
| container: | |
| image: ${{ matrix.os }} | |
| options: --privileged | |
| volumes: | |
| - /sys/fs/cgroup:/sys/fs/cgroup | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Ubuntu-24.04-x64 | |
| runner: ubuntu-latest | |
| os: ubuntu:24.04 | |
| pacman: apt | |
| aws_arch: x86_64 | |
| - name: Ubuntu-26.04-x64 | |
| runner: ubuntu-latest | |
| os: ubuntu:26.04 | |
| pacman: apt | |
| aws_arch: x86_64 | |
| - name: Debian-x64 | |
| runner: ubuntu-latest | |
| os: debian | |
| pacman: apt | |
| aws_arch: x86_64 | |
| - name: Fedora-43-x64 | |
| runner: ubuntu-latest | |
| os: fedora:43 | |
| pacman: dnf | |
| aws_arch: x86_64 | |
| - name: Fedora-44-x64 | |
| runner: ubuntu-latest | |
| os: fedora:44 | |
| pacman: dnf | |
| aws_arch: x86_64 | |
| - name: OpenSUSE-Tumbleweed-x64 | |
| runner: ubuntu-latest | |
| os: opensuse/tumbleweed | |
| pacman: zypper | |
| aws_arch: x86_64 | |
| - name: Arch-x64 | |
| runner: ubuntu-latest | |
| os: archlinux | |
| pacman: pacman | |
| aws_arch: x86_64 | |
| - name: Ubuntu-24.04-aarch64 | |
| runner: ubuntu-24.04-arm | |
| os: ubuntu:24.04 | |
| pacman: apt | |
| aws_arch: aarch64 | |
| nanovg_gles: true | |
| - name: Ubuntu-26.04-aarch64 | |
| runner: ubuntu-24.04-arm | |
| os: ubuntu:26.04 | |
| pacman: apt | |
| aws_arch: aarch64 | |
| nanovg_gles: true | |
| - name: Debian-aarch64 | |
| runner: ubuntu-24.04-arm | |
| os: debian | |
| pacman: apt | |
| aws_arch: aarch64 | |
| nanovg_gles: true | |
| - name: Fedora-43-aarch64 | |
| runner: ubuntu-24.04-arm | |
| os: fedora:43 | |
| pacman: dnf | |
| aws_arch: aarch64 | |
| nanovg_gles: true | |
| - name: Fedora-44-aarch64 | |
| runner: ubuntu-24.04-arm | |
| os: fedora:44 | |
| pacman: dnf | |
| aws_arch: aarch64 | |
| nanovg_gles: true | |
| - name: OpenSUSE-Tumbleweed-aarch64 | |
| runner: ubuntu-24.04-arm | |
| os: opensuse/tumbleweed | |
| pacman: zypper | |
| aws_arch: aarch64 | |
| nanovg_gles: true | |
| - name: Arch-aarch64 | |
| runner: ubuntu-24.04-arm | |
| os: agners/archlinuxarm | |
| pacman: pacman | |
| aws_arch: aarch64 | |
| nanovg_gles: true | |
| steps: | |
| - name: Install Dependencies (dnf) | |
| if: ${{ matrix.pacman == 'dnf' }} | |
| run: > | |
| dnf install -y | |
| git cmake alsa-lib-devel libXinerama-devel freetype-devel | |
| curl libcurl-devel wget bzip2 gcc-c++ libXi-devel | |
| libXcomposite-devel freeglut-devel libXrandr-devel | |
| libXcursor-devel xz ccache python python3-pip | |
| jack-audio-connection-kit-devel libatomic unzip ninja-build | |
| fontconfig-devel libxkbcommon-devel wayland-devel libdecor-devel | |
| - name: Install Dependencies (apt) | |
| if: ${{ matrix.pacman == 'apt' }} | |
| run: > | |
| apt update && | |
| DEBIAN_FRONTEND=noninteractive TZ="Europe/Amsterdam" | |
| apt install -y | |
| cmake git wget bzip2 build-essential libasound2-dev | |
| libjack-jackd2-dev curl libcurl4-openssl-dev libfreetype6-dev | |
| libx11-dev libxi-dev libxcomposite-dev libxcursor-dev | |
| libxext-dev libxrandr-dev libxkbcommon-dev libxinerama-dev | |
| ccache python3 python3-pip freeglut3-dev unzip ninja-build | |
| libfontconfig-dev libwayland-dev libdecor-0-dev libegl1-mesa-dev | |
| - name: Install Dependencies (zypper) | |
| if: ${{ matrix.pacman == 'zypper' }} | |
| run: > | |
| zypper dup -y && | |
| zypper install -y | |
| git rsync wget bzip2 xz tar cmake alsa-devel | |
| libXinerama-devel libXi-devel libcurl-devel libXcomposite-devel | |
| freeglut-devel libXrandr-devel libXcursor-devel freetype2-devel | |
| gcc gcc-c++ curl ccache python3 libjack-devel gawk unzip ninja | |
| fontconfig-devel libxkbcommon-devel wayland-devel libdecor-devel | |
| Mesa-libEGL-devel | |
| - name: Install Dependencies (pacman) | |
| if: ${{ matrix.pacman == 'pacman' }} | |
| run: > | |
| pacman --noconfirm -Syu && | |
| pacman -S --noconfirm | |
| tar cmake wget bzip2 git alsa-lib freetype2 libx11 libxcursor | |
| libxi libxcomposite libxext libxinerama libxrandr libxrender | |
| make gcc pkgconf python python-pip curl ccache freeglut mesa | |
| glfw-x11 glew jack2 openssl unzip ninja fontconfig libxkbcommon | |
| wayland libdecor | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Update cmake | |
| working-directory: ${{ github.workspace }} | |
| run: ./.github/scripts/install-cmake.sh | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ matrix.name }} | |
| max-size: 800M | |
| - name: Configure | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| EXTRA_ARGS="" | |
| if [ "${{ matrix.nanovg_gles }}" = "true" ]; then | |
| EXTRA_ARGS="-DNANOVG_GLES_IMPLEMENTATION=1" | |
| fi | |
| CXX=g++ cmake -Bbuild -GNinja \ | |
| $EXTRA_ARGS \ | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| - name: Build | |
| working-directory: ${{ github.workspace }} | |
| run: cmake --build build --config Release | |
| - name: Prepare Artefacts | |
| working-directory: ${{ github.workspace }} | |
| run: ./.github/scripts/package-Linux.sh plugdata-${{ matrix.name }}.tar.xz | |
| - name: Upload to Cloud Storage | |
| if: github.ref == 'refs/heads/develop' | |
| run: | | |
| curl "https://awscli.amazonaws.com/awscli-exe-linux-${{ matrix.aws_arch }}.zip" -o awscliv2.zip | |
| unzip awscliv2.zip | |
| ./aws/install | |
| aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY }} | |
| aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_KEY }} | |
| aws configure set default.region eu-north-1 | |
| aws s3 cp ./plugdata-${{ matrix.name }}.tar.xz s3://plugdata-nightly/ | |
| aws s3 cp ./plugdata-${{ matrix.name }}.tar.xz.txt s3://plugdata-nightly/ | |
| aws cloudfront create-invalidation \ | |
| --distribution-id E3OV68BQRGDGE2 \ | |
| --paths \ | |
| "/plugdata-${{ matrix.name }}.tar.xz" \ | |
| "/plugdata-${{ matrix.name }}.tar.xz.txt" | |
| - name: Archive Artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: plugdata-${{ matrix.name }} | |
| path: plugdata-${{ matrix.name }}.tar.xz | |
| push-nightlies: | |
| runs-on: ubuntu-latest | |
| needs: | |
| [ | |
| macos-build, | |
| windows-build, | |
| linux-build, | |
| ] | |
| if: always() && github.ref == 'refs/heads/develop' | |
| steps: | |
| - name: Invalidate CloudFront Cache | |
| run: | | |
| aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY }} | |
| aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_KEY }} | |
| aws configure set default.region eu-north-1 | |
| aws cloudfront create-invalidation \ | |
| --distribution-id E3OV68BQRGDGE2 \ | |
| --paths "/*" | |
| package-all-artifacts: | |
| runs-on: ubuntu-latest | |
| needs: | |
| [ | |
| macos-build, | |
| windows-build, | |
| linux-build, | |
| ] | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: release-package | |
| - name: Upload combined package | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: plugdata-all-platforms | |
| path: release-package |