Skip to content

Commit 2e48167

Browse files
authored
Merge pull request #1 from cmake-workflow
created cmake.yml workflow
2 parents 09c1850 + 5778fa4 commit 2e48167

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CMake
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
env:
10+
# Release, Debug, RelWithDebInfo, etc.
11+
BUILD_TYPE: Release
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Configure CMake
21+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
22+
23+
- name: Build (parallel)
24+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j$(nproc)
25+
26+
- name: Test
27+
working-directory: ${{github.workspace}}/build
28+
run: ctest -C ${{env.BUILD_TYPE}}

0 commit comments

Comments
 (0)