Demo: Direct2D / Uncached only / text drop-inner toggles plus perf la… #908
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: Tests | |
| on: | |
| workflow_dispatch: | |
| push: | |
| pull_request: | |
| schedule: | |
| - cron: '10 5 * * *' # run once a day | |
| env: | |
| BUILD_TYPE: Release | |
| BUILD_DIR: Builds | |
| HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
| SCCACHE_GHA_ENABLED: true | |
| SCCACHE_CACHE_MULTIARCH: 1 | |
| concurrency: | |
| group: ${{ github.workflow }}.${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: read | |
| jobs: | |
| BuildAndTest: | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
| name: Tests (${{ matrix.os }}, ${{ matrix.juce }}, Direct2D ${{ matrix.direct2d }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 # macos-11 in particular needs more than 15 min | |
| strategy: | |
| fail-fast: false # show errors for each platform vs. cancel build | |
| matrix: | |
| os: [ macos-13, macos-14, macos-15, windows-2022, windows-2019, ubuntu-22.04 ] | |
| juce: [ JUCE7, JUCE8 ] | |
| direct2d: [ OFF ] | |
| exclude: | |
| # JUCE 7 uses CGWindowListCreateImage, unavailable on macOS 15 | |
| - os: macos-15 | |
| juce: JUCE7 | |
| include: | |
| - os: windows-2022 | |
| juce: JUCE8 | |
| direct2d: ON | |
| - os: windows-2019 | |
| juce: JUCE8 | |
| direct2d: ON | |
| steps: | |
| # Setup MSVC toolchain and developer command prompt (Windows) | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| sdk: 10.0.22621.0 | |
| # 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: ${{ runner.os == 'macOS' }} | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install Ninja (Windows) | |
| if: runner.os == 'Windows' | |
| run: choco install ninja | |
| - name: Install macOS Deps | |
| if: ${{ runner.os == 'macOS' }} | |
| run: brew install osxutils | |
| - name: Install Linux Deps | |
| if: runner.os == 'Linux' | |
| run: | | |
| # manually install gcc-11 and set as default for 20.04 | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
| sudo apt-get update && sudo apt install libasound2-dev libx11-dev libxinerama-dev libxext-dev libfreetype6-dev libwebkit2gtk-4.0-dev libglu1-mesa-dev ninja-build g++-11 gcc-11 | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100 | |
| - name: Run sccache-cache | |
| uses: mozilla-actions/sccache-action@v0.0.9 | |
| - name: Configure | |
| run: | | |
| if [ "${{ matrix.juce }}" == "JUCE7" ]; then | |
| cmake -B ${{ env.BUILD_DIR }} -G Ninja -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache . -DJUCE7=ON -DMELATONIN_BLUR_USE_DIRECT2D=${{ matrix.direct2d }} | |
| else | |
| cmake -B ${{ env.BUILD_DIR }} -G Ninja -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache . -DMELATONIN_BLUR_USE_DIRECT2D=${{ matrix.direct2d }} | |
| fi | |
| - name: Build | |
| run: cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }} --parallel 4 | |
| - name: Tests | |
| working-directory: ${{ env.BUILD_DIR }} | |
| run: ./Tests | |
| - name: Benchmarks | |
| working-directory: ${{ env.BUILD_DIR }} | |
| run: ./Benchmarks |