Install missing Cursor.hpp public header #174
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: Build on macOS | |
| on: [push, pull_request] | |
| env: | |
| BUILD_TYPE: Release | |
| permissions: | |
| contents: read | |
| actions: read | |
| jobs: | |
| build: | |
| name: '${{ matrix.compiler }} (${{ matrix.backend }})' | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| compiler: [clang] | |
| backend: [Cairo, Skia] | |
| steps: | |
| - name: '🧰 Checkout' | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: '🔎 Detect compiled-file changes' | |
| id: changes | |
| uses: dorny/paths-filter@v4 | |
| with: | |
| filters: | | |
| compiled: | |
| - 'CMakeLists.txt' | |
| - 'cmake/**' | |
| - 'tools/homebrew/**' | |
| - 'homebrew-ports/**' | |
| - 'vcpkg.json' | |
| - 'vcpkg-configuration.json' | |
| - 'core/**' | |
| - 'include/**' | |
| - 'tests/**' | |
| - 'demos/**' | |
| - 'css/**' | |
| - '**/*.c' | |
| - '**/*.cc' | |
| - '**/*.cpp' | |
| - '**/*.cxx' | |
| - '**/*.h' | |
| - '**/*.hpp' | |
| - '**/*.cu' | |
| - name: '� Check previous run for this job' | |
| id: last | |
| uses: actions/github-script@v8 | |
| env: | |
| JOB_NAME: '${{ matrix.compiler }} (${{ matrix.backend }})' | |
| with: | |
| script: | | |
| if (context.eventName !== 'push') { | |
| core.setOutput('force', 'false'); | |
| return; | |
| } | |
| const jobName = process.env.JOB_NAME; | |
| const branch = context.ref.replace('refs/heads/', ''); | |
| const runs = await github.paginate( | |
| github.rest.actions.listWorkflowRunsForRepo, | |
| { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| branch, | |
| status: 'completed', | |
| per_page: 50, | |
| } | |
| ); | |
| const priorRuns = runs | |
| .filter(r => r.name === context.workflow && r.id !== context.runId) | |
| .sort((a, b) => new Date(b.created_at) - new Date(a.created_at)); | |
| let force = 'false'; | |
| for (const run of priorRuns) { | |
| const jobs = await github.paginate( | |
| github.rest.actions.listJobsForWorkflowRun, | |
| { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| run_id: run.id, | |
| per_page: 100, | |
| } | |
| ); | |
| const matched = jobs.find(j => j.name === jobName); | |
| if (matched) { | |
| core.info( | |
| `Last "${jobName}" (run ${run.id}) conclusion: ${matched.conclusion}` | |
| ); | |
| if (matched.conclusion !== 'success') force = 'true'; | |
| break; | |
| } | |
| } | |
| core.setOutput('force', force); | |
| - name: '📦 Install dependencies' | |
| run: | | |
| brew update | |
| brew install cmake pkg-config cairo pango libxml2 googletest gsed bison zlib libpng libjpeg-turbo | |
| if [ "${{ matrix.backend }}" = "Skia" ]; then | |
| brew tap aeongames/ports | |
| brew install --build-from-source aeongames/ports/skia-aeongui | |
| fi | |
| if: matrix.compiler == 'clang' && (steps.changes.outputs.compiled == 'true' || steps.last.outputs.force == 'true') | |
| - name: '🌋 Install Vulkan SDK' | |
| uses: jakoch/install-vulkan-sdk-action@v1.4.0 | |
| with: | |
| vulkan_version: latest | |
| install_runtime: true | |
| cache: true | |
| if: steps.changes.outputs.compiled == 'true' || steps.last.outputs.force == 'true' | |
| - name: '🛠️ Configuring (${{ matrix.backend }})' | |
| run: | | |
| export PATH="/opt/homebrew/opt/bison/bin:$PATH" | |
| if [ "${{ matrix.backend }}" = "Skia" ]; then | |
| export SKIA_ROOT="$(brew --prefix skia-aeongui)" | |
| export PKG_CONFIG_PATH="$SKIA_ROOT/lib/pkgconfig:/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH" | |
| cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBACKEND=Skia -DAEONGUI_SKIA_ROOT="$SKIA_ROOT" | |
| else | |
| export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH" | |
| cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBACKEND=Cairo | |
| fi | |
| if: matrix.compiler == 'clang' && (steps.changes.outputs.compiled == 'true' || steps.last.outputs.force == 'true') | |
| - name: '🏗️ Building' | |
| run: cmake --build ${{github.workspace}}/build | |
| if: steps.changes.outputs.compiled == 'true' || steps.last.outputs.force == 'true' | |
| - name: '🧪 Running Tests' | |
| run: | | |
| ctest --test-dir "${{ github.workspace }}/build" --output-on-failure --rerun-failed || { | |
| echo "==== LastTest.log ====" | |
| cat "${{ github.workspace }}/build/Testing/Temporary/LastTest.log" || true | |
| exit 1 | |
| } | |
| if: steps.changes.outputs.compiled == 'true' || steps.last.outputs.force == 'true' | |
| - name: '✅ Skip build (no compiled changes)' | |
| if: steps.changes.outputs.compiled != 'true' && steps.last.outputs.force != 'true' | |
| run: echo "No compiled-relevant files changed and previous run succeeded. Skipping build and tests." |