Repository navigation
91 lines (77 loc) · 1.87 KB
/
Copy pathci.yml
File metadata and controls
91 lines (77 loc) · 1.87 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-22.04
strategy:
matrix:
compiler:
- gcc-11
- gcc-12
include:
- compiler: gcc-11
cxx: g++-11
- compiler: gcc-12
cxx: g++-12
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
${{ matrix.compiler }} \
${{ matrix.cxx }} \
libboost-all-dev \
libunittest++-dev \
doxygen \
gdb \
libzookeeper-mt-dev \
ccache
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.compiler }}
- name: Configure ccache
run: |
export PATH="/usr/lib/ccache:$PATH"
export CXX=${{ matrix.cxx }}
export CC=${{ matrix.compiler }}
ccache --set-config=max_size=500M
- name: Generate build files
run: |
export CXX=${{ matrix.cxx }}
export CC=${{ matrix.compiler }}
sh autogen.sh
- name: Configure
run: |
export CXX=${{ matrix.cxx }}
export CC=${{ matrix.compiler }}
mkdir -p build
cd build
sh ../configure --prefix=$(pwd)
- name: Build
run: |
export CXX=${{ matrix.cxx }}
export CC=${{ matrix.compiler }}
cd build
make -j$(nproc)
- name: Install
run: |
cd build
make install
- name: Run tests
run: |
cd build
make -j$(nproc) check
- name: Show ccache statistics
run: ccache --show-stats