update README.md #200
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: Pamplejuce | |
| on: | |
| workflow_dispatch: # lets you run a build from the UI | |
| push: | |
| pull_request: | |
| # When pushing new commits, cancel any running builds on that branch | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| BUILD_TYPE: Release | |
| BUILD_DIR: Builds | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DISPLAY: :0 # linux pluginval needs this | |
| CMAKE_BUILD_PARALLEL_LEVEL: 3 # Use up to 3 cpus to build juceaide, etc | |
| HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
| SCCACHE_GHA_ENABLED: true | |
| SCCACHE_CACHE_MULTIARCH: 1 | |
| # IPP_DIR is still defined, but the installation step is removed as it was likely broken. | |
| # If IPP is a hard requirement, you must find a modern way to install it. | |
| # If it's optional, your CMake should handle its absence gracefully. | |
| IPP_DIR: C:\Program Files (x86)\Intel\oneAPI\ipp\latest\lib\cmake\ipp | |
| defaults: | |
| run: | |
| shell: bash | |
| # jobs are run in paralell on different machines | |
| # all steps run in series | |
| jobs: | |
| build_and_test: | |
| # don't double run on PRs | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false # show all errors for each platform (vs. cancel jobs on error) | |
| matrix: | |
| include: | |
| - name: Linux | |
| os: ubuntu-22.04 | |
| pluginval-binary: ./pluginval | |
| extra-flags: -G Ninja | |
| - name: macOS | |
| os: macos-14 | |
| pluginval-binary: pluginval.app/Contents/MacOS/pluginval | |
| extra-flags: -G Ninja -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" | |
| - name: Windows | |
| os: windows-latest | |
| pluginval-binary: ./pluginval.exe | |
| steps: | |
| # This is just easier than debugging different compilers on different platforms | |
| - name: Set up Clang | |
| if: ${{ matrix.name != 'macOS' }} | |
| uses: egor-tensin/setup-clang@v1 | |
| # This also starts up our "fake" display Xvfb, needed for pluginval | |
| - name: Install JUCE's Linux Deps | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y libasound2-dev libx11-dev libxinerama-dev libxext-dev libfreetype6-dev libwebkit2gtk-4.0-dev libglu1-mesa-dev xvfb ninja-build | |
| sudo /usr/bin/Xvfb $DISPLAY & | |
| # NOTE: The fragile, hardcoded IPP installation has been removed. | |
| # The build will now proceed without it. If IPP is a requirement, | |
| # you must implement a modern, reliable installation method here. | |
| # For example, using Intel's official command-line installer. | |
| - name: Install Ninja (Windows) | |
| if: runner.os == 'Windows' | |
| run: choco install ninja | |
| - name: Install macOS Deps | |
| if: ${{ matrix.name == 'macOS' }} | |
| run: brew install ninja osxutils | |
| # This block can be removed once 15.1 is default (JUCE requires it when building on macOS 14) | |
| - name: Use latest Xcode on system (macOS) | |
| if: ${{ matrix.name == 'macOS' }} | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| lfs: true | |
| - name: Cache the build | |
| uses: mozilla-actions/[email protected] | |
| - name: Configure | |
| shell: bash | |
| run: cmake -B ${{ env.BUILD_DIR }} -G Ninja -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache }} -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" . | |
| - name: Build | |
| shell: bash | |
| run: cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }} --parallel 4 | |
| - name: Test & Benchmarks | |
| working-directory: ${{ env.BUILD_DIR }} | |
| run: ctest --verbose --output-on-failure | |
| - name: Read in .env from CMake # see GitHubENV.cmake | |
| shell: bash | |
| run: | | |
| cat .env # show us the config | |
| cat .env >> $GITHUB_ENV # pull in our PRODUCT_NAME, etc | |
| - name: Set additional env vars for next steps | |
| shell: bash | |
| run: | | |
| ARTIFACTS_PATH=${{ env.BUILD_DIR }}/${{ env.PROJECT_NAME }}_artefacts/${{ env.BUILD_TYPE }} | |
| echo "ARTIFACTS_PATH=$ARTIFACTS_PATH" >> $GITHUB_ENV | |
| echo "VST3_PATH=$ARTIFACTS_PATH/VST3/${{ env.PRODUCT_NAME }}.vst3" >> $GITHUB_ENV | |
| echo "AU_PATH=$ARTIFACTS_PATH/AU/${{ env.PRODUCT_NAME }}.component" >> $GITHUB_ENV | |
| echo "AUV3_PATH=$ARTIFACTS_PATH/AUv3/${{ env.PRODUCT_NAME }}.appex" >> $GITHUB_ENV | |
| echo "CLAP_PATH=$ARTIFACTS_PATH/CLAP/${{ env.PRODUCT_NAME }}.clap" >> $GITHUB_ENV | |
| echo "STANDALONE_PATH=$ARTIFACTS_PATH/Standalone/${{ env.PRODUCT_NAME }}.app" >> $GITHUB_ENV | |
| echo "ARTIFACT_NAME=${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-${{ matrix.name }}" >> $GITHUB_ENV | |
| - name: Pluginval | |
| shell: bash | |
| run: | | |
| curl -LO "https://github.com/Tracktion/pluginval/releases/download/v1.0.3/pluginval_${{ matrix.name }}.zip" | |
| 7z x pluginval_${{ matrix.name }}.zip | |
| if [ "${{ matrix.name }}" = "macOS" ]; then | |
| echo "Running pluginval on macOS with --skip-gui-tests" | |
| ${{ matrix.pluginval-binary }} --strictness-level 10 --skip-gui-tests --verbose --validate "${{ env.VST3_PATH }}" | |
| else | |
| echo "Running pluginval normally on ${{ matrix.name }}" | |
| ${{ matrix.pluginval-binary }} --strictness-level 10 --verbose --validate "${{ env.VST3_PATH }}" | |
| fi | |
| - name: Add Custom Icons (macOS) | |
| if: ${{ matrix.name == 'macOS' }} | |
| run: | | |
| # add the icns as its own icon resource (meta!) | |
| sips -i packaging/pamplejuce.icns | |
| # Grab the resource, put in tempfile | |
| DeRez -only icns packaging/pamplejuce.icns > /tmp/icons | |
| # Stuff the resource into the strange Icon? file's resource fork | |
| Rez -a /tmp/icons -o "${{ env.VST3_PATH }}/Icon"$'\r' | |
| Rez -a /tmp/icons -o "${{ env.AU_PATH }}/Icon"$'\r' | |
| Rez -a /tmp/icons -o "${{ env.CLAP_PATH }}/Icon"$'\r' | |
| # Set custom icon attribute | |
| SetFile -a C "${{ env.VST3_PATH }}" | |
| SetFile -a C "${{ env.AU_PATH }}" | |
| SetFile -a C "${{ env.CLAP_PATH }}" | |
| - name: Zip (Windows) | |
| if: ${{ matrix.name == 'Windows' }} | |
| working-directory: ${{ env.ARTIFACTS_PATH }} | |
| run: 7z a -tzip "${{ env.ARTIFACT_NAME }}.zip" VST3/ CLAP/ | |
| - name: Zip (macOS) | |
| if: ${{ matrix.name == 'macOS' }} | |
| working-directory: ${{ env.ARTIFACTS_PATH }} | |
| run: 7z a -tzip "${{ env.ARTIFACT_NAME }}.zip" VST3/ AU/ CLAP/ | |
| - name: Zip (Linux) | |
| if: ${{ matrix.name == 'Linux' }} | |
| working-directory: ${{ env.ARTIFACTS_PATH }} | |
| run: 7z a -tzip "${{ env.ARTIFACT_NAME }}.zip" "-xr!lib${{ env.PRODUCT_NAME }}_SharedCode.a" . | |
| - name: Upload Zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ARTIFACT_NAME }}.zip | |
| path: "${{ env.ARTIFACTS_PATH }}/${{ env.ARTIFACT_NAME }}.zip" | |
| release: | |
| if: contains(github.ref, 'tags/v') | |
| runs-on: ubuntu-latest | |
| needs: build_and_test | |
| steps: | |
| - name: Get Artifacts | |
| uses: actions/download-artifact@v5 | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| prerelease: true | |
| # download-artifact puts these files in their own dirs... | |
| # Using globs sidesteps having to pass the version around | |
| files: | | |
| */*.exe | |
| */*.zip | |
| */*.dmg |