Fix system zstd propagation to SPZ #10773
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: MacOS | |
| permissions: {} | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| developer_build: | |
| description: 'Set to OFF for Release builds.' | |
| required: false | |
| default: 'ON' | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, reopened, synchronize] # Rebuild on new pushes to PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | |
| NPROC: 4 | |
| DEVELOPER_BUILD: ${{ github.event.inputs.developer_build || 'ON' }} | |
| BUILD_CUDA_MODULE: OFF | |
| jobs: | |
| build-lib: | |
| permissions: | |
| contents: write # upload | |
| id-token: write | |
| attestations: write | |
| artifact-metadata: write | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-14] | |
| CONFIG: [ON, OFF] | |
| env: | |
| BUILD_SHARED_LIBS: ${{ matrix.CONFIG }} | |
| BUILD_TENSORFLOW_OPS: 'ON' | |
| BUILD_PYTORCH_OPS: 'ON' | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Setup cache | |
| uses: actions/cache@v4 | |
| with: | |
| # Ref: https://github.com/apache/incubator-mxnet/pull/18459/files | |
| path: ~/.ccache | |
| # We include the commit sha in the cache key, as new cache entries are | |
| # only created if there is no existing entry for the key yet. | |
| key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ github.sha }} | |
| # Restore any ccache cache entry, if none for | |
| # ${{ runner.os }}-${{ runner.arch }}-ccache-${{ github.sha }} exists. | |
| # Common prefix will be used so that ccache can be used across commits. | |
| restore-keys: | | |
| ${{ runner.os }}-${{ runner.arch }}-ccache | |
| - name: Set up Python version | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| brew install ccache glslang spirv-cross gcc | |
| # Fix gfortran not found issue | |
| ln -s $(brew --prefix gcc)/bin/gfortran-* /usr/local/bin/gfortran | |
| ccache -M 2G # See .github/workflows/readme.md for ccache strategy. | |
| - name: Config and build | |
| run: | | |
| PATH=/usr/local/var/homebrew/linked/ccache/libexec:$PATH | |
| ccache -s | |
| export BUILD_PYTHON_MODULE=OFF | |
| ./util/run_ci.sh | |
| DEVEL_PKG_NAME="$(basename build/package/open3d-devel-*.tar.xz)" | |
| echo "DEVEL_PKG_NAME=$DEVEL_PKG_NAME" >> $GITHUB_ENV | |
| # Compress build directory for reuse (exclude some large potentially unnecessary files if needed) | |
| # We need 'build' directory. | |
| tar -caf build.tar.xz build | |
| - name: Upload build artifact | |
| if: ${{ matrix.CONFIG == 'OFF' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: open3d-build-${{ matrix.os }} | |
| path: build.tar.xz | |
| retention-days: 1 | |
| - name: Build Open3D viewer app | |
| if: ${{ env.BUILD_SHARED_LIBS == 'OFF' }} | |
| run: | | |
| OPEN3D_VERSION_FULL="$(grep -F OPEN3D_VERSION_FULL build/CMakeCache.txt | cut -f2 -d'=')" | |
| PATH=/usr/local/var/homebrew/linked/ccache/libexec:$PATH | |
| pushd build | |
| make -j${NPROC} Open3DViewer | |
| pushd bin | |
| zip -rv "open3d-${OPEN3D_VERSION_FULL}-app-macosx-10_15-${{ runner.arch }}.zip" Open3D.app | |
| ccache -s | |
| - name: Generate package attestation | |
| if: ${{ github.ref == 'refs/heads/main' && env.BUILD_SHARED_LIBS == 'ON' }} | |
| uses: actions/attest@v4 | |
| with: | |
| subject-path: build/package/${{ env.DEVEL_PKG_NAME }} | |
| - name: Upload package | |
| if: ${{ env.BUILD_SHARED_LIBS == 'ON' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.DEVEL_PKG_NAME }} | |
| path: build/package/${{ env.DEVEL_PKG_NAME }} | |
| if-no-files-found: error | |
| - name: Generate viewer attestation | |
| if: ${{ github.ref == 'refs/heads/main' && env.BUILD_SHARED_LIBS == 'OFF' }} | |
| uses: actions/attest@v4 | |
| with: | |
| subject-path: build/bin/open3d-*-app-macosx-10_15-${{ runner.arch }}.zip | |
| - name: Upload Open3D viewer app | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ env.BUILD_SHARED_LIBS == 'OFF' }} | |
| with: | |
| name: open3d-app-macosx-10_15-${{ runner.arch}} | |
| path: build/bin/open3d-*-app-macosx-10_15-${{ runner.arch }}.zip | |
| if-no-files-found: error | |
| - name: Update devel release | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| if [[ "${{ env.BUILD_SHARED_LIBS }}" == 'ON' ]]; then | |
| .github/workflows/update_release.sh build/package/${{ env.DEVEL_PKG_NAME }} | |
| else | |
| .github/workflows/update_release.sh build/bin/open3d-*-app-macosx-10_15-${{ runner.arch }}.zip | |
| fi | |
| build-wheel: | |
| needs: build-lib | |
| if: ${{ always() && !cancelled() }} | |
| name: Build wheel | |
| permissions: | |
| contents: write # upload | |
| id-token: write | |
| attestations: write | |
| artifact-metadata: write | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| # https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6 | |
| matrix: | |
| os: [macos-14] | |
| python_version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| is_main: | |
| - ${{ github.ref == 'refs/heads/main' }} | |
| exclude: | |
| - is_main: false | |
| python_version: '3.10' | |
| - is_main: false | |
| python_version: '3.11' | |
| - is_main: false | |
| python_version: '3.12' | |
| - is_main: false | |
| python_version: '3.13' | |
| env: | |
| # TensorFlow v2.20 only supports macOS-14 (Apple Silicon) and python 3.9-3.13 | |
| BUILD_TENSORFLOW_OPS: ${{ matrix.python_version >= '3.14' && 'OFF' || 'ON' }} | |
| # PyTorch 2.13 only supports macOS-14 (Apple Silicon) and python 3.10-3.14 | |
| BUILD_PYTORCH_OPS: 'ON' | |
| OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Checkout Open3D-ML source code | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: isl-org/Open3D-ML | |
| path: ${{ env.OPEN3D_ML_ROOT }} | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: open3d-build-${{ matrix.os }} | |
| - name: Unpack build artifact | |
| run: tar -xf build.tar.xz | |
| - name: Setup cache | |
| uses: actions/cache@v4 | |
| with: | |
| # Ref: https://github.com/apache/incubator-mxnet/pull/18459/files | |
| path: ~/.ccache | |
| # We include the commit sha in the cache key, as new cache entries are | |
| # only created if there is no existing entry for the key yet. | |
| key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ github.sha }} | |
| # Restore any ccache cache entry, if none for | |
| # ${{ runner.os }}-${{ runner.arch }}-ccache-${{ github.sha }} exists. | |
| # Common prefix will be used so that ccache can be used across commits. | |
| restore-keys: ${{ runner.os }}-${{ runner.arch }}-ccache | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - name: Install dependencies | |
| run: | | |
| echo "Using python: $(which python)" | |
| python --version | |
| echo -n "Using pip: $(which pip)" | |
| python -m pip --version | |
| echo "Using cmake: $(which cmake)" | |
| cmake --version | |
| source util/ci_utils.sh | |
| install_python_dependencies | |
| brew install ccache glslang spirv-cross gcc | |
| ccache -M 2G # See .github/workflows/readme.md for ccache strategy. | |
| # Fix gfortran not found issue | |
| ln -s $(brew --prefix gcc)/bin/gfortran-* /usr/local/bin/gfortran | |
| - name: Config and build wheel | |
| run: | | |
| PATH=/usr/local/var/homebrew/linked/ccache/libexec:$PATH | |
| ccache -s | |
| source util/ci_utils.sh | |
| build_pip_package | |
| ccache -s | |
| PIP_PKG_NAME="$(basename build/lib/python_package/pip_package/open3d*.whl)" | |
| echo "PIP_PKG_NAME=$PIP_PKG_NAME" >> $GITHUB_ENV | |
| - name: Generate wheel attestation | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| uses: actions/attest@v4 | |
| with: | |
| subject-path: build/lib/python_package/pip_package/${{ env.PIP_PKG_NAME }} | |
| - name: Upload wheel | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.PIP_PKG_NAME }} | |
| path: build/lib/python_package/pip_package/${{ env.PIP_PKG_NAME }} | |
| if-no-files-found: error | |
| - name: Update devel release | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| .github/workflows/update_release.sh build/lib/python_package/pip_package/${{ env.PIP_PKG_NAME }} | |
| test-wheel: | |
| name: Test wheel | |
| permissions: | |
| contents: read | |
| runs-on: ${{ matrix.os }} | |
| needs: [build-wheel] | |
| if: ${{ always() && !cancelled() }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-14] | |
| python_version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| is_main: | |
| - ${{ github.ref == 'refs/heads/main' }} | |
| exclude: | |
| - is_main: false | |
| python_version: '3.10' | |
| - is_main: false | |
| python_version: '3.11' | |
| - is_main: false | |
| python_version: '3.12' | |
| - is_main: false | |
| python_version: '3.13' | |
| env: | |
| # TensorFlow v2.20 only supports macOS-14 (Apple Silicon) and python 3.9-3.13 | |
| BUILD_TENSORFLOW_OPS: ${{ matrix.python_version >= '3.14' && 'OFF' || 'ON' }} | |
| # PyTorch 2.13 only supports macOS-14 (Apple Silicon) and python 3.10-3.14 | |
| BUILD_PYTORCH_OPS: 'ON' | |
| OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Checkout Open3D-ML source code | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: isl-org/Open3D-ML | |
| path: ${{ env.OPEN3D_ML_ROOT }} | |
| - name: Download wheels | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: open3d-*macosx*.whl | |
| merge-multiple: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - name: Test Python package | |
| run: | | |
| python -V | |
| source util/ci_utils.sh | |
| pi_tag=$(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')") | |
| test_wheel open3d*-"$pi_tag"-*_$(uname -m).whl | |
| - name: Run Python unit tests | |
| run: | | |
| source util/ci_utils.sh | |
| echo "Running Open3D python tests..." | |
| run_python_tests |