-
Notifications
You must be signed in to change notification settings - Fork 73
40 lines (32 loc) · 1.06 KB
/
build-mac.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: build-mac
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
ctestArgs:
description: 'CTest arguments'
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install deps
# NOTE: We need to ensure jpeg-turbo is at least version 2.14
run: brew update
&& brew install fontconfig freetype openssl libxml2 jpeg-turbo libpng libtiff libidn
- name: Configure CMake
# NOTE: OpenSSL prefix must be explicitly set
run:
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_PREFIX_PATH=`brew --prefix` -DFontconfig_INCLUDE_DIR=`brew --prefix fontconfig`/include -DOPENSSL_ROOT_DIR=`brew --prefix openssl@3`
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest ${{ github.event.inputs.ctestArgs }}