Skip to content

Commit ecb3028

Browse files
committed
2 parents fe810bf + 9d56947 commit ecb3028

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CMake Build and Test
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Install dependencies
21+
run: sudo apt-get update && sudo apt-get install -y cmake g++
22+
23+
- name: Configure CMake
24+
run: cmake -S . -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
25+
26+
- name: Build all targets
27+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
28+
29+
- name: Run all CTest tests
30+
working-directory: ${{github.workspace}}/build
31+
run: ctest --output-on-failure -C ${{env.BUILD_TYPE}}

0 commit comments

Comments
 (0)