blob: c4ff747b549c4b437f774ba5a4ff4c3c60c332f0 [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:
Sven Roederer502a46a2024-07-06 05:56:05 +020017 runs-on: ubuntu-22.04
Jiayu Liuc6f18a52022-05-22 04:01:43 +080018 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -040019 - uses: actions/checkout@v4
Jiayu Liuc6f18a52022-05-22 04:01:43 +080020
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)