blob: 69b8cbe8d04e0d02bed1fa991233435377220f9b [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
Varun Sharmabd1e5db2022-09-14 07:31:30 -070012permissions:
13 contents: read
14
Jiayu Liuc6f18a52022-05-22 04:01:43 +080015jobs:
16 compiler:
17 runs-on: ubuntu-20.04
18 steps:
19 - uses: actions/checkout@v3
20
21 - name: Install dependencies
22 run: |
23 sudo apt-get update -yq
24 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
25
26 - name: Generate makefile using CMake
27 run: |
28 mkdir cmake_build
29 cd cmake_build
30 cmake .. -DBUILD_LIBRARIES=OFF
31
32 - name: Run make
33 run: |
34 cd cmake_build
35 cmake --build .
36
37 - name: Run test
38 run: |
39 cd cmake_build
40 ctest -j$(nproc)