|
| 1 | +name: Build Orbit Looper |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +env: |
| 10 | + BUILD_TYPE: Release |
| 11 | + |
| 12 | +jobs: |
| 13 | + # =========================================================================== |
| 14 | + # WINDOWS BUILD (x64) |
| 15 | + # =========================================================================== |
| 16 | + build-windows-x64: |
| 17 | + if: true |
| 18 | + runs-on: windows-latest |
| 19 | + steps: |
| 20 | + - name: Checkout |
| 21 | + uses: actions/checkout@v4 |
| 22 | + |
| 23 | + - name: Install WebView2 (NuGet) |
| 24 | + run: | |
| 25 | + Register-PackageSource -ProviderName NuGet -Name nugetRepository -Location https://www.nuget.org/api/v2 -Force |
| 26 | + Install-Package Microsoft.Web.WebView2 -Scope CurrentUser -RequiredVersion 1.0.3485.44 -Source nugetRepository -Force |
| 27 | +
|
| 28 | + - name: Configure CMake |
| 29 | + run: cmake -S . -B build -G "Visual Studio 17 2022" -A x64 |
| 30 | + |
| 31 | + - name: Build |
| 32 | + run: cmake --build build --config ${{ env.BUILD_TYPE }} --parallel |
| 33 | + |
| 34 | + - name: Upload VST3 |
| 35 | + uses: actions/upload-artifact@v4 |
| 36 | + with: |
| 37 | + name: OrbitLooper-Windows-x64-VST3 |
| 38 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/VST3/ |
| 39 | + |
| 40 | + - name: Upload Standalone |
| 41 | + uses: actions/upload-artifact@v4 |
| 42 | + with: |
| 43 | + name: OrbitLooper-Windows-x64-Standalone |
| 44 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/Standalone/ |
| 45 | + |
| 46 | + # =========================================================================== |
| 47 | + # WINDOWS BUILD (ARM64) |
| 48 | + # =========================================================================== |
| 49 | + build-windows-arm64: |
| 50 | + if: true |
| 51 | + runs-on: windows-latest |
| 52 | + steps: |
| 53 | + - name: Checkout |
| 54 | + uses: actions/checkout@v4 |
| 55 | + |
| 56 | + - name: Install WebView2 (NuGet) |
| 57 | + run: | |
| 58 | + Register-PackageSource -ProviderName NuGet -Name nugetRepository -Location https://www.nuget.org/api/v2 -Force |
| 59 | + Install-Package Microsoft.Web.WebView2 -Scope CurrentUser -RequiredVersion 1.0.3485.44 -Source nugetRepository -Force |
| 60 | +
|
| 61 | + - name: Configure CMake |
| 62 | + run: cmake -S . -B build -G "Visual Studio 17 2022" -A ARM64 -DCMAKE_SYSTEM_PROCESSOR=arm64 |
| 63 | + |
| 64 | + - name: Verify ARM64 WebView2 mode |
| 65 | + shell: pwsh |
| 66 | + run: | |
| 67 | + $vcxproj = Get-Content build/OrbitLooper_VST3.vcxproj -Raw |
| 68 | + if ($vcxproj -notmatch 'JUCE_USE_WIN_WEBVIEW2_WITH_STATIC_LINKING=1') { |
| 69 | + Write-Error "ARM64 build is expected to use static WebView2 loader in this project" |
| 70 | + exit 1 |
| 71 | + } |
| 72 | +
|
| 73 | + if ($vcxproj -match 'build\\native\\x64\\WebView2LoaderStatic\.lib') { |
| 74 | + Write-Error "ARM64 build is still resolving x64 WebView2LoaderStatic.lib" |
| 75 | + exit 1 |
| 76 | + } |
| 77 | +
|
| 78 | + if ($vcxproj -notmatch 'build\\native\\arm64\\WebView2LoaderStatic\.lib') { |
| 79 | + Write-Error "ARM64 WebView2LoaderStatic.lib was not selected" |
| 80 | + exit 1 |
| 81 | + } |
| 82 | +
|
| 83 | + Write-Host "ARM64 verification passed: ARM64 static WebView2 loader is linked" |
| 84 | +
|
| 85 | + - name: Build |
| 86 | + run: cmake --build build --config ${{ env.BUILD_TYPE }} --parallel |
| 87 | + |
| 88 | + - name: Upload VST3 |
| 89 | + uses: actions/upload-artifact@v4 |
| 90 | + with: |
| 91 | + name: OrbitLooper-Windows-ARM64-VST3 |
| 92 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/VST3/ |
| 93 | + |
| 94 | + - name: Upload Standalone |
| 95 | + uses: actions/upload-artifact@v4 |
| 96 | + with: |
| 97 | + name: OrbitLooper-Windows-ARM64-Standalone |
| 98 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/Standalone/ |
| 99 | + |
| 100 | + # =========================================================================== |
| 101 | + # MACOS BUILD |
| 102 | + # =========================================================================== |
| 103 | + build-macos: |
| 104 | + if: true |
| 105 | + runs-on: macos-latest |
| 106 | + steps: |
| 107 | + - name: Checkout |
| 108 | + uses: actions/checkout@v4 |
| 109 | + |
| 110 | + - name: Configure CMake |
| 111 | + run: cmake -S . -B build -G Xcode -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" |
| 112 | + |
| 113 | + - name: Build |
| 114 | + run: cmake --build build --config ${{ env.BUILD_TYPE }} -- -quiet |
| 115 | + |
| 116 | + - name: Upload VST3 |
| 117 | + uses: actions/upload-artifact@v4 |
| 118 | + with: |
| 119 | + name: OrbitLooper-macOS-VST3 |
| 120 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/VST3/ |
| 121 | + |
| 122 | + - name: Upload AU |
| 123 | + uses: actions/upload-artifact@v4 |
| 124 | + with: |
| 125 | + name: OrbitLooper-macOS-AU |
| 126 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/AU/ |
| 127 | + |
| 128 | + - name: Upload Standalone |
| 129 | + uses: actions/upload-artifact@v4 |
| 130 | + with: |
| 131 | + name: OrbitLooper-macOS-Standalone |
| 132 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/Standalone/ |
| 133 | + |
| 134 | + # =========================================================================== |
| 135 | + # LINUX BUILD (x64) |
| 136 | + # =========================================================================== |
| 137 | + build-linux-x64: |
| 138 | + if: true |
| 139 | + runs-on: ubuntu-latest |
| 140 | + steps: |
| 141 | + - name: Checkout |
| 142 | + uses: actions/checkout@v4 |
| 143 | + |
| 144 | + - name: Install Dependencies |
| 145 | + run: | |
| 146 | + sudo apt-get update |
| 147 | + sudo apt-get install -y \ |
| 148 | + build-essential cmake git \ |
| 149 | + libasound2-dev libjack-jackd2-dev \ |
| 150 | + libfreetype6-dev libx11-dev libxrandr-dev libxinerama-dev \ |
| 151 | + libxcursor-dev libxcomposite-dev \ |
| 152 | + mesa-common-dev libglu1-mesa-dev \ |
| 153 | + libwebkit2gtk-4.1-dev libgtk-3-dev \ |
| 154 | + libcurl4-openssl-dev \ |
| 155 | + xvfb |
| 156 | +
|
| 157 | + - name: Configure CMake |
| 158 | + run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} |
| 159 | + |
| 160 | + - name: Build VST3 |
| 161 | + run: NO_AT_BRIDGE=1 LIBGL_ALWAYS_SOFTWARE=1 xvfb-run -a cmake --build build --target OrbitLooper_VST3 -j$(nproc) |
| 162 | + |
| 163 | + - name: Build LV2 (with xvfb) |
| 164 | + run: NO_AT_BRIDGE=1 LIBGL_ALWAYS_SOFTWARE=1 xvfb-run -a cmake --build build --target OrbitLooper_LV2 -j$(nproc) |
| 165 | + |
| 166 | + - name: Build Standalone (with xvfb) |
| 167 | + run: NO_AT_BRIDGE=1 LIBGL_ALWAYS_SOFTWARE=1 xvfb-run -a cmake --build build --target OrbitLooper_Standalone -j$(nproc) |
| 168 | + |
| 169 | + - name: Upload VST3 |
| 170 | + uses: actions/upload-artifact@v4 |
| 171 | + with: |
| 172 | + name: OrbitLooper-Linux-x64-VST3 |
| 173 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/VST3/ |
| 174 | + |
| 175 | + - name: Upload LV2 |
| 176 | + uses: actions/upload-artifact@v4 |
| 177 | + with: |
| 178 | + name: OrbitLooper-Linux-x64-LV2 |
| 179 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/LV2/ |
| 180 | + |
| 181 | + - name: Upload Standalone |
| 182 | + uses: actions/upload-artifact@v4 |
| 183 | + with: |
| 184 | + name: OrbitLooper-Linux-x64-Standalone |
| 185 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/Standalone/ |
| 186 | + |
| 187 | + # =========================================================================== |
| 188 | + # LINUX BUILD (ARM64 — Raspberry Pi, etc.) |
| 189 | + # =========================================================================== |
| 190 | + build-linux-arm64: |
| 191 | + if: true |
| 192 | + runs-on: ubuntu-24.04-arm |
| 193 | + steps: |
| 194 | + - name: Checkout |
| 195 | + uses: actions/checkout@v4 |
| 196 | + |
| 197 | + - name: Install Dependencies |
| 198 | + run: | |
| 199 | + sudo apt-get update |
| 200 | + sudo apt-get install -y \ |
| 201 | + build-essential cmake git \ |
| 202 | + libasound2-dev libjack-jackd2-dev \ |
| 203 | + libfreetype6-dev libx11-dev libxrandr-dev libxinerama-dev \ |
| 204 | + libxcursor-dev libxcomposite-dev \ |
| 205 | + mesa-common-dev libglu1-mesa-dev \ |
| 206 | + libwebkit2gtk-4.1-dev libgtk-3-dev \ |
| 207 | + libcurl4-openssl-dev \ |
| 208 | + xvfb |
| 209 | +
|
| 210 | + - name: Configure CMake |
| 211 | + run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} |
| 212 | + |
| 213 | + - name: Build VST3 |
| 214 | + run: NO_AT_BRIDGE=1 GDK_BACKEND=x11 LIBGL_ALWAYS_SOFTWARE=1 xvfb-run -a cmake --build build --target OrbitLooper_VST3 -j2 |
| 215 | + |
| 216 | + - name: Build LV2 (with xvfb) |
| 217 | + run: NO_AT_BRIDGE=1 GDK_BACKEND=x11 LIBGL_ALWAYS_SOFTWARE=1 xvfb-run -a cmake --build build --target OrbitLooper_LV2 -j2 |
| 218 | + |
| 219 | + - name: Build Standalone (with xvfb) |
| 220 | + run: NO_AT_BRIDGE=1 GDK_BACKEND=x11 LIBGL_ALWAYS_SOFTWARE=1 xvfb-run -a cmake --build build --target OrbitLooper_Standalone -j2 |
| 221 | + |
| 222 | + - name: Upload VST3 |
| 223 | + uses: actions/upload-artifact@v4 |
| 224 | + with: |
| 225 | + name: OrbitLooper-Linux-ARM64-VST3 |
| 226 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/VST3/ |
| 227 | + |
| 228 | + - name: Upload LV2 |
| 229 | + uses: actions/upload-artifact@v4 |
| 230 | + with: |
| 231 | + name: OrbitLooper-Linux-ARM64-LV2 |
| 232 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/LV2/ |
| 233 | + |
| 234 | + - name: Upload Standalone |
| 235 | + uses: actions/upload-artifact@v4 |
| 236 | + with: |
| 237 | + name: OrbitLooper-Linux-ARM64-Standalone |
| 238 | + path: build/OrbitLooper_artefacts/${{ env.BUILD_TYPE }}/Standalone/ |
| 239 | + |
| 240 | + # =========================================================================== |
| 241 | + # CREATE RELEASE (on tag push only) |
| 242 | + # =========================================================================== |
| 243 | + release: |
| 244 | + if: true |
| 245 | + needs: [build-windows-x64, build-windows-arm64, build-macos, build-linux-x64, build-linux-arm64] |
| 246 | + runs-on: ubuntu-latest |
| 247 | + permissions: |
| 248 | + contents: write |
| 249 | + steps: |
| 250 | + - name: Download all artifacts |
| 251 | + uses: actions/download-artifact@v4 |
| 252 | + with: |
| 253 | + path: artifacts/ |
| 254 | + |
| 255 | + - name: Package archives |
| 256 | + run: | |
| 257 | + cd artifacts |
| 258 | + for dir in */; do |
| 259 | + name="${dir%/}" |
| 260 | + zip -r "../${name}.zip" "$dir" |
| 261 | + done |
| 262 | +
|
| 263 | + - name: Create GitHub Release |
| 264 | + uses: softprops/action-gh-release@v2 |
| 265 | + with: |
| 266 | + files: '*.zip' |
| 267 | + generate_release_notes: true |
| 268 | + draft: false |
| 269 | + prerelease: false |
0 commit comments