|
| 1 | +name: CMake |
| 2 | + |
| 3 | +on: [push, workflow_dispatch] |
| 4 | + |
| 5 | +env: |
| 6 | + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) |
| 7 | + BUILD_TYPE: Release |
| 8 | + CMAKE_BUILD_PARALLEL_LEVEL: 4 |
| 9 | + |
| 10 | +jobs: |
| 11 | + macos-universal-build: |
| 12 | + runs-on: macos-latest |
| 13 | + |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + with: |
| 17 | + submodules: recursive |
| 18 | + fetch-depth: 0 |
| 19 | + |
| 20 | + - name: ccache |
| 21 | + uses: hendrikmuhs/ccache-action@v1.2 |
| 22 | + with: |
| 23 | + key: macos |
| 24 | + |
| 25 | + - name: Build plugins |
| 26 | + run: | |
| 27 | + python3 ./build.py |
| 28 | + move Build Build-macOS-Universal |
| 29 | +
|
| 30 | + - name: Archive Artifacts |
| 31 | + uses: actions/upload-artifact@v4 |
| 32 | + with: |
| 33 | + name: Build-macOS-Universal |
| 34 | + path: Build-macOS-Universal |
| 35 | + |
| 36 | + macos-legacy-build: |
| 37 | + runs-on: macos-13 |
| 38 | + |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v4 |
| 41 | + with: |
| 42 | + submodules: recursive |
| 43 | + fetch-depth: 0 |
| 44 | + |
| 45 | + - name: ccache |
| 46 | + uses: hendrikmuhs/ccache-action@v1.2 |
| 47 | + with: |
| 48 | + key: macos-legacy |
| 49 | + |
| 50 | + - name: Build plugins |
| 51 | + run: | |
| 52 | + python3 ./build.py |
| 53 | + move Build Build-macOS-Legacy |
| 54 | +
|
| 55 | + - name: Archive Artifacts |
| 56 | + uses: actions/upload-artifact@v4 |
| 57 | + with: |
| 58 | + name: Build-macOS-Legacy |
| 59 | + path: Build-macOS-Legacy |
| 60 | + |
| 61 | + windows-64-build: |
| 62 | + runs-on: windows-2022 |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v4 |
| 65 | + with: |
| 66 | + submodules: recursive |
| 67 | + fetch-depth: 0 |
| 68 | + |
| 69 | + - name: Build plugins |
| 70 | + run: | |
| 71 | + python3 ./build.py |
| 72 | + move Build Build-Win64 |
| 73 | +
|
| 74 | + - name: Archive Artifacts |
| 75 | + uses: actions/upload-artifact@v4 |
| 76 | + with: |
| 77 | + name: Build-Win64 |
| 78 | + path: Build-Win64 |
| 79 | + |
| 80 | + windows-32-build: |
| 81 | + runs-on: windows-2022 |
| 82 | + |
| 83 | + steps: |
| 84 | + - uses: actions/checkout@v4 |
| 85 | + with: |
| 86 | + submodules: recursive |
| 87 | + fetch-depth: 0 |
| 88 | + |
| 89 | + - name: Build plugins |
| 90 | + run: | |
| 91 | + python3 ./build.py |
| 92 | + move Build Build-Win32 |
| 93 | +
|
| 94 | + - name: Archive Artifacts |
| 95 | + uses: actions/upload-artifact@v4 |
| 96 | + with: |
| 97 | + name: Build-Win32 |
| 98 | + path: Build-Win32 |
| 99 | + |
| 100 | + linux-x64-build: |
| 101 | + name: ${{ matrix.name }} |
| 102 | + runs-on: ubuntu-latest |
| 103 | + container: |
| 104 | + image: ${{ matrix.os }} |
| 105 | + options: --privileged |
| 106 | + volumes: |
| 107 | + - /sys/fs/cgroup:/sys/fs/cgroup |
| 108 | + |
| 109 | + strategy: |
| 110 | + fail-fast: false |
| 111 | + matrix: |
| 112 | + include: |
| 113 | + - name: Ubuntu-22.04-x64 |
| 114 | + os: ubuntu:22.04 |
| 115 | + pacman: apt |
| 116 | + - name: Ubuntu-24.04-x64 |
| 117 | + os: ubuntu:24.04 |
| 118 | + pacman: apt |
| 119 | + - name: Debian-x64 |
| 120 | + os: debian |
| 121 | + pacman: apt |
| 122 | + - name: Fedora-41-x64 |
| 123 | + os: fedora:41 |
| 124 | + pacman: dnf |
| 125 | + - name: Fedora-42-x64 |
| 126 | + os: fedora:42 |
| 127 | + pacman: dnf |
| 128 | + - name: OpenSUSE-Tumbleweed-x64 |
| 129 | + os: opensuse/tumbleweed |
| 130 | + pacman: zypper |
| 131 | + - name: Arch-x64 |
| 132 | + os: archlinux |
| 133 | + pacman: pacman |
| 134 | + |
| 135 | + steps: |
| 136 | + - name: Install Dependencies (dnf) |
| 137 | + if: ${{ matrix.pacman == 'dnf' }} |
| 138 | + 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 |
| 139 | + |
| 140 | + - name: Install Dependencies (apt) |
| 141 | + if: ${{ matrix.pacman == 'apt' }} |
| 142 | + 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 libxcursor-dev libxext-dev libxrandr-dev libxinerama-dev ccache python3 python3-pip freeglut3-dev unzip |
| 143 | + |
| 144 | + - name: Install Dependencies (zypper) |
| 145 | + if: ${{ matrix.pacman == 'zypper' }} |
| 146 | + run: zypper refresh && 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 |
| 147 | + |
| 148 | + - name: Install Dependencies (pacman) |
| 149 | + if: ${{ matrix.pacman == 'pacman' }} |
| 150 | + run: pacman -Sy && pacman -S --noconfirm cmake wget bzip2 git alsa-lib freetype2 libx11 libxcursor libxi libxext libxinerama libxrandr libxrender webkit2gtk cmake make gcc pkgconf python python-pip curl ccache freeglut mesa glfw-x11 glew jack2 openssl unzip && pacman --noconfirm -Syu |
| 151 | + |
| 152 | + - uses: actions/checkout@v4 |
| 153 | + with: |
| 154 | + submodules: recursive |
| 155 | + fetch-depth: 0 |
| 156 | + |
| 157 | + - name: Build plugins |
| 158 | + run: | |
| 159 | + python3 ./build.py |
| 160 | + move Build Build-${{ matrix.name }} |
| 161 | +
|
| 162 | + - name: Archive Artifacts |
| 163 | + uses: actions/upload-artifact@v4 |
| 164 | + with: |
| 165 | + name: Build-${{ matrix.name }} |
| 166 | + path: Build-${{ matrix.name }} |
| 167 | + |
| 168 | + linux-arm-build: |
| 169 | + name: ${{ matrix.name }} |
| 170 | + runs-on: ubuntu-24.04-arm |
| 171 | + container: |
| 172 | + image: ${{ matrix.os }} |
| 173 | + options: --privileged |
| 174 | + volumes: |
| 175 | + - /sys/fs/cgroup:/sys/fs/cgroup |
| 176 | + |
| 177 | + strategy: |
| 178 | + fail-fast: false |
| 179 | + matrix: |
| 180 | + include: |
| 181 | + - name: Ubuntu-22.04-aarch64 |
| 182 | + os: ubuntu:22.04 |
| 183 | + pacman: apt |
| 184 | + - name: Ubuntu-24.04-aarch64 |
| 185 | + os: ubuntu:24.04 |
| 186 | + pacman: apt |
| 187 | + - name: Debian-aarch64 |
| 188 | + os: debian |
| 189 | + pacman: apt |
| 190 | + - name: Fedora-41-aarch64 |
| 191 | + os: fedora:41 |
| 192 | + pacman: dnf |
| 193 | + - name: Fedora-42-aarch64 |
| 194 | + os: fedora:42 |
| 195 | + pacman: dnf |
| 196 | + |
| 197 | + steps: |
| 198 | + - name: Install Dependencies (dnf) |
| 199 | + if: ${{ matrix.pacman == 'dnf' }} |
| 200 | + 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 |
| 201 | + |
| 202 | + - name: Install Dependencies (apt) |
| 203 | + if: ${{ matrix.pacman == 'apt' }} |
| 204 | + 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 libxcursor-dev libxext-dev libxrandr-dev libxinerama-dev ccache python3 python3-pip freeglut3-dev unzip |
| 205 | + |
| 206 | + - uses: actions/checkout@v4 |
| 207 | + with: |
| 208 | + submodules: recursive |
| 209 | + fetch-depth: 0 |
| 210 | + |
| 211 | + - name: Update cmake |
| 212 | + working-directory: ${{github.workspace}} |
| 213 | + run: ./.github/scripts/install-cmake.sh |
| 214 | + |
| 215 | + - name: ccache |
| 216 | + uses: hendrikmuhs/ccache-action@v1.2 |
| 217 | + with: |
| 218 | + key: ${{ matrix.name }} |
| 219 | + |
| 220 | + - name: Configure |
| 221 | + working-directory: ${{github.workspace}} |
| 222 | + run: mkdir build && cd build && CXX=g++ cmake -DNANOVG_GLES_IMPLEMENTATION=1 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .. -G "Unix Makefiles" |
| 223 | + |
| 224 | + - name: Build |
| 225 | + working-directory: ${{github.workspace}}/build |
| 226 | + run: cmake --build . --config $BUILD_TYPE |
| 227 | + |
| 228 | + - name: Prepare Artefacts |
| 229 | + working-directory: ${{github.workspace}} |
| 230 | + run: ./.github/scripts/package-Linux.sh plugdata-${{ matrix.name }}.tar.xz |
| 231 | + |
| 232 | + - name: Upload to Cloud Storage |
| 233 | + if: github.ref == 'refs/heads/develop' |
| 234 | + run: | |
| 235 | + curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" |
| 236 | + unzip awscliv2.zip |
| 237 | + ./aws/install |
| 238 | + aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY }} |
| 239 | + aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_KEY }} |
| 240 | + aws configure set default.region eu-north-1 |
| 241 | + aws s3 cp ./plugdata-${{ matrix.name }}.tar.xz s3://plugdata-nightly/ |
| 242 | + aws s3 cp ./plugdata-${{ matrix.name }}.tar.xz.txt s3://plugdata-nightly/ |
| 243 | +
|
| 244 | + - name: Archive Artifacts |
| 245 | + uses: actions/upload-artifact@v4 |
| 246 | + with: |
| 247 | + name: plugdata-${{ matrix.name }} |
| 248 | + path: plugdata-${{ matrix.name }}.tar.xz |
| 249 | + |
| 250 | + - name: Release Artifacts |
| 251 | + uses: softprops/action-gh-release@v1 |
| 252 | + if: startsWith(github.ref, 'refs/tags/') |
| 253 | + with: |
| 254 | + prerelease: true |
| 255 | + draft: true |
| 256 | + files: plugdata-${{ matrix.name }} |
0 commit comments