-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (41 loc) · 1.26 KB
/
linux.yml
File metadata and controls
50 lines (41 loc) · 1.26 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
name: linux
on:
pull_request:
branches: [ "release" ]
push:
branches: [ "release" ]
env:
BUILD_TYPE: Release
jobs:
linux:
strategy:
fail-fast: false
matrix:
compiler:
- { cc: "gcc-10", cxx: "g++-10", os: "ubuntu-22.04" }
- { cc: "clang-12", cxx: "clang++-12", os: "ubuntu-22.04" }
name: ${{ matrix.compiler.cc }}
runs-on: ${{ matrix.compiler.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Compiler
run: |
if [[ "${{ matrix.compiler.cc }}" == "clang"* ]]; then
sudo apt-get update
sudo apt-get install -y ${{ matrix.compiler.cc }}
else
sudo apt-get update
sudo apt-get install -y ${{ matrix.compiler.cxx }}
fi
- name: Setup dependencies
run: sudo apt-get install liburing-dev
- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build \
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} \
-DNETCPP_TEST=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Google Test
working-directory: ${{github.workspace}}/build/bin
run: ./unitTest