Restore GitHub Actions workflow #39
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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| PYTHON_VERSION: '3.12' | |
| jobs: | |
| build-macos: | |
| strategy: | |
| matrix: | |
| include: | |
| # macOS 26.3 + Xcode 26.3 | |
| - name: "macOS 26.3 + Xcode 26.3" | |
| os: macos-26 | |
| compiler: xcode | |
| version: "26.3" | |
| # macOS 15.7.4 + Xcode 16.4 | |
| - name: "macOS 15.7.4 + Xcode 16.4" | |
| os: macos-15 | |
| compiler: xcode | |
| version: "16.4" | |
| # macOS 26.3 + gcc-15 | |
| - name: "macOS 26.3 + gcc-15" | |
| os: macos-26 | |
| compiler: gcc | |
| version: "15" | |
| # macOS 26.3 + gcc-14 | |
| - name: "macOS 26.3 + gcc-14" | |
| os: macos-26 | |
| compiler: gcc | |
| version: "14" | |
| # macOS 26.3 + gcc-13 | |
| - name: "macOS 26.3 + gcc-13" | |
| os: macos-26 | |
| compiler: gcc | |
| version: "13" | |
| runs-on: ${{ matrix.os }} | |
| name: 🍎 Build - ${{ matrix.name }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Configure Compiler | |
| run: | | |
| if [ "${{ matrix.compiler }}" = "gcc" ]; then | |
| echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV | |
| echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV | |
| else | |
| ls -ls /Applications/ | |
| sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app | |
| echo "CC=clang" >> $GITHUB_ENV | |
| echo "CXX=clang++" >> $GITHUB_ENV | |
| fi | |
| - name: Configure Build | |
| run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. | |
| - name: Build | |
| run: cd build && make | |
| - name: Run Unit Test | |
| run: /Users/runner/work/baba-is-auto/baba-is-auto/build/bin/UnitTests | |
| - name: Run Python Test | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements.txt | |
| python -m pip install . | |
| python -m pytest Tests/PythonTests/ |