Skip to content

CI: run macOS build for x64/arm64 CPUs #336

CI: run macOS build for x64/arm64 CPUs

CI: run macOS build for x64/arm64 CPUs #336

Workflow file for this run

name: macOS
on: [push]
jobs:
build-macos:
strategy:
matrix:
qt_version_major: [5, 6]
os: [macos-latest-large, macos-latest-xlarge]
runs-on: ${{matrix.os}}
name: build-${{matrix.os}}-qt${{matrix.qt_version_major}}
steps:
- name: Set globals
id: globals
run: |
echo qt_path=$(brew --prefix qt@${{matrix.qt_version_major}}) >> ${GITHUB_OUTPUT}
- name: Checkout
uses: actions/checkout@v2
- name: Install Qt
run: brew install qt@${{matrix.qt_version_major}}
- name: Install OpenCascade
run: brew install opencascade
- name: Install Assimp
run: brew install assimp
- name: Get count of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: Build
run: |
mkdir ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake --version
cmake .. \
-DMayo_BuildTests=ON \
-DMayo_BuildPluginAssimp=ON \
-DQT_DIR=${{steps.globals.outputs.qt_path}}/lib/cmake/Qt${{matrix.qt_version_major}}
cmake --build . \
--config Release \
--parallel ${{steps.cpu-cores.outputs.count}}
- name: Execute Unit Tests
working-directory: ${{github.workspace}}/build
run: |
./mayo.app/Contents/MacOS/mayo --runtests