Install cmake from source #10
This file contains 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: OSX Tests | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
jobs: | |
testing-osx: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
cache: 'pip' | |
- name: Install Python requirements | |
run: | | |
pip install -r conans/requirements.txt | |
pip install -r conans/requirements_server.txt | |
pip install -r conans/requirements_dev.txt | |
- name: Install Meson and Ninja | |
run: | | |
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: | | |
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 | |
done | |
- name: Install xcodegen | |
run: | | |
brew install xcodegen | |
- name: Run tests | |
run: | | |
python -m pytest -x -v --color=auto . |