Skip to content

Commit a0f0d4a

Browse files
committed
ci: create a workflow for build and test
1 parent f9a32bc commit a0f0d4a

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/stl_test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: STL Test
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
env:
10+
ENABLE_TEST: ON
11+
ENABLE_BENCHMARK: ON
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
submodules: true
22+
23+
- name: Install dependencies
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y g++ cmake
27+
28+
- name: Configure CMake
29+
run: cmake -B ${{github.workspace}}/build -DENABLE_TEST=${{env.ENABLE_TEST}} -DENABLE_BENCHMARK=${{env.ENABLE_BENCHMARK}}
30+
31+
- name: Build
32+
run: cmake --build ${{github.workspace}}/build -j4
33+
34+
- name: Run Test
35+
working-directory: ${{github.workspace}}/build
36+
run: ./test/test_all

0 commit comments

Comments
 (0)