fix: keep license paths intact under non-ASCII Windows user folders #65
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: JUCE module | |
| # Builds the moonbase_licensing JUCE module and runs its behavioral test suite | |
| # (tests/juce) on every OS. This is the only CI that exercises the native-crypto | |
| # backends (Security.framework / CNG / libcrypto) and the ActivationController | |
| # state machine; the default ci.yml only covers the header-only SDK. | |
| # | |
| # The suite signs tokens with OpenSSL then verifies them with the platform's | |
| # native backend, i.e. a real cross-backend RS256 round-trip on each OS. The | |
| # suite needs nothing from the core SDK target, so the build configures with | |
| # -DMOONBASE_JUCE_MODULE_ONLY=ON, which also skips its CURL lookup. OpenSSL is | |
| # still installed because the suite signs its test tokens with it. | |
| # | |
| # The module supports JUCE 6.1.3 and up, so the matrix also builds the two older | |
| # lines: 6.1.3 is what HISE pins, 7.0.12 is the last 7.x. They run on macOS only. | |
| # The version shims are platform-independent C++ and the crypto backends do not | |
| # vary by JUCE version, so a second OS would only re-test whether old JUCE itself | |
| # still compiles on a modern runner. macOS is the one that matters here because | |
| # it is the only platform that compiles the module through its Objective-C++ | |
| # translation unit. | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: juce-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| controller-tests: | |
| name: ${{ matrix.os }} (JUCE ${{ matrix.juce }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { os: ubuntu-latest, juce: "8.0.4" } | |
| - { os: macos-14, juce: "8.0.4" } | |
| - { os: windows-latest, juce: "8.0.4" } | |
| - { os: macos-14, juce: "8.0.0" } | |
| - { os: macos-14, juce: "7.0.12" } | |
| - { os: macos-14, juce: "6.1.3" } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libssl-dev \ | |
| libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxcursor-dev \ | |
| libxcomposite-dev libxrender-dev libfreetype6-dev libfontconfig1-dev \ | |
| libasound2-dev libglu1-mesa-dev mesa-common-dev xvfb | |
| - name: Install dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install openssl@3 nlohmann-json | |
| - name: Install OpenSSL via vcpkg (Windows) | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: | | |
| "$VCPKG_INSTALLATION_ROOT/vcpkg" install --triplet x64-windows openssl | |
| - name: Configure (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| cmake -S . -B build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DMOONBASE_JUCE_MODULE_ONLY=ON \ | |
| -DMOONBASE_BUILD_JUCE_TESTS=ON \ | |
| -DMOONBASE_JUCE_VERSION="${{ matrix.juce }}" | |
| - name: Configure (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| cmake -S . -B build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DMOONBASE_JUCE_MODULE_ONLY=ON \ | |
| -DMOONBASE_BUILD_JUCE_TESTS=ON \ | |
| -DMOONBASE_JUCE_VERSION="${{ matrix.juce }}" \ | |
| -DOPENSSL_ROOT_DIR="$(brew --prefix openssl@3)" | |
| - name: Configure (Windows) | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: | | |
| cmake -S . -B build \ | |
| -DMOONBASE_JUCE_MODULE_ONLY=ON \ | |
| -DMOONBASE_BUILD_JUCE_TESTS=ON \ | |
| -DMOONBASE_JUCE_VERSION="${{ matrix.juce }}" \ | |
| -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \ | |
| -DVCPKG_TARGET_TRIPLET=x64-windows | |
| # On Linux the doctest discovery step runs the binary at build time, and the | |
| # suite initialises the JUCE GUI subsystem, so both the build and the run | |
| # need a virtual display. | |
| - name: Build (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: xvfb-run -a cmake --build build --target MoonbaseJuceTests -j | |
| - name: Build | |
| if: runner.os != 'Linux' | |
| run: cmake --build build --target MoonbaseJuceTests --config Release -j | |
| - name: Test (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: xvfb-run -a ctest --test-dir build -R "Juce\." --output-on-failure | |
| - name: Test | |
| if: runner.os != 'Linux' | |
| run: ctest --test-dir build -R "Juce\." -C Release --output-on-failure | |
| # The route a JUCE project takes to consume this repository: JUCE first, then | |
| # the repository as a subproject with MOONBASE_JUCE_MODULE_ONLY on. OpenSSL and | |
| # CURL lookups are disabled outright, so a REQUIRED lookup creeping back onto | |
| # that path fails the configure. One OS is enough: the regression is a CMake | |
| # one, and the module's compile is covered on every OS above. | |
| module-only-consumer: | |
| name: module-only consumer (macos-14) | |
| runs-on: macos-14 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure | |
| run: | | |
| cmake -S tests/juce_consumer_smoke -B build-juce-consumer \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL=ON \ | |
| -DCMAKE_DISABLE_FIND_PACKAGE_CURL=ON | |
| - name: Build | |
| run: cmake --build build-juce-consumer --target MoonbaseJuceConsumerSmoke --config Release -j |