* Test * Fixed Mac image names * Version lock to macOS 14 * Change name of Homebrew Qt package * Use CMake to build * Remove dep already installed * Remove version source * Remove env var not needed * Add homebrew path to CMake presets * Revert "Add homebrew path to CMake presets" This reverts commit 6b1342cdc2f412cad3e840e51e3e018dd7470d21. * Add Qt prefix to workflow * Upgrade CodeQL analysis to v2 * Rename SonarCloud workflow for convention * Delete test file * Upgrade CodeQL analysis to v3
69 lines
1.5 KiB
YAML
69 lines
1.5 KiB
YAML
name: "Test macOS"
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
concurrency:
|
|
group: "${{ github.workflow }}-${{ github.ref || github.run_id }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test-macos:
|
|
runs-on: ${{ matrix.runtime.os }}
|
|
timeout-minutes: 10
|
|
|
|
defaults:
|
|
run:
|
|
shell: ${{ matrix.runtime.shell }}
|
|
|
|
strategy:
|
|
matrix:
|
|
runtime:
|
|
- name: "macos-10-intel"
|
|
os: "macos-14-large"
|
|
arch: x64
|
|
target: "10.14"
|
|
shell: "bash"
|
|
- name: "macos-11-m1"
|
|
os: "macos-14"
|
|
arch: arm64
|
|
target: "11"
|
|
shell: "/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}"
|
|
|
|
name: ${{ matrix.runtime.name }}
|
|
|
|
env:
|
|
GIT_COMMIT: ${{ github.sha }}
|
|
|
|
steps:
|
|
- name: Setup PATH
|
|
run: |
|
|
case "$ARCH" in
|
|
"arm64")
|
|
echo "/opt/homebrew/bin" >> $GITHUB_PATH
|
|
;;
|
|
esac
|
|
env:
|
|
ARCH: ${{ matrix.runtime.arch }}
|
|
|
|
- name: Checkout git repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: "recursive"
|
|
|
|
- name: Install Qt5
|
|
run: brew install qt@5
|
|
|
|
- name: Configure
|
|
env:
|
|
CMAKE_OSX_DEPLOYMENT_TARGET: ${{ matrix.runtime.target }}
|
|
run: cmake -B build --preset=macos-release -DCMAKE_PREFIX_PATH=$(brew --prefix qt@5)
|
|
|
|
- name: Build
|
|
run: cmake --build build
|
|
|
|
- name: Run unit test
|
|
run: ./build/bin/unittests
|