Skip to content

Commit 272fdeb

Browse files
committed
chore: CI for coroutine enabled
1 parent 398c273 commit 272fdeb

File tree

3 files changed

+54
-18
lines changed

3 files changed

+54
-18
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [ "main" ]
88

99
jobs:
10-
ut_coverage:
10+
thread-mode:
1111
runs-on: ubuntu-latest
1212
container:
1313
image: zzjason/leanstore-dev:latest
@@ -19,7 +19,7 @@ jobs:
1919
- name: Config project
2020
run: |
2121
which vcpkg;
22-
cmake --preset debug_tsan;
22+
cmake --preset debug_tsan
2323
2424
- name: Cppcheck
2525
run: cppcheck --project=build/debug_tsan/compile_commands.json -i tests --error-exitcode=1 --check-level=exhaustive
@@ -44,3 +44,29 @@ jobs:
4444
verbose: true
4545
env:
4646
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
47+
48+
coro-mode:
49+
runs-on: ubuntu-latest
50+
container:
51+
image: zzjason/leanstore-dev:latest
52+
name: Unit Tests && Code Coverage
53+
steps:
54+
- name: Check out repository
55+
uses: actions/checkout@v3
56+
57+
- name: Config project
58+
run: |
59+
which vcpkg;
60+
cmake --preset debug_coro
61+
62+
- name: Cppcheck
63+
run: cppcheck --project=build/debug_coro/compile_commands.json -i tests --error-exitcode=1 --check-level=exhaustive
64+
65+
- name: Check clang-format
66+
run: cmake --build build/debug_coro --target=check-format
67+
68+
- name: Build project
69+
run: cmake --build build/debug_coro -j `nproc`
70+
71+
- name: Unit test with coroutine enabled
72+
run: ctest --test-dir build/debug_coro --output-on-failure -j 2

CMakePresets.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,19 @@
4646
"cacheVariables": {
4747
"CMAKE_INSTALL_PREFIX": "${sourceDir}/dist/debug_tsan",
4848
"ENABLE_TSAN": "ON",
49+
"ENABLE_COROUTINE": "OFF",
4950
"ENABLE_COVERAGE": "ON"
5051
}
5152
},
53+
{
54+
"name": "debug_coro",
55+
"inherits": "base_debug",
56+
"binaryDir": "${sourceDir}/build/debug_coro",
57+
"cacheVariables": {
58+
"CMAKE_INSTALL_PREFIX": "${sourceDir}/dist/debug_coro",
59+
"ENABLE_COROUTINE": "ON"
60+
}
61+
},
5262
{
5363
"name": "release_coro",
5464
"inherits": "base_release",

tests/CMakeLists.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ function(leanstore_add_test_in_dir TARGET_DIR)
4242
endfunction(leanstore_add_test_in_dir)
4343

4444

45-
# Add tests
46-
leanstore_add_test(recovery_test)
47-
leanstore_add_test(optimistic_guarded_test)
48-
leanstore_add_test(transaction_kv_test)
49-
leanstore_add_test(mvcc_test)
50-
leanstore_add_test(anomalies_test)
51-
leanstore_add_test(abort_test)
52-
leanstore_add_test(long_running_tx_test)
53-
54-
# tests in sub-directories
55-
leanstore_add_test_in_dir(btree)
56-
leanstore_add_test_in_dir(buffer-manager)
57-
leanstore_add_test_in_dir(concurrency)
58-
leanstore_add_test_in_dir(sync)
59-
leanstore_add_test_in_dir(telemetry)
60-
6145
if(${ENABLE_COROUTINE})
6246
leanstore_add_test_in_dir(coroutine)
47+
else()
48+
# Add tests
49+
leanstore_add_test(recovery_test)
50+
leanstore_add_test(optimistic_guarded_test)
51+
leanstore_add_test(transaction_kv_test)
52+
leanstore_add_test(mvcc_test)
53+
leanstore_add_test(anomalies_test)
54+
leanstore_add_test(abort_test)
55+
leanstore_add_test(long_running_tx_test)
56+
57+
# tests in sub-directories
58+
leanstore_add_test_in_dir(btree)
59+
leanstore_add_test_in_dir(buffer-manager)
60+
leanstore_add_test_in_dir(concurrency)
61+
leanstore_add_test_in_dir(sync)
62+
leanstore_add_test_in_dir(telemetry)
6363
endif()

0 commit comments

Comments
 (0)