blob: 5ae7ba73a2d4bbdc40fee7779e3bf037fbda6ebf [file] [log] [blame]
Jiayu Liuc6f18a52022-05-22 04:01:43 +08001name: 'Build with CMake'
2
3on:
4 push:
5 branches: [ '*' ]
6 pull_request:
7 branches: [ '*' ]
8
9env:
10 BUILD_DEPS: bison flex g++ libboost-all-dev libevent-dev libssl-dev make cmake
11
12jobs:
13 compiler:
14 runs-on: ubuntu-20.04
15 steps:
16 - uses: actions/checkout@v3
17
18 - name: Install dependencies
19 run: |
20 sudo apt-get update -yq
21 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
22
23 - name: Generate makefile using CMake
24 run: |
25 mkdir cmake_build
26 cd cmake_build
27 cmake .. -DBUILD_LIBRARIES=OFF
28
29 - name: Run make
30 run: |
31 cd cmake_build
32 cmake --build .
33
34 - name: Run test
35 run: |
36 cd cmake_build
37 ctest -j$(nproc)