-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (39 loc) · 1.22 KB
/
macos-unit.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
name: macOS unit
# adapted from: https://github.com/trase-cpp/trase/tree/master/.github/workflows
on:
push:
branches:
# - main
- develop
pull_request:
branches:
- '**'
jobs:
build-and-test:
name: macOS unit
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install libomp without linking
run: |
brew install libomp
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"
export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include"
export CXXFLAGS="$CXXFLAGS -I/usr/local/opt/libomp/include"
export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp"
- name: Make build directory
run: mkdir build_dir
- name: CMake configure
run: |
cmake .. -DCMAKE_BUILD_TYPE=Debug -DDTWC_BUILD_TESTING=ON
working-directory: build_dir
- name: CMake build
run: |
cmake --build . --parallel 2
working-directory: build_dir
- name: CMake test
run: |
ctest -j2 -C Debug --output-on-failure
working-directory: build_dir