-
-
Notifications
You must be signed in to change notification settings - Fork 65
110 lines (92 loc) · 2.92 KB
/
trunk.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
99
100
101
102
103
104
105
106
107
108
109
110
name: Trunk
on:
push:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
compiler: [gcc10, gcc11, gcc12, gcc13, clang15, clang16]
build_type: [Debug]
standard: [17]
sanitizers: [OFF]
include:
- compiler: gcc13 # Extra test for C++20
standard: 20
- compiler: gcc13 # Extra test for Release
build_type: Release
- compiler: clang16 # Extra test for C++20
standard: 20
sanitizers: ON # Also run with sanitizers
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Bulid docker image
shell: bash
run: |
docker build \
--build-arg CXX_STANDARD=${{matrix.standard}} \
--build-arg USE_SANITIZERS=${{matrix.sanitizers}} \
-t pisa -f- . < "${{runner.workspace}}/pisa/test/docker/${{matrix.compiler}}/Dockerfile"
- name: Test
shell: bash
run: docker run pisa ctest -VV -j 4
mac_tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
name: [macos-xcode-13.2]
include:
- name: macos-xcode-13.2
os: macos-latest
compiler: "xcode"
version: "13.2"
steps:
- uses: actions/checkout@v2
- name: Install (macOS)
if: runner.os == 'macOS'
run: |
brew install autoconf automake libtool cmake
sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
echo "CC=$(xcrun -f clang)" >> $GITHUB_ENV
echo "CXX=$(xcrun -f clang++)" >> $GITHUB_ENV
echo "SDKROOT=$(xcodebuild -version -sdk macosx Path)" >> $GITHUB_ENV
echo "PATH=$(dirname $(xcrun -f clang)):$PATH" >> $GITHUB_ENV
- name: Create Build Environment
shell: bash
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake "$GITHUB_WORKSPACE" -DCMAKE_BUILD_TYPE=Debug -DPISA_BUILD_TOOLS=ON -DPISA_CI_BUILD=ON ..
- name: Build
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config Debug -- -j 4
- name: Test
shell: bash
working-directory: ${{runner.workspace}}/build
run: ctest -VV -j 4
tidy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Bulid docker image
shell: bash
run: docker build -t pisa -f- . < "${{runner.workspace}}/pisa/test/docker/tidy/Dockerfile"
system-deps:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Bulid docker image
shell: bash
run: docker build -t pisa -f- . < "${{runner.workspace}}/pisa/test/docker/system-deps/Dockerfile"
- name: Test
shell: bash
run: docker run pisa ctest -VV -j 4