-
Notifications
You must be signed in to change notification settings - Fork 5
146 lines (139 loc) · 4.99 KB
/
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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
##==================================================================================================
## KIWAKU - Containers Well Made
## Copyright : KIWAKU Contributors & Maintainers
## SPDX-License-Identifier: BSL-1.0
##==================================================================================================
name: Kiwaku - Unit Tests
on:
pull_request:
branches:
- main
concurrency:
group: unit-${{ github.ref }}
cancel-in-progress: true
jobs:
gcc-linux:
runs-on: [ubuntu-latest]
container:
image: ghcr.io/jfalcou/compilers:v7
strategy:
fail-fast: false
matrix:
cfg:
- { opts: -O0 }
- { opts: -Ofast -flto=auto -DNDEBUG }
steps:
- name: Fetch current branch
uses: actions/checkout@v4
- name: Setup Kiwaku using g++-12 with ${{ matrix.cfg.opts }}
run: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_CXX_FLAGS="${{ matrix.cfg.opts }}"
- name: Compile Unit Tests
run: cd build && ninja -j 2
- name: Run Unit Tests
run: cd build && ctest -j 2
clang-linux:
runs-on: [ubuntu-latest]
container:
image: ghcr.io/jfalcou/compilers:v7
strategy:
fail-fast: false
matrix:
cfg:
- { opts: -O0 , linker: }
- { opts: "-Ofast -flto -DNDEBUG" , linker: }
- { opts: "-Ofast -flto -DNDEBUG -stdlib=libc++", linker: -stdlib=libc++ }
- { opts: "-O0 -stdlib=libc++" , linker: -stdlib=libc++ }
steps:
- name: Fetch current branch
uses: actions/checkout@v4
- name: Running CMake for clang++ with ${{ matrix.cfg.opts }}
run: |
mkdir build && cd build
cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="${{ matrix.cfg.opts }}" -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.cfg.linker }}"
- name: Compiling Unit Tests
run: cd build && make unit -j 2
- name: Running Unit Tests
run: cd build && ctest --output-on-failure -j 2
clang-macosx:
runs-on: [macos-14]
strategy:
fail-fast: false
matrix:
cfg:
- { opts: -O0 , linker: }
- { opts: "-O0 -stdlib=libc++" , linker: -stdlib=libc++ }
- { opts: "-Ofast -flto -DNDEBUG" , linker: }
- { opts: "-Ofast -flto -DNDEBUG -stdlib=libc++", linker: -stdlib=libc++ }
steps:
- name: Fetch current branch
uses: actions/checkout@v4
- name: Running CMake for clang++ with ${{ matrix.cfg.opts }}
run: |
mkdir build && cd build
cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="${{ matrix.cfg.opts }}" -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.cfg.linker }}"
- name: Compiling Unit Tests
run: cd build && make unit -j 2
- name: Running Unit Tests
run: cd build && ctest --output-on-failure -j 2
gcc-macosx:
runs-on: [macos-14]
strategy:
fail-fast: false
matrix:
cfg:
- { opts: -O0 }
- { opts: -Ofast -flto -DNDEBUG }
steps:
- name: Fetch current branch
uses: actions/checkout@v4
- name: Running CMake for g++ with ${{ matrix.cfg.opts }}
run: |
mkdir build && cd build
cmake .. -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_CXX_FLAGS="${{ matrix.cfg.opts }}"
- name: Compiling Unit Tests
run: cd build && make unit -j 2
- name: Running Unit Tests
run: cd build && ctest --output-on-failure -j 2
android:
runs-on: [macos-14]
strategy:
fail-fast: false
matrix:
cfg:
- { opts: -O0 }
- { opts: -Ofast -flto -DNDEBUG }
steps:
- name: Fetch current branch
uses: actions/checkout@v4
- name: Running CMake for g++ with ${{ matrix.cfg.opts }}
run: |
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake -DCMAKE_CXX_FLAGS="${{ matrix.cfg.opts }}" -DANDROID_ABI=arm64-v8a
- name: Compiling Unit Tests
run: cd build && make unit -j 2
# msvc:
# runs-on: [windows-2022]
# strategy:
# fail-fast: false
# matrix:
# cfg:
# - { mode: Debug }
# - { mode: Release}
# steps:
# - name: Fetch current branch
# uses: actions/checkout@v4
# - name: Running CMake for MSVC ${{ matrix.cfg.mode }}
# run: |
# mkdir build && cd build
# cmake -G "Visual Studio 17 2022" -A x64 .. -DKIWAKU_BUILD_TEST=ON
# - name: Compiling Unit Tests
# run: |
# cd build
# cmake --build . --target unit --config ${{ matrix.cfg.mode }} --parallel 2
# - name: Running Tests
# run: |
# cd build
# ctest -C ${{ matrix.cfg.mode }} --output-on-failure