Skip to content

Commit

Permalink
macos arm64 ci (#1241)
Browse files Browse the repository at this point in the history
* macos arm64 ci

* disable testing on macos

* Update cache for arm

* fixup vtk cache

* missing cache update

* only windows

* reenable testing

* remove baselines

* Revert "remove baselines"

This reverts commit aba5858.

* exclude some tests

* fixup install

* fixup macos arm64 ci
  • Loading branch information
mwestphal authored Feb 10, 2024
1 parent 15ed558 commit a8aac1c
Show file tree
Hide file tree
Showing 19 changed files with 76 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/actions/alembic-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/alembic_install
key: alembic-v1.8.5-${{runner.os}}-${{inputs.cpu}}-2
key: alembic-v1.8.5-${{runner.os}}-${{inputs.cpu}}-3

- name: Checkout Alembic
if: steps.cache-alembic.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/assimp-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/assimp_install
key: assimp-v5.3.1-${{runner.os}}-${{inputs.cpu}}-2
key: assimp-v5.3.1-${{runner.os}}-${{inputs.cpu}}-3

- name: Checkout ASSIMP
if: steps.cache-assimp.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/blosc-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/blosc_install
key: blosc-1.21.5-${{runner.os}}-${{inputs.cpu}}-2
key: blosc-1.21.5-${{runner.os}}-${{inputs.cpu}}-3

# Dependents: openvdb vtk
- name: Checkout blosc
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/boost-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/boost_install
key: boost-1.83.0-${{runner.os}}-${{inputs.cpu}}-3
key: boost-1.83.0-${{runner.os}}-${{inputs.cpu}}-4

# Dependents: usd openvdb vtk
- name: Checkout Boost
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/draco-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/draco_install
key: draco-1.5.7-${{runner.os}}-${{inputs.cpu}}-0
key: draco-1.5.7-${{runner.os}}-${{inputs.cpu}}-1

- name: Checkout Draco
if: steps.cache-draco.outputs.cache-hit != 'true'
Expand Down
26 changes: 16 additions & 10 deletions .github/actions/generic-ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ runs:
working-directory: ${{github.workspace}}
run: echo "PATH=$env:PATH;$(pwd)\dependencies\install\bin\;$(pwd)\dependencies\install\lib\;$(pwd)\install\bin\;"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Determine if testing should be enabled
id: vars
shell: bash
run: echo "run_tests=${{ inputs.cpu == 'x86_64' && 'true' || 'false' }}" >> $GITHUB_OUTPUT

# occt coloring not supported on macOS because of #792
# Exodus not supported on Apple Silicon because of #976
# CMAKE_MODULE_PATH is required because of
Expand Down Expand Up @@ -193,11 +188,19 @@ runs:
path: ${{github.workspace}}\build\bin_Release

- name: Test
if: steps.vars.outputs.run_tests == 'true'
if: inputs.cpu == 'x86_64'
shell: bash
working-directory: ${{github.workspace}}/build
run: ctest -C Release -j 2 --output-on-failure || ctest -C Release -j 1 --rerun-failed -VV

# Certain tests are failing on macOS arm64 for unknown reasons
# https://github.com/f3d-app/f3d/issues/1276
- name: Test
if: inputs.cpu == 'arm64'
shell: bash
working-directory: ${{github.workspace}}/build
run: ctest -E "(TestGrid)|(TestConfig)" -C Release -j 2 --output-on-failure || ctest -C Release -j 1 --rerun-failed -VV

- name: Upload Tests Artifact
if: failure()
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -248,7 +251,7 @@ runs:

# older VTK version create different renderings so they are not tested
- name: Test libf3d examples
if: inputs.vtk_version != 'v9.0.0' && inputs.vtk_version != 'v9.1.0' && steps.vars.outputs.run_tests == 'true'
if: inputs.vtk_version != 'v9.0.0' && inputs.vtk_version != 'v9.1.0'
shell: bash
working-directory: ${{github.workspace}}
run: ctest --test-dir build_examples -C Release -VV
Expand All @@ -261,7 +264,6 @@ runs:
cmake --build build_plugins --config Release
- name: Test plugin examples
if: steps.vars.outputs.run_tests == 'true'
shell: bash
working-directory: ${{github.workspace}}
run: ctest --test-dir build_plugins -C Release -VV
Expand Down Expand Up @@ -296,8 +298,10 @@ runs:
with:
path: ${{github.workspace}}\install\bin

# Grid rendering has artifacts in macOS arm64 CI
# https://github.com/f3d-app/f3d/issues/1276
- name: Check F3D_PLUGINS_PATH using plugin example
if: inputs.vtk_version != 'v9.0.0' && inputs.vtk_version != 'v9.1.0' && inputs.vtk_version != 'v9.2.6' && steps.vars.outputs.run_tests == 'true'
if: inputs.vtk_version != 'v9.0.0' && inputs.vtk_version != 'v9.1.0' && inputs.vtk_version != 'v9.2.6' && inputs.cpu != 'arm64'
shell: bash
working-directory: ${{github.workspace}}/install
run: F3D_PLUGINS_PATH=$(pwd)/../build_plugins/example-plugin${{ runner.os == 'Windows' && '/Release' || null }} ${{ env.F3D_BIN_PATH }} ../source/examples/plugins/example-plugin/data.expl --load-plugins=example --output=../install_example_plugin_output.png --ref=../source/.github/baselines/install_example_plugin_output.png --resolution=300,300 --verbose
Expand All @@ -309,8 +313,10 @@ runs:
cmake --install build_plugins --config Release
cmake --install build_plugins --config Release --component configuration
# Grid rendering has artifacts in macOS arm64 CI
# https://github.com/f3d-app/f3d/issues/1276
- name: Check Install
if: inputs.vtk_version != 'v9.0.0' && inputs.vtk_version != 'v9.1.0' && inputs.vtk_version != 'v9.2.6' && steps.vars.outputs.run_tests == 'true'
if: inputs.vtk_version != 'v9.0.0' && inputs.vtk_version != 'v9.1.0' && inputs.vtk_version != 'v9.2.6' && inputs.cpu != 'arm64'
shell: bash
working-directory: ${{github.workspace}}/install
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/imath-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/imath_install
key: imath-v3.1.10-${{runner.os}}-${{inputs.cpu}}-0
key: imath-v3.1.10-${{runner.os}}-${{inputs.cpu}}-1

# Dependents: alembic
- name: Checkout Imath
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/occt-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/occt_install
key: occt-V7_7_2-${{runner.os}}-${{inputs.cpu}}-1
key: occt-V7_7_2-${{runner.os}}-${{inputs.cpu}}-2

- name: Checkout OCCT
if: steps.cache-occt.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/openexr-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/openexr_install
key: openexr-v3.2.1-${{runner.os}}-${{inputs.cpu}}-0
key: openexr-v3.2.1-${{runner.os}}-${{inputs.cpu}}-1

# Dependents: usd
- name: Checkout OpenEXR
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/openvdb-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/openvdb_install
key: openvdb-11.0.0-${{runner.os}}-${{inputs.cpu}}-4
key: openvdb-11.0.0-${{runner.os}}-${{inputs.cpu}}-5

# Dependents: vtk
- name: Checkout OpenVDB
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/tbb-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/tbb_install
key: tbb-v2021.11.0-${{runner.os}}-${{inputs.cpu}}-0
key: tbb-v2021.11.0-${{runner.os}}-${{inputs.cpu}}-1

# Dependents: usd openvdb vtk
- name: Checkout TBB
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/usd-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/usd_install
key: usd-v23.05-${{runner.os}}-${{inputs.cpu}}-7
key: usd-v23.05-${{runner.os}}-${{inputs.cpu}}-8

- name: Checkout USD
if: steps.cache-usd.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/vtk-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/vtk_install
key: vtk-${{env.VTK_SHA_OR_TAG}}-${{runner.os}}-${{inputs.raytracing_label}}-${{inputs.egl_label}}-${{inputs.cpu}}-4
key: vtk-${{env.VTK_SHA_OR_TAG}}-${{runner.os}}-${{inputs.raytracing_label}}-${{inputs.egl_label}}-${{inputs.cpu}}-5

- name: Setup VTK
if: steps.cache-vtk.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/zlib-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
uses: actions/cache@v4
with:
path: dependencies/zlib_install
key: zlib-1.3.1-${{runner.os}}-${{inputs.cpu}}-0
key: zlib-1.3.1-${{runner.os}}-${{inputs.cpu}}-1

# Dependents: blosc openvdb vtk
- name: Checkout zlib
Expand Down
37 changes: 35 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,50 @@ jobs:
fail-fast: false
matrix:
vtk_version: [commit, v9.3.0, v9.2.6]
cpu: [x86_64, arm64]
cpu: [x86_64]
bundle_label: [no-bundle]
include:
- vtk_version: commit
bundle_label: bundle
cpu: x86_64

runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
fetch-depth: 0
lfs: false

- name: Generic CI
uses: ./source/.github/actions/generic-ci
with:
vtk_version: ${{matrix.vtk_version}}
bundle_label: ${{matrix.bundle_label}}
cpu: ${{matrix.cpu}}
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}

#----------------------------------------------------------------------------
# MacOS ARM CI: Build and test, cross-vtk build matrix
#----------------------------------------------------------------------------
macos_arm:
if: github.event.pull_request.draft == false
needs: cache_lfs

strategy:
fail-fast: false
matrix:
vtk_version: [commit, v9.3.0, v9.2.6]
cpu: [arm64]
bundle_label: [no-bundle]
include:
- vtk_version: commit
bundle_label: bundle
cpu: arm64

runs-on: macos-latest
runs-on: macos-14

steps:
- name: Checkout
Expand Down
3 changes: 3 additions & 0 deletions testing/baselines/TestCameraConfiguration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions testing/baselines/TestMetaData.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions testing/baselines/TestPointCloudBar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions testing/baselines/TestPointCloudVolume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a8aac1c

Please sign in to comment.