deskflow/.github/workflows/job-test-mac.yml
Kyle Bloom 446b0a2e95
Update workflows (#7283)
* Update test actions

* Format stale issues

* Format jira issues workflow

* Format changelog check workflow

* Format build workflows

* Format create build

Also add make full action to remove core installs

* Format codeql analysis

* Add .nvmrc

* Update changelog

* Add concurrency group to CodeQL

* sudo install

* Update to windows latest

* Upgrade fedora distro list

* Add arch to runtime matrix

* Fix path for m1 builds

* Add enterprise and business flags
2023-09-25 17:26:06 +01:00

68 lines
1.5 KiB
YAML

name: Mac
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 }}
defaults:
run:
shell: ${{ matrix.runtime.shell }}
strategy:
matrix:
runtime:
- os: "macos-latest"
arch: x64
target: "10.14"
shell: "bash"
- os: [self-hosted, macOS, arm64]
arch: arm64
target: "11"
shell: "/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}"
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 brew dependencies
run: brew bundle --file=- <<< "brew 'qt5'; brew 'openssl'"
- name: Build
env:
CMAKE_OSX_DEPLOYMENT_TARGET: ${{ matrix.runtime.target }}
run: |
mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$(brew --prefix qt5);$(brew --prefix openssl)" ..
. ./version
make -j
- name: Run unit test
run: ./build/bin/unittests