diff --git a/.github/workflows/ax.yml b/.github/workflows/ax.yml index 0b8c99463f..b853ae60ee 100644 --- a/.github/workflows/ax.yml +++ b/.github/workflows/ax.yml @@ -123,9 +123,9 @@ jobs: matrix: config: #@note llvm10 never got its own brew formula... - - { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '11' } - - { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '12' } - - { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '13' } + # Last macos runner befor M1 (macos-14) + - { runner: 'macos-13', cxx: 'clang++', build: 'Release', llvm: '12' } + - { runner: 'macos-13', cxx: 'clang++', build: 'Release', llvm: '13' } fail-fast: false steps: - uses: actions/checkout@v3 @@ -139,7 +139,8 @@ jobs: --cargs=\" -DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON -DUSE_EXPLICIT_INSTANTIATION=OFF - -DLLVM_DIR=/usr/local/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm + -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install + -DLLVM_DIR=/opt/homebrew/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm \" - name: test run: cd build && ctest -V diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9b36595c9..5514f2d856 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -186,7 +186,7 @@ jobs: github.event_name != 'workflow_dispatch' || github.event.inputs.type == 'all' || github.event.inputs.type == 'mac' - runs-on: macos-latest + runs-on: macos-13 # Last macos runner befor M1 (macos-14) env: CXX: clang++ steps: @@ -198,5 +198,8 @@ jobs: ./ci/build.sh -v --build-type=Release --components=\"core,python,bin,view,render,test\" + --cargs=\' + -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install + \' - name: test run: cd build && ctest -V diff --git a/.github/workflows/houdini.yml b/.github/workflows/houdini.yml index 8252cf5473..21c16a2048 100644 --- a/.github/workflows/houdini.yml +++ b/.github/workflows/houdini.yml @@ -159,16 +159,7 @@ jobs: cp hou/hou.tar.gz $HOME/houdini_install/hou.tar.gz cd $HOME/houdini_install && tar -xzf hou.tar.gz && cd - - name: install_deps - run: | - # Remove Python3 symlinks in /usr/local/bin as workaround to brew update issues - # https://github.com/actions/setup-python/issues/577 - rm /usr/local/bin/2to3* || : - rm /usr/local/bin/idle3* || : - rm /usr/local/bin/pydoc* || : - rm /usr/local/bin/python3* || : - brew update - brew install bash gnu-getopt cmake boost glfw googletest openexr pybind11 llvm@15 cppunit - echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH + run: ./ci/install_macos.sh ${{ matrix.config.llvm }} - name: build run: | ./ci/build.sh -v \ @@ -182,6 +173,7 @@ jobs: -DDISABLE_DEPENDENCY_VERSION_CHECKS=ON \ -DUSE_EXPLICIT_INSTANTIATION=OFF \ -DLLVM_DIR=/usr/local/opt/llvm@15/lib/cmake/llvm \ + -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \" - name: test run: cd build && ctest -V diff --git a/.github/workflows/nanovdb.yml b/.github/workflows/nanovdb.yml index 35c25010e4..2510a90e39 100644 --- a/.github/workflows/nanovdb.yml +++ b/.github/workflows/nanovdb.yml @@ -122,9 +122,7 @@ jobs: run: .\ci\install_windows_cuda.ps1 - name: install_deps shell: bash - run: | - vcpkg update - vcpkg install zlib tbb gtest blosc boost-iostreams boost-system boost-any boost-uuid boost-interprocess boost-algorithm + run: ./ci/install_windows.sh - name: build shell: bash run: > diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index 7e26ca9305..71e36f7bf3 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -111,6 +111,8 @@ jobs: (github.event_name != 'workflow_dispatch' || github.event.inputs.type == 'all' || github.event.inputs.type == 'houdini') + # Note that macos-14 (current macos-latest) switches to M1. We could instead test + # the arm build here instead of the x86 one. runs-on: macos-latest name: macos-houdini-20 env: @@ -198,7 +200,7 @@ jobs: # Disable the clang job for now. See https://github.com/actions/runner-images/issues/8659 # - { runson: ubuntu-latest, cxx: clang++, cmake: '' } # @todo gcc on macos - - { runson: macos-latest, cxx: '', cmake: '-D CMAKE_CXX_COMPILER=/usr/local/opt/llvm@15/bin/clang++' } + - { runson: macos-latest, cxx: '', cmake: '-D CMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm@15/bin/clang++' } fail-fast: false steps: - uses: actions/checkout@v3 @@ -291,7 +293,7 @@ jobs: github.event_name != 'workflow_dispatch' || github.event.inputs.type == 'all' || github.event.inputs.type == 'ax' - runs-on: macos-latest + runs-on: macos-13 name: macos-cxx:${{ matrix.config.cxx }}-llvm:${{ matrix.config.llvm }}-${{ matrix.config.build }} env: CXX: ${{ matrix.config.cxx }} @@ -314,7 +316,8 @@ jobs: --cargs=\" -DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON -DUSE_EXPLICIT_INSTANTIATION=OFF - -DLLVM_DIR=/usr/local/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm + -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install + -DLLVM_DIR=/opt/homebrew/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm \" - name: test run: cd build && ctest -V diff --git a/ci/install_macos.sh b/ci/install_macos.sh index 39d89ba191..7707dbb1e9 100755 --- a/ci/install_macos.sh +++ b/ci/install_macos.sh @@ -33,6 +33,7 @@ echo "/usr/local/opt/$py_version/bin" >> $GITHUB_PATH # use gnu-getopt echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH +echo "/opt/homebrew/opt/gnu-getopt/bin" >> $GITHUB_PATH LLVM_VERSION=$1 if [ ! -z "$LLVM_VERSION" ]; then diff --git a/ci/install_windows.sh b/ci/install_windows.sh index 939668c4b3..9620ee42a7 100755 --- a/ci/install_windows.sh +++ b/ci/install_windows.sh @@ -1,8 +1,44 @@ #!/usr/bin/env bash -set -ex +set -x +set -e +# Required dependencies +VCPKG_INSTALL_CMD="vcpkg install + zlib + libpng + openexr + tbb + gtest + cppunit + blosc + glfw3 + glew + python3 + jemalloc + boost-iostreams + boost-interprocess + boost-algorithm + pybind11 + --clean-after-build" + +# Update vcpkg vcpkg update -vcpkg install zlib libpng openexr tbb gtest cppunit blosc glfw3 glew python3 jemalloc \ - boost-iostreams boost-interprocess boost-algorithm pybind11 \ - --clean-after-build + +# Allow the vcpkg command to fail once so we can retry with the latest +set +e +$VCPKG_INSTALL_CMD +STATUS=$? + +# Subsequent commands cannot fail +set -x + +if [ $STATUS -ne 0 ]; then + # Try once more with latest ports + echo "vcpkg install failed, retrying with latest ports..." + cd $VCPKG_INSTALLATION_ROOT && git pull && cd- + vcpkg update + $VCPKG_INSTALL_CMD +fi + +echo "vcpkg install completed successfully"