-
Notifications
You must be signed in to change notification settings - Fork 5
114 lines (95 loc) · 3.21 KB
/
pipeline.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
name: Libdbc Pipeline
on: [push]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
linux-builds:
name: ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cxx:
- g++-13
- clang++-16
build_type: [Debug, Release]
std: [11]
include:
- cxx: g++-13
cc: gcc-13
- cxx: clang++-16
cc: clang-16
llvm_version: 16
steps:
- uses: actions/checkout@v4
- name: Install clang
if: ${{ matrix.llvm_version }}
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{ matrix.llvm_version }}
- name: Prepare environment
run: |
sudo apt-get update
sudo apt-get install -y locales
sudo locale-gen de_DE.UTF-8
- name: Configure build
working-directory: ${{runner.workspace}}
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
run: |
cmake -Bbuild -H$GITHUB_WORKSPACE \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
-DCMAKE_CXX_EXTENSIONS=ON \
-DDBC_TEST_LOCALE_INDEPENDENCE=ON
- name: Build tests + lib
working-directory: ${{runner.workspace}}
run: cmake --build build --parallel `nproc`
- name: Run tests
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}
run: ctest --output-on-failure --test-dir build -j `nproc`
windows-build:
name: ${{matrix.os}}, ${{matrix.std}}, ${{matrix.build_type}}, ${{matrix.platform}}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022]
platform: [Win32, x64]
build_type: [Debug, Release]
std: [11]
steps:
- uses: actions/checkout@v4
- name: Configure build
working-directory: ${{runner.workspace}}
run: |
cmake -S $Env:GITHUB_WORKSPACE `
-B ${{runner.workspace}}/build `
-A ${{matrix.platform}} `
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} `
-DCMAKE_CXX_STANDARD=${{matrix.std}} `
-DCMAKE_CXX_STANDARD_REQUIRED=ON `
-DCMAKE_CXX_EXTENSIONS=ON `
-DDBC_TEST_LOCALE_INDEPENDENCE=ON
- name: Build tests + lib
working-directory: ${{runner.workspace}}
run: cmake --build build --config ${{matrix.build_type}} --parallel %NUMBER_OF_PROCESSORS%
shell: cmd
- name: Run tests
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}
run: ctest --output-on-failure --test-dir build -j %NUMBER_OF_PROCESSORS%
shell: cmd
format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test format with clang format
run: ./scripts/fmt.sh