Skip to content

Commit e58831e

Browse files
committed
workflow: test both case whether need volatile
1 parent 491a52e commit e58831e

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [ubuntu-latest, macos-latest]
18+
need_volatile: [ON, OFF]
19+
build_unit_test_separately: [ON, OFF]
20+
enable_watch: [ON, OFF]
1821

1922
runs-on: ${{matrix.os}}
2023

@@ -48,7 +51,13 @@ jobs:
4851
- name: Configure CMake
4952
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
5053
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
51-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TEST=TRUE -DENABLE_MYOSTREAM_WATCH=TRUE
54+
run: >
55+
cmake -B ${{github.workspace}}/build
56+
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
57+
-DBUILD_TEST=TRUE
58+
-DENABLE_MYOSTREAM_WATCH=$${{matrix.enable_watch}}
59+
-DNEED_VOLATILE=${{matrix.need_volatile}}
60+
-DUNIT_TEST_SEPARATE=${{matrix.build_unit_test_separately}}
5261
5362
- name: Build
5463
# Build your program with the given configuration

test/unit_test/register_member.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,10 @@ TEST(register_member, nonvolatile_member) {
570570

571571
const bool SupportV = PEACALM_LUAW_SUPPORT_VOLATILE_OBJECT;
572572

573+
#if PEACALM_LUAW_SUPPORT_VOLATILE_OBJECT
574+
EXPECT_TRUE(false);
575+
#endif
576+
573577
{
574578
volatile Obj o;
575579
l.set("o", &o);

0 commit comments

Comments
 (0)