Merge pull request #893 from utilForever/update-ci #540
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: | |
strategy: | |
matrix: | |
include: | |
# macOS 14 + Xcode 15.4 | |
- name: "macOS 14 + Xcode 15.4" | |
os: macos-14 | |
compiler: xcode | |
version: "15.4" | |
# macOS 14 + Xcode 15.0.1 | |
- name: "macOS 14 + Xcode 15.0.1" | |
os: macos-14 | |
compiler: xcode | |
version: "15.0.1" | |
# macOS 14 + gcc-13 | |
# - name: "macOS 14 + gcc-13" | |
# os: macos-14 | |
# compiler: gcc | |
# version: "13" | |
# macOS 14 + gcc-12 | |
- name: "macOS 14 + gcc-12" | |
os: macos-14 | |
compiler: gcc | |
version: "12" | |
# macOS 14 + gcc-11 | |
- name: "macOS 14 + gcc-11" | |
os: macos-14 | |
compiler: gcc | |
version: "11" | |
runs-on: ${{ matrix.os }} | |
name: 🍎 Build - ${{ matrix.name }} | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
# NOTE: Linker ICEs with Xcode 15.0.1 (default version on macos-14) | |
# Remove this step if the default gets changed to 15.1 in actions/runner-images. | |
- name: Switch to Xcode v15.1 | |
if: matrix.compiler == 'gcc' | |
run: sudo xcode-select -switch /Applications/Xcode_15.1.app | |
- 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/RosettaStone/RosettaStone/build/bin/UnitTests | |
- name: Run Python Test | |
run: | | |
pip3 install -r requirements.txt --break-system-packages | |
pip3 install . --break-system-packages | |
python3 -m pytest Tests/PythonTests/ |