WIP #2
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: Test CMake | |
| on: | |
| push: | |
| paths: | |
| - 'iPlug2/Scripts/cmake/**' | |
| - 'iPlug2/iPlug2.cmake' | |
| - '**/CMakeLists.txt' | |
| - '.github/workflows/test-cmake.yml' | |
| pull_request: | |
| paths: | |
| - 'iPlug2/Scripts/cmake/**' | |
| - 'iPlug2/iPlug2.cmake' | |
| - '**/CMakeLists.txt' | |
| workflow_dispatch: | |
| env: | |
| PROJECT_NAME: TemplateProject | |
| jobs: | |
| # ========================================================================== | |
| # macOS - Xcode Generator | |
| # ========================================================================== | |
| macos-xcode: | |
| name: macOS Xcode | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Cache IPlug SDKs | |
| id: cache-sdks | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| iPlug2/Dependencies/IPlug/VST3_SDK | |
| iPlug2/Dependencies/IPlug/CLAP_SDK | |
| iPlug2/Dependencies/IPlug/CLAP_HELPERS | |
| key: iplug-sdks-${{ hashFiles('iPlug2/Dependencies/IPlug/download-iplug-sdks.sh') }} | |
| - name: Get SDKs | |
| if: steps.cache-sdks.outputs.cache-hit != 'true' | |
| run: | | |
| cd iPlug2/Dependencies/IPlug | |
| ./download-iplug-sdks.sh | |
| - name: CMake Generate (Xcode) | |
| run: | | |
| cmake -G Xcode -B build-xcode -S . | |
| test -d build-xcode/iPlug2OOS.xcodeproj | |
| - name: Build (Xcode) | |
| run: | | |
| xcodebuild -project build-xcode/iPlug2OOS.xcodeproj \ | |
| -scheme ALL_BUILD \ | |
| -configuration Release \ | |
| -quiet | |
| - name: Verify Bundles | |
| run: | | |
| test -d build-xcode/out/Release/${{env.PROJECT_NAME}}.app | |
| test -d build-xcode/out/Release/${{env.PROJECT_NAME}}.vst3 | |
| test -d build-xcode/out/Release/${{env.PROJECT_NAME}}.clap | |
| test -d build-xcode/out/Release/${{env.PROJECT_NAME}}.component | |
| echo "All bundles exist" | |
| # ========================================================================== | |
| # macOS - Xcode Generator (Universal) | |
| # ========================================================================== | |
| macos-xcode-universal: | |
| name: macOS Xcode Universal | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Cache IPlug SDKs | |
| id: cache-sdks | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| iPlug2/Dependencies/IPlug/VST3_SDK | |
| iPlug2/Dependencies/IPlug/CLAP_SDK | |
| iPlug2/Dependencies/IPlug/CLAP_HELPERS | |
| key: iplug-sdks-${{ hashFiles('iPlug2/Dependencies/IPlug/download-iplug-sdks.sh') }} | |
| - name: Get SDKs | |
| if: steps.cache-sdks.outputs.cache-hit != 'true' | |
| run: | | |
| cd iPlug2/Dependencies/IPlug | |
| ./download-iplug-sdks.sh | |
| - name: CMake Generate (Xcode Universal) | |
| run: | | |
| cmake -G Xcode -B build-xcode-universal -S . -DIPLUG2_UNIVERSAL=ON | |
| test -d build-xcode-universal/iPlug2OOS.xcodeproj | |
| - name: Build (Xcode Universal) | |
| run: | | |
| xcodebuild -project build-xcode-universal/iPlug2OOS.xcodeproj \ | |
| -scheme ALL_BUILD \ | |
| -configuration Release \ | |
| -destination "generic/platform=macOS" \ | |
| -quiet | |
| - name: Verify Universal Binaries | |
| run: | | |
| APP_EXEC="build-xcode-universal/out/Release/${{env.PROJECT_NAME}}.app/Contents/MacOS/${{env.PROJECT_NAME}}" | |
| ARCHS=$(lipo -archs "$APP_EXEC") | |
| echo "APP architectures: $ARCHS" | |
| [[ "$ARCHS" == *"arm64"* ]] && [[ "$ARCHS" == *"x86_64"* ]] || exit 1 | |
| echo "Universal binary verified" | |
| # ========================================================================== | |
| # macOS - Ninja Generator | |
| # ========================================================================== | |
| macos-ninja: | |
| name: macOS Ninja | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Ninja | |
| run: brew install ninja | |
| - name: Cache IPlug SDKs | |
| id: cache-sdks | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| iPlug2/Dependencies/IPlug/VST3_SDK | |
| iPlug2/Dependencies/IPlug/CLAP_SDK | |
| iPlug2/Dependencies/IPlug/CLAP_HELPERS | |
| key: iplug-sdks-${{ hashFiles('iPlug2/Dependencies/IPlug/download-iplug-sdks.sh') }} | |
| - name: Get SDKs | |
| if: steps.cache-sdks.outputs.cache-hit != 'true' | |
| run: | | |
| cd iPlug2/Dependencies/IPlug | |
| ./download-iplug-sdks.sh | |
| - name: CMake Generate (Ninja) | |
| run: | | |
| cmake -G Ninja -B build-ninja -S . -DCMAKE_BUILD_TYPE=Release | |
| test -f build-ninja/build.ninja | |
| - name: Build (Ninja) | |
| run: ninja -C build-ninja | |
| - name: Verify Bundles | |
| run: | | |
| test -d build-ninja/out/${{env.PROJECT_NAME}}.app | |
| test -d build-ninja/out/${{env.PROJECT_NAME}}.vst3 | |
| test -d build-ninja/out/${{env.PROJECT_NAME}}.clap | |
| test -d build-ninja/out/${{env.PROJECT_NAME}}.component | |
| echo "All bundles exist" | |
| # ========================================================================== | |
| # macOS - IGraphics Backends Matrix | |
| # ========================================================================== | |
| macos-backends: | |
| name: macOS ${{ matrix.backend }}/${{ matrix.renderer }} | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - backend: NANOVG | |
| renderer: GL3 | |
| needs_skia: false | |
| - backend: SKIA | |
| renderer: METAL | |
| needs_skia: true | |
| - backend: SKIA | |
| renderer: GL3 | |
| needs_skia: true | |
| - backend: SKIA | |
| renderer: CPU | |
| needs_skia: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Ninja | |
| run: brew install ninja | |
| - name: Cache IPlug SDKs | |
| id: cache-sdks | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| iPlug2/Dependencies/IPlug/VST3_SDK | |
| iPlug2/Dependencies/IPlug/CLAP_SDK | |
| iPlug2/Dependencies/IPlug/CLAP_HELPERS | |
| key: iplug-sdks-${{ hashFiles('iPlug2/Dependencies/IPlug/download-iplug-sdks.sh') }} | |
| - name: Get SDKs | |
| if: steps.cache-sdks.outputs.cache-hit != 'true' | |
| run: | | |
| cd iPlug2/Dependencies/IPlug | |
| ./download-iplug-sdks.sh | |
| - name: Cache Skia Prebuilt Libs | |
| if: matrix.needs_skia | |
| id: cache-skia | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| iPlug2/Dependencies/Build/mac | |
| iPlug2/Dependencies/Build/src/skia | |
| key: skia-prebuilt-mac-${{ hashFiles('iPlug2/Dependencies/download-prebuilt-libs.sh') }} | |
| - name: Get Skia Prebuilt Libs | |
| if: matrix.needs_skia && steps.cache-skia.outputs.cache-hit != 'true' | |
| run: | | |
| cd iPlug2/Dependencies | |
| ./download-prebuilt-libs.sh mac | |
| - name: CMake Generate | |
| run: | | |
| cmake -G Ninja -B build -S . \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DIGRAPHICS_BACKEND=${{ matrix.backend }} \ | |
| -DIGRAPHICS_RENDERER=${{ matrix.renderer }} | |
| - name: Build | |
| run: ninja -C build ${{env.PROJECT_NAME}}-app | |
| - name: Verify App Bundle | |
| run: | | |
| test -d build/out/${{env.PROJECT_NAME}}.app | |
| echo "${{ matrix.backend }}/${{ matrix.renderer }} build successful" | |
| # ========================================================================== | |
| # macOS - Unix Makefiles Generator | |
| # ========================================================================== | |
| macos-make: | |
| name: macOS Make | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Cache IPlug SDKs | |
| id: cache-sdks | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| iPlug2/Dependencies/IPlug/VST3_SDK | |
| iPlug2/Dependencies/IPlug/CLAP_SDK | |
| iPlug2/Dependencies/IPlug/CLAP_HELPERS | |
| key: iplug-sdks-${{ hashFiles('iPlug2/Dependencies/IPlug/download-iplug-sdks.sh') }} | |
| - name: Get SDKs | |
| if: steps.cache-sdks.outputs.cache-hit != 'true' | |
| run: | | |
| cd iPlug2/Dependencies/IPlug | |
| ./download-iplug-sdks.sh | |
| - name: CMake Generate (Make) | |
| run: | | |
| cmake -G "Unix Makefiles" -B build-make -S . -DCMAKE_BUILD_TYPE=Release | |
| test -f build-make/Makefile | |
| - name: Build (Make) | |
| run: make -C build-make -j$(sysctl -n hw.ncpu) | |
| - name: Verify Bundles | |
| run: | | |
| test -d build-make/out/${{env.PROJECT_NAME}}.app | |
| test -d build-make/out/${{env.PROJECT_NAME}}.vst3 | |
| test -d build-make/out/${{env.PROJECT_NAME}}.clap | |
| test -d build-make/out/${{env.PROJECT_NAME}}.component | |
| echo "All bundles exist" | |
| # ========================================================================== | |
| # macOS - iOS (Xcode) | |
| # ========================================================================== | |
| macos-ios: | |
| name: macOS iOS | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Cache IPlug SDKs | |
| id: cache-sdks | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| iPlug2/Dependencies/IPlug/VST3_SDK | |
| iPlug2/Dependencies/IPlug/CLAP_SDK | |
| iPlug2/Dependencies/IPlug/CLAP_HELPERS | |
| key: iplug-sdks-${{ hashFiles('iPlug2/Dependencies/IPlug/download-iplug-sdks.sh') }} | |
| - name: Get SDKs | |
| if: steps.cache-sdks.outputs.cache-hit != 'true' | |
| run: | | |
| cd iPlug2/Dependencies/IPlug | |
| ./download-iplug-sdks.sh | |
| - name: CMake Generate (iOS) | |
| run: | | |
| cmake -G Xcode -B build-ios -S . \ | |
| -DCMAKE_SYSTEM_NAME=iOS \ | |
| -DCMAKE_OSX_DEPLOYMENT_TARGET=15.0 | |
| test -d build-ios/iPlug2OOS.xcodeproj | |
| - name: Build (iOS Simulator) | |
| run: | | |
| xcodebuild -project build-ios/iPlug2OOS.xcodeproj \ | |
| -scheme ALL_BUILD \ | |
| -configuration Release \ | |
| -destination "generic/platform=iOS Simulator" \ | |
| -quiet | |
| - name: Verify iOS App | |
| run: | | |
| test -d "build-ios/out/Release-iphonesimulator/${{env.PROJECT_NAME}}.app" | |
| echo "iOS app bundle exists" | |
| # ========================================================================== | |
| # Windows - Visual Studio Generator (disabled for now) | |
| # ========================================================================== | |
| # windows-vs: | |
| # name: Windows VS2022 | |
| # runs-on: windows-latest | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # with: | |
| # submodules: recursive | |
| # - name: Get SDKs | |
| # shell: bash | |
| # run: | | |
| # cd iPlug2/Dependencies/IPlug | |
| # ./download-iplug-sdks.sh | |
| # - name: CMake Generate (VS2022) | |
| # run: | | |
| # cmake -G "Visual Studio 17 2022" -A x64 -B build-vs -S . | |
| # if (!(Test-Path "build-vs\iPlug2OOS.sln")) { exit 1 } | |
| # shell: pwsh | |
| # - name: Build (VS2022) | |
| # run: cmake --build build-vs --config Release | |
| # - name: Verify Bundles | |
| # run: | | |
| # if (!(Test-Path "build-vs\out\Release\${{env.PROJECT_NAME}}.vst3")) { exit 1 } | |
| # if (!(Test-Path "build-vs\out\Release\${{env.PROJECT_NAME}}.clap")) { exit 1 } | |
| # echo "All bundles exist" | |
| # shell: pwsh | |
| # ========================================================================== | |
| # Windows - Ninja Generator (disabled for now) | |
| # ========================================================================== | |
| # windows-ninja: | |
| # name: Windows Ninja | |
| # runs-on: windows-latest | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # with: | |
| # submodules: recursive | |
| # - name: Get SDKs | |
| # shell: bash | |
| # run: | | |
| # cd iPlug2/Dependencies/IPlug | |
| # ./download-iplug-sdks.sh | |
| # - name: Setup MSVC | |
| # uses: ilammy/msvc-dev-cmd@v1 | |
| # - name: CMake Generate (Ninja) | |
| # run: | | |
| # cmake -G Ninja -B build-ninja -S . -DCMAKE_BUILD_TYPE=Release | |
| # if (!(Test-Path "build-ninja\build.ninja")) { exit 1 } | |
| # shell: pwsh | |
| # - name: Build (Ninja) | |
| # run: ninja -C build-ninja | |
| # - name: Verify Bundles | |
| # run: | | |
| # if (!(Test-Path "build-ninja\out\${{env.PROJECT_NAME}}.vst3")) { exit 1 } | |
| # if (!(Test-Path "build-ninja\out\${{env.PROJECT_NAME}}.clap")) { exit 1 } | |
| # echo "All bundles exist" | |
| # shell: pwsh | |
| # ========================================================================== | |
| # Emscripten - WAM Build | |
| # ========================================================================== | |
| emscripten-wam: | |
| name: Emscripten WAM | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Setup Emscripten | |
| uses: mymindstorm/setup-emsdk@v14 | |
| - name: Patch emcc.py | |
| run: | | |
| sed -i.bak s,"if not js_manipulation.isidentifier(settings.EXPORT_NAME):","if False:",g $EMSDK/upstream/emscripten/emcc.py | |
| - name: Cache WAM SDK | |
| id: cache-wam | |
| uses: actions/cache@v4 | |
| with: | |
| path: iPlug2/Dependencies/IPlug/WAM_SDK | |
| key: wam-sdk-${{ hashFiles('iPlug2/Dependencies/IPlug/download-iplug-sdks.sh') }} | |
| - name: Get WAM SDK | |
| if: steps.cache-wam.outputs.cache-hit != 'true' | |
| run: | | |
| cd iPlug2/Dependencies/IPlug | |
| ./download-iplug-sdks.sh | |
| - name: CMake Generate (Emscripten) | |
| run: | | |
| emcmake cmake -B build-web -S ${{env.PROJECT_NAME}} | |
| test -f build-web/build.ninja | |
| - name: Build WAM | |
| run: cmake --build build-web | |
| - name: Verify WAM Output | |
| run: | | |
| test -f build-web/out/${{env.PROJECT_NAME}}/index.html | |
| test -f build-web/out/${{env.PROJECT_NAME}}/scripts/${{env.PROJECT_NAME}}-wam.js | |
| test -f build-web/out/${{env.PROJECT_NAME}}/scripts/${{env.PROJECT_NAME}}-web.js | |
| test -f build-web/out/${{env.PROJECT_NAME}}/scripts/${{env.PROJECT_NAME}}-web.wasm | |
| echo "WAM distribution verified" | |
| - name: Upload WAM Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{env.PROJECT_NAME}}-wam | |
| path: build-web/out/${{env.PROJECT_NAME}} |