-
Notifications
You must be signed in to change notification settings - Fork 29
62 lines (54 loc) · 1.51 KB
/
build-PR.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
name: Build and Test
on:
push:
branches:
- 'master'
pull_request:
jobs:
unix:
strategy:
matrix:
os: [ubuntu, macos]
compiler: [g++, clang++]
exclude:
- os: macos
compiler: g++
name: ${{matrix.os}} (${{matrix.compiler}})
runs-on: ${{matrix.os}}-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update
sudo apt-get install --yes libpng++-dev libunittest++-dev
sudo apt-get install --yes fonts-noto-cjk
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install unittest-cpp
brew tap homebrew/cask-fonts
brew install font-noto-sans-cjk
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Build
shell: bash
run: |
export CXX=${{matrix.compiler}}
$CXX --version
mkdir build && cd build
cmake -G "Unix Makefiles" -DLOMSE_RUN_TESTS=OFF ..
make
- name: Run tests
shell: bash
run: |
cd build
./testlib
# - name: Upload logs on fail
# if: ${{ failure() }}
# uses: actions/upload-artifact@v3
# with:
# name: Build failure logs
# path: ${{ runner.temp }}/build_logs