diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 22a219d373e..61d2d0c2930 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -9,6 +9,7 @@ jobs: testing-osx: runs-on: macos-latest + steps: - name: Checkout code uses: actions/checkout@v4 @@ -30,14 +31,29 @@ jobs: pip install meson pip install ninja + - name: Cache CMake + uses: actions/cache@v3 + with: + path: /opt/cmake/${{ steps.cmake_version.outputs.version }} + key: cmake-${{ steps.cmake_version.outputs.version }}-${{ runner.os }}-${{ runner.arch }} + restore-keys: | + cmake-${{ runner.os }}-${{ runner.arch }} + - name: Install CMake versions + working-directory: /tmp run: | - brew install cmake@3.15.7 - brew install cmake@3.16.9 - brew install cmake@3.17.5 - brew install cmake@3.19.7 - brew install cmake@3.23.1 - + for version in 3.15.7 3.16.9 3.17.5 3.19.7 3.23.1; do + INSTALL_DIR=/opt/cmake/$version + if [ ! -d "$INSTALL_DIR" ]; then + curl -L https://github.com/Kitware/CMake/releases/download/v$version/cmake-$version.tar.gz -o cmake-$version.tar.gz + tar -xzf cmake-$version.tar.gz + cd cmake-$version/ + ./bootstrap --prefix=$INSTALL_DIR + make -j$(nproc) + make install + cd .. + rm -rf cmake-$version cmake-$version.tar.gz + fi - name: Install xcodegen run: | diff --git a/test/conftest.py b/test/conftest.py index 0ef3d5407df..d4eecef2ba2 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -68,27 +68,27 @@ "default": "3.15", "3.15": { "path": {'Windows': 'C:/cmake/cmake-3.15.7-win64-x64/bin', - 'Darwin': '/opt/homebrew/Cellar/cmake/3.15.7/bin', + 'Darwin': '/opt/cmake/3.15.7/bin', 'Linux': '/usr/share/cmake-3.15.7/bin'} }, "3.16": { "path": {'Windows': 'C:/cmake/cmake-3.16.9-win64-x64/bin', - 'Darwin': '/opt/homebrew/Cellar/cmake/3.16.9/bin', + 'Darwin': '/opt/cmake/3.16.9/bin', 'Linux': '/usr/share/cmake-3.16.9/bin'} }, "3.17": { "path": {'Windows': 'C:/cmake/cmake-3.17.5-win64-x64/bin', - 'Darwin': '/opt/homebrew/Cellar/cmake/3.17.5/bin', + 'Darwin': '/opt/cmake/3.17.5/bin', 'Linux': '/usr/share/cmake-3.17.5/bin'} }, "3.19": { "path": {'Windows': 'C:/cmake/cmake-3.19.7-win64-x64/bin', - 'Darwin': '/opt/homebrew/Cellar/cmake/3.19.7/bin', + 'Darwin': '/opt/cmake/3.19.7/bin', 'Linux': '/usr/share/cmake-3.19.7/bin'} }, "3.23": { "path": {'Windows': 'C:/cmake/cmake-3.23.1-win64-x64/bin', - 'Darwin': '/opt/homebrew/Cellar/cmake/3.23.1/bin', + 'Darwin': '/opt/cmake/3.23.1/bin', 'Linux': "/usr/share/cmake-3.23.5/bin"} }, "3.28": {