Skip to content

Commit a3bb343

Browse files
committed
Added CI workflow for macOS.
1 parent 5755cb5 commit a3bb343

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

‎.github/workflows/build-macos.yml‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Build on macOS
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
BUILD_TYPE: Release
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.runs-on }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- { icon: '🍎', sys: clang, runs-on: 'macos-latest' }
16+
- { icon: '🍏', sys: gcc, runs-on: 'macos-latest' }
17+
name: 🚧${{ matrix.icon }} ${{ matrix.sys }}
18+
19+
steps:
20+
- name: '🧰 Checkout'
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
persist-credentials: false
25+
26+
- name: '${{ matrix.icon }} Install dependencies'
27+
run: |
28+
brew update
29+
brew install \
30+
gnu-sed \
31+
cmake \
32+
make \
33+
protobuf \
34+
zlib \
35+
libpng \
36+
glslang \
37+
portaudio \
38+
libogg \
39+
libvorbis \
40+
cairo \
41+
googletest \
42+
qt6 \
43+
pkg-config \
44+
molten-vk
45+
46+
- name: 'Set up Clang'
47+
run: |
48+
echo "CC=clang" >> $GITHUB_ENV
49+
echo "CXX=clang++" >> $GITHUB_ENV
50+
if: matrix.sys == 'clang'
51+
52+
- name: 'Set up GCC'
53+
run: |
54+
brew install gcc
55+
echo "CC=gcc-13" >> $GITHUB_ENV
56+
echo "CXX=g++-13" >> $GITHUB_ENV
57+
if: matrix.sys == 'gcc'
58+
59+
- name: '🚧 Build (Clang)'
60+
run: |
61+
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
62+
cmake --build build
63+
if: matrix.sys == 'clang'
64+
65+
- name: '🚧 Build (GCC)'
66+
run: |
67+
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
68+
cmake --build build
69+
if: matrix.sys == 'gcc'
70+
71+
- name: '🧪 Run TESTS'
72+
run: |
73+
cd build
74+
ctest --output-on-failure

0 commit comments

Comments
 (0)