Skip to content

Commit 8de63c3

Browse files
committed
Test new defines
1 parent a6168c6 commit 8de63c3

3 files changed

Lines changed: 45 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,36 @@ on:
3838
jobs:
3939
call-boost-ci:
4040
name: Run Boost.CI
41-
uses: boostorg/boost-ci/.github/workflows/reusable.yml@master
41+
uses: boostorg/boost-ci/.github/workflows/reusable.yml@pr/set-b2-vars
4242
# Customization:
4343
with:
44-
enable_reflection: true
45-
# enable_windows: false
46-
secrets:
47-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
48-
COVERITY_SCAN_NOTIFICATION_EMAIL: ${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }}
49-
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
44+
b2_targets: libs/boost-ci/test//test
45+
b2_defines: FOO="Hello world" BAR=2
46+
b2_link: shared,static
47+
b2_variant: debug
48+
library_folder: boost-ci
49+
enable_32bit: false
50+
enable_cygwin: false
51+
enable_cmake: false
52+
enable_mingw: false
53+
enable_multiarch: false
54+
enable_reflection: false
55+
enable_sanitizers: false
56+
exclude_compiler: 'gcc-10,clang-10,msvc-14.2'
57+
exclude_cxxstd: '98,03,0x,0y,14,2a,20,2b,23,2c,26' # only do C++11 and C++17 jobs
58+
exclude_os: 'ubuntu:16.04,macos,windows-2022'
59+
call-boost-ci-default:
60+
name: Run Default
61+
uses: boostorg/boost-ci/.github/workflows/reusable.yml@pr/set-b2-vars
62+
# Customization:
63+
with:
64+
enable_32bit: false
65+
enable_cygwin: false
66+
enable_cmake: false
67+
enable_mingw: false
68+
enable_multiarch: false
69+
enable_reflection: false
70+
enable_sanitizers: false
71+
exclude_compiler: 'gcc-10,clang-10,msvc-14.2'
72+
exclude_cxxstd: '98,03,0x,0y,14,2a,20,2b,23,2c,26' # only do C++11 and C++17 jobs
73+
exclude_os: 'ubuntu:16.04,macos,windows-2022'

test/Jamfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ if $(enable_reflection) = yes
5454
defs += <define>TEST_REFLECTION ;
5555
}
5656

57-
unit-test test : test.cpp :
58-
$(defs)
59-
<test-info>always_show_run_output
60-
;
57+
run test.cpp ;
58+
run test_def.cpp ;
59+
explicit test_def ;

test/test_def.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <string>
2+
3+
int main()
4+
{
5+
const std::string foo = FOO;
6+
if(foo != "Hello world")
7+
return 1;
8+
if(BAR != 2)
9+
return 1;
10+
return 0;
11+
}

0 commit comments

Comments
 (0)