blob: fb35e4280708a8a6d41bb5fd39c6281053501483 [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
Jens Geyer68b9e872026-03-22 12:43:53 +01009concurrency:
10 group: ${{ github.workflow }}-${{ github.ref }}
11 cancel-in-progress: true
12
Jiayu Liuc6f18a52022-05-22 04:01:43 +080013env:
14 BUILD_DEPS: bison flex g++ libboost-all-dev libevent-dev libssl-dev make cmake
15
Varun Sharmabd1e5db2022-09-14 07:31:30 -070016permissions:
17 contents: read
18
Jiayu Liuc6f18a52022-05-22 04:01:43 +080019jobs:
20 compiler:
Sven Roederer502a46a2024-07-06 05:56:05 +020021 runs-on: ubuntu-22.04
Jiayu Liuc6f18a52022-05-22 04:01:43 +080022 steps:
Jens Geyer68b9e872026-03-22 12:43:53 +010023 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
Jiayu Liuc6f18a52022-05-22 04:01:43 +080024
25 - name: Install dependencies
Jens Geyer68b9e872026-03-22 12:43:53 +010026 timeout-minutes: 10
Jiayu Liuc6f18a52022-05-22 04:01:43 +080027 run: |
28 sudo apt-get update -yq
29 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
30
31 - name: Generate makefile using CMake
Jens Geyer68b9e872026-03-22 12:43:53 +010032 timeout-minutes: 10
Jiayu Liuc6f18a52022-05-22 04:01:43 +080033 run: |
34 mkdir cmake_build
35 cd cmake_build
Jens Geyera085b0e2024-11-14 23:03:46 +010036 cmake .. -DBUILD_LIBRARIES=OFF
Jiayu Liuc6f18a52022-05-22 04:01:43 +080037
38 - name: Run make
Jens Geyer68b9e872026-03-22 12:43:53 +010039 timeout-minutes: 30
Jiayu Liuc6f18a52022-05-22 04:01:43 +080040 run: |
41 cd cmake_build
42 cmake --build .
43
44 - name: Run test
Jens Geyer68b9e872026-03-22 12:43:53 +010045 timeout-minutes: 30
Jiayu Liuc6f18a52022-05-22 04:01:43 +080046 run: |
47 cd cmake_build
Jens Geyer68b9e872026-03-22 12:43:53 +010048 ctest -j$(nproc --ignore=2)
copilot-swe-agent[bot]c3ced622025-11-18 18:09:06 +000049
50 - name: Upload LastTest log
51 if: always()
Jens Geyer68b9e872026-03-22 12:43:53 +010052 uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
copilot-swe-agent[bot]c3ced622025-11-18 18:09:06 +000053 with:
54 name: cmake-LastTest-log
55 path: cmake_build/Testing/Temporary/LastTest.log
56 if-no-files-found: warn