Remove native plugin C API #189
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 Windows (MSYS2) | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| actions: read | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sys: [mingw64, ucrt64, clang64] | |
| backend: [Cairo, Skia] | |
| include: | |
| - { sys: mingw64, icon: 'π¦' } | |
| - { sys: ucrt64, icon: 'π¨' } | |
| - { sys: clang64, icon: 'π§' } | |
| name: π§${{ matrix.icon }} ${{ matrix.sys }} (${{ matrix.backend }}) | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - name: 'π§° Checkout' | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: 'π Detect compiled-file changes' | |
| id: changes | |
| uses: dorny/paths-filter@v4 | |
| with: | |
| filters: | | |
| compiled: | |
| - 'CMakeLists.txt' | |
| - 'cmake/**' | |
| - '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.icon }} ${{ matrix.sys }} (${{ 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: '${{ matrix.icon }} Setup MSYS2' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{matrix.sys}} | |
| update: true | |
| install: >- | |
| git | |
| make | |
| flex | |
| bison | |
| pacboy: >- | |
| toolchain:p | |
| cmake:p | |
| make:p | |
| tools-git:p | |
| ${{ matrix.backend == 'Skia' && 'skia:p' || 'cairo:p' }} | |
| pango:p | |
| libxml2:p | |
| gtest:p | |
| pkg-config:p | |
| zlib:p | |
| libpng:p | |
| libjpeg-turbo:p | |
| vulkan-devel:p | |
| vulkan-loader:p | |
| glslang:p | |
| astyle:p | |
| doxygen:p | |
| graphviz:p | |
| if: steps.changes.outputs.compiled == 'true' || steps.last.outputs.force == 'true' | |
| - name: 'π οΈ Configuring' | |
| run: cmake -G "MSYS Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DBACKEND=${{ matrix.backend }} | |
| if: 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 | |
| if: (steps.changes.outputs.compiled == 'true' || steps.last.outputs.force == 'true') && matrix.backend != 'Skia' | |
| - name: 'β Skip build (no compiled changes)' | |
| if: steps.changes.outputs.compiled != 'true' && steps.last.outputs.force != 'true' | |
| shell: bash | |
| run: echo "No compiled-relevant files changed and previous run succeeded. Skipping build and tests." |