-
Notifications
You must be signed in to change notification settings - Fork 54
48 lines (46 loc) · 1.22 KB
/
ci.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
compiler: [gcc, clang]
build_type: [debug, release]
steps:
- uses: actions/checkout@v4
- name: install-clang
if: matrix.compiler == 'clang'
run: |
sudo apt-get install -y clang
sudo update-alternatives --remove-all cc
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 14
- name: configure-debug
if: matrix.build_type == 'debug'
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DHASHMAP_BUILD_TESTS=ON -DHASHMAP_BUILD_EXAMPLES=ON ${GITHUB_WORKSPACE}
- name: configure-release
if: matrix.build_type == 'release'
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DHASHMAP_BUILD_TESTS=ON -DHASHMAP_BUILD_EXAMPLES=ON ${GITHUB_WORKSPACE}
- name: make
run: |
make VERBOSE=1 -C build
- name: install
run: |
cd build
sudo make install
- name: test
run: |
cd build
ctest --output-on-failure