Skip to content

Commit aa537e8

Browse files
Create pipeline build-and-test.yml
1 parent 345fbf7 commit aa537e8

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build & Test ObjectPool (CMake)
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+
# -----------------------------------------------------
21+
# Install dependencies: g++-14, Ninja
22+
# -----------------------------------------------------
23+
- name: Install dependencies
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y g++-14 ninja-build
27+
cmake --version
28+
g++ --version
29+
30+
# -----------------------------------------------------
31+
# Configure (CMake build system generation)
32+
# -----------------------------------------------------
33+
- name: Configure CMake
34+
run: cmake -B ${{github.workspace}}/build \
35+
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
36+
-G Ninja
37+
38+
# -----------------------------------------------------
39+
# Build
40+
# -----------------------------------------------------
41+
- name: Build
42+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
43+
44+
# -----------------------------------------------------
45+
# Test
46+
# -----------------------------------------------------
47+
- name: Run tests
48+
working-directory: ${{github.workspace}}/build
49+
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
50+

0 commit comments

Comments
 (0)