macos: osmesa in ci #56
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: CI | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, labeled] | ||
| paths-ignore: | ||
| - "doc/**" | ||
| - "_config.yml" | ||
| push: | ||
| branches: | ||
| - master | ||
| concurrency: | ||
| group: "${{ github.workflow }}-${{ github.ref_name }}" | ||
| cancel-in-progress: true | ||
| jobs: | ||
| #---------------------------------------------------------------------------- | ||
| # Cache LFS: Checkout LFS data and update the cache to limit LFS bandwidth | ||
| #---------------------------------------------------------------------------- | ||
| cache_lfs: | ||
| runs-on: ubuntu-24.04 | ||
| name: Update LFS data cache | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:fast') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:android') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:main') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| outputs: | ||
| lfs_sha: ${{ steps.lfs_sha_recover.outputs.lfs_sha }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 1 | ||
| lfs: false | ||
| - name: Cache LFS Data | ||
| id: lfs_sha_recover | ||
| uses: f3d-app/lfs-data-cache-action@v2 | ||
| with: | ||
| cache_postfix: cache-0 | ||
| #---------------------------------------------------------------------------- | ||
| # Recover vtk matrix | ||
| #---------------------------------------------------------------------------- | ||
| recover_vtk_matrix: | ||
| name: Recover VTK matrix | ||
| runs-on: ubuntu-24.04 | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:main') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| outputs: | ||
| vtk_matrix: ${{steps.vtk_matrix.outputs.extract}} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 1 | ||
| lfs: false | ||
| - name: Extract VTK matrix | ||
| id: vtk_matrix | ||
| uses: f3d-app/extract-version-action@main | ||
| with: | ||
| file: ./source/.github/workflows/versions.json | ||
| special_name: vtk_matrix | ||
| #---------------------------------------------------------------------------- | ||
| # Windows CI: Build and test, cross-vtk build matrix | ||
| #---------------------------------------------------------------------------- | ||
| windows: | ||
| needs: [cache_lfs, recover_vtk_matrix] | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:main') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| vtk_version: ${{fromJSON(needs.recover_vtk_matrix.outputs.vtk_matrix)}} | ||
| static_label: [no-static] | ||
| include: | ||
| - vtk_version: commit | ||
| static_label: static | ||
| runs-on: windows-2022 | ||
| env: | ||
| CMAKE_POLICY_VERSION_MINIMUM: 3.5 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: Generic CI | ||
| uses: ./source/.github/actions/generic-ci | ||
| with: | ||
| versions_file: ./source/.github/workflows/versions.json | ||
| vtk_version: ${{matrix.vtk_version}} | ||
| static_label: ${{matrix.static_label}} | ||
| lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} | ||
| #---------------------------------------------------------------------------- | ||
| # Linux fast CI: Build and test a single fast CI | ||
| #---------------------------------------------------------------------------- | ||
| linux_fast: | ||
| needs: cache_lfs | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:fast') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:main') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| runs-on: ubuntu-24.04 | ||
| container: ghcr.io/f3d-app/f3d-ci | ||
| env: | ||
| CMAKE_POLICY_VERSION_MINIMUM: 3.5 | ||
| DISPLAY: :0 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: Generic CI | ||
| uses: ./source/.github/actions/generic-ci | ||
| with: | ||
| versions_file: ./source/.github/workflows/versions.json | ||
| build_type: fast | ||
| vtk_version: v9.6.2 | ||
| rendering_backend: auto | ||
| optdeps_label: no-optdeps | ||
| exclude_deprecated_label: exclude-deprecated | ||
| static_label: no-static | ||
| lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} | ||
| #---------------------------------------------------------------------------- | ||
| # Linux CI: Build and test, cross-vtk build matrix | ||
| #---------------------------------------------------------------------------- | ||
| linux: | ||
| needs: [cache_lfs, recover_vtk_matrix] | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:main') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| vtk_version: ${{fromJSON(needs.recover_vtk_matrix.outputs.vtk_matrix)}} | ||
| build_type: [standard] | ||
| include: | ||
| - exclude_deprecated_label: no-exclude-deprecated | ||
| - optdeps_label: optdeps | ||
| - mindeps_label: no-mindeps | ||
| - rendering_backend: auto | ||
| - static_label: no-static | ||
| - build_type: egl | ||
| vtk_version: commit | ||
| optdeps_label: optdeps | ||
| mindeps_label: no-mindeps | ||
| exclude_deprecated_label: no-exclude-deprecated | ||
| rendering_backend: egl | ||
| static_label: no-static | ||
| - build_type: osmesa | ||
| vtk_version: commit | ||
| optdeps_label: optdeps | ||
| mindeps_label: no-mindeps | ||
| exclude_deprecated_label: no-exclude-deprecated | ||
| rendering_backend: osmesa | ||
| static_label: no-static | ||
| - build_type: exclude_deprecated | ||
| vtk_version: commit | ||
| optdeps_label: optdeps | ||
| mindeps_label: no-mindeps | ||
| exclude_deprecated_label: exclude-deprecated | ||
| rendering_backend: auto | ||
| static_label: no-static | ||
| - build_type: no_optional_deps | ||
| vtk_version: commit | ||
| optdeps_label: no-optdeps | ||
| mindeps_label: no-mindeps | ||
| exclude_deprecated_label: no-exclude-deprecated | ||
| rendering_backend: auto | ||
| static_label: no-static | ||
| - build_type: static_libs | ||
| vtk_version: commit | ||
| optdeps_label: optdeps | ||
| mindeps_label: no-mindeps | ||
| exclude_deprecated_label: no-exclude-deprecated | ||
| rendering_backend: auto | ||
| static_label: static | ||
| - build_type: mindeps | ||
| vtk_version: commit | ||
| optdeps_label: optdeps | ||
| mindeps_label: mindeps | ||
| exclude_deprecated_label: no-exclude-deprecated | ||
| rendering_backend: auto | ||
| static_label: no-static | ||
| runs-on: ubuntu-24.04 | ||
| container: ghcr.io/f3d-app/f3d-ci | ||
| env: | ||
| CMAKE_POLICY_VERSION_MINIMUM: 3.5 | ||
| DISPLAY: :0 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: Generic CI | ||
| uses: ./source/.github/actions/generic-ci | ||
| with: | ||
| versions_file: ./source/.github/workflows/versions.json | ||
| build_type: ${{matrix.build_type}} | ||
| vtk_version: ${{matrix.vtk_version}} | ||
| rendering_backend: ${{matrix.rendering_backend}} | ||
| optdeps_label: ${{matrix.optdeps_label}} | ||
| mindeps_label: ${{matrix.mindeps_label}} | ||
| exclude_deprecated_label: ${{matrix.exclude_deprecated_label}} | ||
| static_label: ${{matrix.static_label}} | ||
| lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} | ||
| #---------------------------------------------------------------------------- | ||
| # MacOS CI: Build and test, cross-vtk build matrix | ||
| #---------------------------------------------------------------------------- | ||
| macos_intel: | ||
| needs: [cache_lfs, recover_vtk_matrix] | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| vtk_version: ${{fromJSON(needs.recover_vtk_matrix.outputs.vtk_matrix)}} | ||
| runs-on: macos-15-intel | ||
| env: | ||
| CMAKE_POLICY_VERSION_MINIMUM: 3.5 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: Generic CI | ||
| uses: ./source/.github/actions/generic-ci | ||
| with: | ||
| versions_file: ./source/.github/workflows/versions.json | ||
| vtk_version: ${{matrix.vtk_version}} | ||
| cpu: x86_64 | ||
| lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} | ||
| rendering_backend: osmesa | ||
| #---------------------------------------------------------------------------- | ||
| # MacOS ARM CI: Build and test, cross-vtk build matrix with a few optional builds | ||
| #---------------------------------------------------------------------------- | ||
| macos_arm: | ||
| needs: [cache_lfs, recover_vtk_matrix] | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:main') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| vtk_version: ${{fromJSON(needs.recover_vtk_matrix.outputs.vtk_matrix)}} | ||
| bundle_label: [no-bundle] | ||
| static_label: [no-static] | ||
| rendering_backend: osmesa | ||
| include: | ||
| - vtk_version: commit | ||
| bundle_label: bundle | ||
| static_label: no-static | ||
| - vtk_version: commit | ||
| bundle_label: no-bundle | ||
| static_label: static | ||
| runs-on: macos-15 | ||
| env: | ||
| CMAKE_POLICY_VERSION_MINIMUM: 3.5 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: Generic CI | ||
| uses: ./source/.github/actions/generic-ci | ||
| with: | ||
| versions_file: ./source/.github/workflows/versions.json | ||
| vtk_version: ${{matrix.vtk_version}} | ||
| bundle_label: ${{matrix.bundle_label}} | ||
| static_label: ${{matrix.static_label}} | ||
| cpu: arm64 | ||
| lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} | ||
| #---------------------------------------------------------------------------- | ||
| # Python packaging: Build and test the Python wheel | ||
| #---------------------------------------------------------------------------- | ||
| python_packaging: | ||
| needs: cache_lfs | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-24.04, windows-2022, macos-15] | ||
| python_version: ["3.14"] | ||
| include: | ||
| - os: ubuntu-24.04 | ||
| python_version: "3.10" | ||
| - os: ubuntu-24.04 | ||
| python_version: "3.11" | ||
| - os: ubuntu-24.04 | ||
| python_version: "3.12" | ||
| - os: ubuntu-24.04 | ||
| python_version: "3.13" | ||
| - os: ubuntu-24.04 | ||
| python_version: "3.14" | ||
| runs-on: ${{matrix.os}} | ||
| container: ${{ matrix.os == 'ubuntu-24.04' && 'ghcr.io/f3d-app/f3d-ci' || null }} | ||
| env: | ||
| DISPLAY: :0 | ||
| CMAKE_POLICY_VERSION_MINIMUM: 3.5 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: Python CI | ||
| uses: ./source/.github/actions/python-ci | ||
| with: | ||
| versions_file: ./source/.github/workflows/versions.json | ||
| lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} | ||
| cpu: ${{ matrix.os == 'macos-15' && 'arm64' || 'x86_64' }} | ||
| python_version: ${{matrix.python_version}} | ||
| #---------------------------------------------------------------------------- | ||
| # Coverage: Build and test on linux with last VTK with coverage option | ||
| #---------------------------------------------------------------------------- | ||
| coverage: | ||
| needs: cache_lfs | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:main') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| runs-on: ubuntu-24.04 | ||
| container: ghcr.io/f3d-app/f3d-ci | ||
| env: | ||
| DISPLAY: :0 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: Coverage CI | ||
| uses: ./source/.github/actions/coverage-ci | ||
| with: | ||
| versions_file: ./source/.github/workflows/versions.json | ||
| lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} | ||
| codecov_token: ${{secrets.CODECOV_TOKEN}} | ||
| #---------------------------------------------------------------------------- | ||
| # Sanitizer: Build and test on linux with last VTK with sanitizer options | ||
| #---------------------------------------------------------------------------- | ||
| # "leak" is run by default with "address" so we do not need to run it in CI | ||
| # "memory" returns false positives in VTK: | ||
| # https://stackoverflow.com/questions/60097307/memory-sanitizer-reports-use-of-uninitialized-value-in-global-object-constructio | ||
| sanitizer: | ||
| needs: cache_lfs | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| sanitizer_type: [address, thread, undefined] | ||
| runs-on: ubuntu-24.04 | ||
| container: ghcr.io/f3d-app/f3d-ci | ||
| env: | ||
| CMAKE_POLICY_VERSION_MINIMUM: 3.5 | ||
| DISPLAY: :0 | ||
| CC: clang | ||
| CXX: clang++ | ||
| VTK_SMP_BACKEND_IN_USE: Sequential | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: Sanitizer CI | ||
| uses: ./source/.github/actions/sanitizer-ci | ||
| with: | ||
| versions_file: ./source/.github/workflows/versions.json | ||
| sanitizer_type: ${{matrix.sanitizer_type}} | ||
| lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} | ||
| #---------------------------------------------------------------------------- | ||
| # static-analysis: Run static analysis on linux | ||
| #---------------------------------------------------------------------------- | ||
| static-analysis: | ||
| needs: cache_lfs | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:main') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| strategy: | ||
| fail-fast: false | ||
| runs-on: ubuntu-24.04 | ||
| container: ghcr.io/f3d-app/f3d-ci | ||
| env: | ||
| CMAKE_POLICY_VERSION_MINIMUM: 3.5 | ||
| CC: clang | ||
| CXX: clang++ | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: Static analysis CI | ||
| uses: ./source/.github/actions/static-analysis-ci | ||
| with: | ||
| versions_file: ./source/.github/workflows/versions.json | ||
| lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} | ||
| #---------------------------------------------------------------------------- | ||
| # external-build: Check build of F3D as sub-project | ||
| #---------------------------------------------------------------------------- | ||
| external-build: | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| strategy: | ||
| fail-fast: false | ||
| runs-on: ubuntu-24.04 | ||
| container: ghcr.io/f3d-app/f3d-ci | ||
| env: | ||
| CMAKE_POLICY_VERSION_MINIMUM: 3.5 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source/f3d" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: External build CI | ||
| uses: ./source/f3d/.github/actions/external-build-ci | ||
| with: | ||
| versions_file: ./source/f3d/.github/workflows/versions.json | ||
| #---------------------------------------------------------------------------- | ||
| # Recover docker timestamp | ||
| #---------------------------------------------------------------------------- | ||
| recover_docker_timestamp: | ||
| name: Recover docker timestamp | ||
| runs-on: ubuntu-24.04 | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:android') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| outputs: | ||
| docker_timestamp: ${{steps.docker_timestamp.outputs.extract}} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: Extract docker timestamp | ||
| id: docker_timestamp | ||
| uses: f3d-app/extract-version-action@main | ||
| with: | ||
| file: ./source/.github/workflows/versions.json | ||
| special_name: docker_timestamp | ||
| #---------------------------------------------------------------------------- | ||
| # android: Check build of F3D for android | ||
| #---------------------------------------------------------------------------- | ||
| android: | ||
| needs: recover_docker_timestamp | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:android') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| arch: [armeabi-v7a, arm64-v8a, x86, x86_64] | ||
| runs-on: ubuntu-24.04 | ||
| container: ghcr.io/f3d-app/f3d-android-${{ matrix.arch }}:${{needs.recover_docker_timestamp.outputs.docker_timestamp}} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: Android CI | ||
| uses: ./source/.github/actions/android-ci | ||
| with: | ||
| arch: ${{matrix.arch}} | ||
| #---------------------------------------------------------------------------- | ||
| # webassembly: Build webassembly artifacts | ||
| #---------------------------------------------------------------------------- | ||
| webassembly: | ||
| needs: [cache_lfs, recover_docker_timestamp] | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'ci:wasm') || | ||
| contains(github.event.pull_request.labels.*.name, 'ci:full') || | ||
| github.ref == 'refs/heads/master' | ||
| strategy: | ||
| fail-fast: false | ||
| runs-on: ubuntu-24.04 | ||
| env: | ||
| CMAKE_BUILD_PARALLEL_LEVEL: 4 | ||
| F3D_DOCKER_TIMESTAMP: ${{needs.recover_docker_timestamp.outputs.docker_timestamp}} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| path: "source" | ||
| fetch-depth: 0 | ||
| lfs: false | ||
| - name: WebAssembly CI | ||
| uses: ./source/.github/actions/wasm-ci | ||
| with: | ||
| lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} | ||
| - name: Install dependencies | ||
| working-directory: ${{github.workspace}}/source/examples/libf3d/web | ||
| run: npm install | ||
| - name: Build F3D web app with npm F3D package | ||
| working-directory: ${{github.workspace}}/source/examples/libf3d/web | ||
| run: npm run build | ||
| - name: Retrieve f3d package | ||
| uses: actions/download-artifact@v8 | ||
| with: | ||
| name: f3d-wasm-package | ||
| path: ${{github.workspace}}/source/examples/libf3d/web | ||
| # Override with the locally built package | ||
| - name: Install f3d package | ||
| working-directory: ${{github.workspace}}/source/examples/libf3d/web | ||
| run: npm install f3d-*.tgz | ||
| - name: Build F3D web app with package just built from branch | ||
| working-directory: ${{github.workspace}}/source/examples/libf3d/web | ||
| run: npm run build | ||