-
-
Notifications
You must be signed in to change notification settings - Fork 44
98 lines (84 loc) · 2.54 KB
/
macos-ci.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: 'MacOS-CI'
on:
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
continue-on-error: true
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os:
- macos-11
- macos-12
compiler:
- clang
- gcc
homebrew-gl:
- true
# - false
homebrew-al:
- true
- false
steps:
# The following dependencies are already present within macos-* images:
# - clang (llvm)
# - cmake
# - expat
# - gcc
# - git
# - jpeg
# - libpng
# - libvorbis
# - python
- name: Install dependencies using homebrew
run: brew install boost-python3 gtk+3 gtkglext sdl
# The following Apple-provided libraries are deprecated:
# * OpenGL as of MacOS 10.14
# * GLUT as of MacOS 10.9
- name: Optionally install homebrewed OpenGL and GLUT
if: ${{ matrix.homebrew-gl }}
run: |
brew install mesa mesa-glu freeglut
ln -s /usr/local/include/GL /usr/local/include/OpenGL
ln -s /usr/local/include/GL /usr/local/include/GLUT
# ln -s /usr/local/lib/libGL.dylib /usr/local/lib/libOpenGL.dylib
# find /usr/local/lib/ -iname '*gl*.dylib'
# The Apple-provided OpenAL is deprecated as of MacOS 10.15
- name: Optionally install homebrewed OpenAL
if: ${{ matrix.homebrew-al }}
run: brew install openal-soft
- name: Check out repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
with:
fetch-depth: 2
submodules: false
- name: Conditionally relocate to PR HEAD
if: github.event.pull_request
run: git checkout HEAD^2
- name: Build it
env:
MY_OS_NAME: macos
COMPILER: ${{ matrix.compiler }}
FLAGS: -DCMAKE_FIND_FRAMEWORK=LAST
OPENALDIR: "/usr/local/opt/openal-soft"
run: script/cibuild $FLAGS
- name: Test
working-directory: ${{github.workspace}}/build
env:
GTEST_OUTPUT: xml
GTEST_COLOR: 1
run: ctest -V
- name: Upload test results
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce #v3.1.2
if: failure()
with:
name: test_results_xml
path: ${{github.workspace}}/build/test-results/**/*.xml