-
Notifications
You must be signed in to change notification settings - Fork 15
108 lines (92 loc) · 4.04 KB
/
ubuntu.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
name: Ubuntu
on:
- push
- pull_request
env:
CMAKE_VERSION: 3.30.3
CCACHE_VERSION: 4.10.2
jobs:
build:
strategy:
fail-fast: false
matrix:
config: [
{os: ubuntu-20.04, compiler_name: gcc-10, c_compiler: gcc-10, cxx_compiler: g++-10},
{os: ubuntu-20.04, compiler_name: clang-10, c_compiler: clang-10, cxx_compiler: clang++-10},
{os: ubuntu-20.04, compiler_name: clang-11, c_compiler: clang-11, cxx_compiler: clang++-11},
{os: ubuntu-20.04, compiler_name: clang-12, c_compiler: clang-12, cxx_compiler: clang++-12},
{os: ubuntu-22.04, compiler_name: gcc-10, c_compiler: gcc-10, cxx_compiler: g++-10},
{os: ubuntu-22.04, compiler_name: gcc-11, c_compiler: gcc-11, cxx_compiler: g++-11},
{os: ubuntu-22.04, compiler_name: gcc-12, c_compiler: gcc-12, cxx_compiler: g++-12},
{os: ubuntu-22.04, compiler_name: clang-13, c_compiler: clang-13, cxx_compiler: clang++-13},
{os: ubuntu-22.04, compiler_name: clang-14, c_compiler: clang-14, cxx_compiler: clang++-14},
{os: ubuntu-22.04, compiler_name: clang-15, c_compiler: clang-15, cxx_compiler: clang++-15},
{os: ubuntu-24.04, compiler_name: gcc-12, c_compiler: gcc-12, cxx_compiler: g++-12},
{os: ubuntu-24.04, compiler_name: gcc-13, c_compiler: gcc-13, cxx_compiler: g++-13},
{os: ubuntu-24.04, compiler_name: gcc-14, c_compiler: gcc-14, cxx_compiler: g++-14},
{os: ubuntu-24.04, compiler_name: clang-16, c_compiler: clang-16, cxx_compiler: clang++-16},
{os: ubuntu-24.04, compiler_name: clang-17, c_compiler: clang-17, cxx_compiler: clang++-17},
{os: ubuntu-24.04, compiler_name: clang-18, c_compiler: clang-18, cxx_compiler: clang++-18},
]
build_type: [Debug, Release, Sanitize]
name: ${{matrix.config.os}} - ${{matrix.config.compiler_name}} - ${{matrix.build_type}}
runs-on: ${{matrix.config.os}}
env:
CMAKE_GENERATOR: "Unix Makefiles"
CC: ${{matrix.config.c_compiler}}
CXX: ${{matrix.config.cxx_compiler}}
steps:
- name: Checkout dynamic_bitset
uses: actions/checkout@v4
with:
submodules: recursive
path: dynamic_bitset
- name: Setup CMake
id: cmake
uses: ./dynamic_bitset/.github/actions/setup_cmake
with:
cmake_version: ${{env.CMAKE_VERSION}}
used_env: ${{matrix.config.os}}
- name: Setup ccache
id: ccache
uses: ./dynamic_bitset/.github/actions/setup_ccache
with:
ccache_version: ${{env.CCACHE_VERSION}}
used_env: ${{matrix.config.os}}
cache_id: ${{matrix.config.os}}-${{matrix.config.compiler_name}}-${{matrix.build_type}}
- name: CMake version
run: ${{steps.cmake.outputs.cmake_binary}} --version
- name: CTest version
run: ${{steps.cmake.outputs.ctest_binary}} --version
- name: Ccache version
run: ${{steps.ccache.outputs.ccache_binary}} --version
- name: Make version
run: make --version
- name: C compiler version
run: ${CC} --version
- name: C++ compiler version
run: ${CXX} --version
- name: Configure
run: >-
${{steps.cmake.outputs.cmake_binary}}
-S "${{github.workspace}}/dynamic_bitset"
-B "${{github.workspace}}/dynamic_bitset/build"
-D CMAKE_CONFIGURATION_TYPES=${{matrix.build_type}}
-D CMAKE_BUILD_TYPE=${{matrix.build_type}}
-D CMAKE_C_COMPILER_LAUNCHER=${{steps.ccache.outputs.ccache_binary}}
-D CMAKE_CXX_COMPILER_LAUNCHER=${{steps.ccache.outputs.ccache_binary}}
- name: Build
run: >-
${{steps.cmake.outputs.cmake_binary}}
--build "${{github.workspace}}/dynamic_bitset/build"
--config ${{matrix.build_type}}
--parallel $(nproc)
- name: Ccache stats
run: >-
${{steps.ccache.outputs.ccache_binary}} --show-stats
- name: Run tests
run: >-
${{steps.cmake.outputs.ctest_binary}}
--test-dir "${{github.workspace}}/dynamic_bitset/build"
--output-on-failure
--parallel $(nproc)