-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (74 loc) · 2.48 KB
/
linux.yaml
File metadata and controls
76 lines (74 loc) · 2.48 KB
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
name: linux
on: [ push, pull_request ]
jobs:
linux:
strategy:
fail-fast: false
matrix:
include:
- compiler: llvm
compiler-version: 16
cxx: 20
- compiler: llvm
compiler-version: 17
cxx: 20
- compiler: llvm
compiler-version: 18
cxx: 20
- compiler: llvm
compiler-version: 19
deps: "clang-19"
cxx: 23
- compiler: gcc
compiler-version: 11
cxx: 20
deps: "g++-11"
- compiler: gcc
compiler-version: 12
cxx: 20
- compiler: gcc
compiler-version: 13
cxx: 20
- compiler: gcc
compiler-version: 14
cxx: 23
name: "${{ github.job }} (C++${{ matrix.cxx }}-${{ matrix.compiler }}-${{ matrix.compiler-version }})"
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: "${{ github.job }}-${{ matrix.compiler }}-${{ matrix.compiler-version }}"
max-size: "2G"
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y ninja-build ${{ matrix.deps }}
- name: Compile
run: |
if [[ "${{ matrix.compiler }}" == "llvm" ]]; then
export CC=clang-${{ matrix.compiler-version }}
export CXX=clang++-${{ matrix.compiler-version }}
elif [[ "${{ matrix.compiler }}" == "gcc" ]]; then
export CC=gcc-${{ matrix.compiler-version }}
export CXX=g++-${{ matrix.compiler-version }}
fi
sudo ln -s $(which ccache) /usr/local/bin/$CC
sudo ln -s $(which ccache) /usr/local/bin/$CXX
$CXX --version
cmake -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DORYX_CRT_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build
- name: Run tests
run: |
./build/kvdb-cpp_tests --success