Merge pull request #135 from CubbyFlow/lgtm #108
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: macOS | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-macos: | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.name }} | |
strategy: | |
matrix: | |
include: | |
# macOS 12.4 + Xcode 13.4.1 | |
- name: "macOS 12.4 + Xcode 13.4.1" | |
os: macos-12 | |
compiler: xcode | |
version: "13.4.1" | |
# macOS 11.6 + Xcode 13.2.1 | |
- name: "macOS 11.6 + Xcode 13.2.1" | |
os: macos-11 | |
compiler: xcode | |
version: "13.2.1" | |
# macOS 11.6 + Xcode 12.5.1 | |
- name: "macOS 11.6 + Xcode 12.5.1" | |
os: macos-11 | |
compiler: xcode | |
version: "12.5.1" | |
# macOS 11.6 + Xcode 11.7 | |
- name: "macOS 11.6 + Xcode 11.7" | |
os: macos-11 | |
compiler: xcode | |
version: "11.7" | |
# macOS 12.4 + gcc-11 | |
- name: "macOS 12.4 + gcc-11" | |
os: macos-12 | |
compiler: gcc | |
version: "11" | |
# macOS 11.6 + gcc-11 | |
- name: "macOS 11.6 + gcc-11" | |
os: macos-11 | |
compiler: gcc | |
version: "11" | |
# macOS 11.6 + gcc-10 | |
- name: "macOS 11.6 + gcc-10" | |
os: macos-11 | |
compiler: gcc | |
version: "10" | |
# macOS 11.6 + gcc-9 | |
- name: "macOS 11.6 + gcc-9" | |
os: macos-11 | |
compiler: gcc | |
version: "9" | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- 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/CubbyFlow/CubbyFlow/build/bin/UnitTests | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
- name: Run Python Test | |
run: | | |
pip install -r requirements.txt | |
pip install . | |
python -m pytest Tests/PythonTests/ |