Skip to content

Commit 2e86f84

Browse files
authored
Merge pull request #541 from scratchcpp/minimal_build_tests
Add minimal build test workflow
2 parents e9a04da + 3200f4b commit 2e86f84

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Unit tests (minimal build)
2+
3+
on:
4+
push:
5+
branches: '*'
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
env:
10+
BUILD_TYPE: Debug
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
submodules: true
20+
21+
- name: Configure CMake
22+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLIBSCRATCHCPP_BUILD_UNIT_TESTS=ON -DLIBSCRATCHCPP_AUDIO_SUPPORT=OFF -DLIBSCRATCHCPP_NETWORK_SUPPORT=OFF -DLIBSCRATCHCPP_COMPUTED_GOTO=OFF
23+
24+
- name: Build
25+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j$(nproc --all)
26+
27+
- name: Run unit tests
28+
run: ctest --test-dir build -V

test/compiler/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ target_link_libraries(
99
compiler_test
1010
GTest::gtest_main
1111
scratchcpp
12+
nlohmann_json::nlohmann_json
1213
)
1314

1415
gtest_discover_tests(compiler_test)

0 commit comments

Comments
 (0)