Skip to content

Commit c0651ad

Browse files
committed
CI: add macOS workflow with LLVM 9
1 parent f3d54b7 commit c0651ad

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/macos.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
name: macOS CI
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
ubuntu:
12+
name: "macOS (llvm: ${{matrix.llvm}}, build: ${{matrix.build}})"
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
llvm: [9]
17+
build: ['RelWithDebInfo', 'Debug']
18+
19+
runs-on: macos-latest
20+
env:
21+
CC: clang
22+
CXX: clang++
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v3
27+
with:
28+
submodules: true
29+
30+
- name: Install dependencies
31+
run: brew install ccache llvm@${{matrix.llvm}} z3
32+
33+
- name: Set environment
34+
id: env
35+
run: |
36+
echo "CCACHE_BASEDIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
37+
echo "CCACHE_DIR=$GITHUB_WORKSPACE/.ccache" >> $GITHUB_ENV
38+
echo "CCACHE_COMPRESS=true" >> $GITHUB_ENV
39+
echo "CCACHE_COMPRESSLEVEL=6" >> $GITHUB_ENV
40+
echo "CCACHE_MAXSIZE=400M" >> $GITHUB_ENV
41+
42+
echo "/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
43+
44+
echo "::set-output name=timestamp::$(date -u +%Y-%m-%dT%H:%M:%S%z)"
45+
46+
- name: Set up ccache
47+
uses: actions/cache@v3
48+
with:
49+
path: .ccache
50+
key: macos-${{matrix.llvm}}-${{matrix.build}}-${{steps.env.outputs.timestamp}}
51+
restore-keys: macos-${{matrix.llvm}}-${{matrix.build}}
52+
53+
- name: Build Symbiotic
54+
run: |
55+
./system-build.sh -j"$(sysctl -n hw.logicalcpu)" build-type=${{matrix.build}} \
56+
llvm-config="$("$(brew --prefix llvm@${{matrix.llvm}})/bin/llvm-config" --cmakedir)"
57+
58+
- name: Run tests
59+
run: make -C tests
60+
61+
- name: ccache statistics
62+
run: ccache -s

0 commit comments

Comments
 (0)