Skip to content

Commit

Permalink
circleci: build with C++20 modules enabled
Browse files Browse the repository at this point in the history
add one more build with the combination of "clang++17", C++20, debug
with C++20 modules enabled. so that we can at least test with C++20
modules build without doubling the size of the test matrix.

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Dec 29, 2023
1 parent 1b3c69d commit 603ab3d
Showing 1 changed file with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
description: build with DPDK enabled
type: enum
enum: ["disable-dpdk", "enable-dpdk"]
with_modules:
default: "disable-modules"
description: build with C++20 modules enabled
type: enum
enum: ["disable-modules", "enable-modules"]
machine:
image: ubuntu-2204:2023.04.2
resource_class: large
Expand All @@ -31,16 +36,32 @@ jobs:
- run: ./run ./configure.py --compiler << parameters.compiler >> --c++-standard << parameters.standard >> --cook dpdk --enable-dpdk
- when:
condition:
equal: [ "disable-dpdk", << parameters.with_dpdk >> ]
equal: [ "enable-modules", << parameters.with_modules >> ]
steps:
- run: ./run ./configure.py --compiler << parameters.compiler >> --c++-standard << parameters.standard >> --enable-cxx-modules
- when:
condition:
and:
- equal: [ "disable-dpdk", << parameters.with_dpdk >> ]
- equal: [ "disable-modules", << parameters.with_modules >> ]
steps:
- run: ./run ./configure.py --compiler << parameters.compiler >> --c++-standard << parameters.standard >>
- when:
condition:
equal: [ dev, << parameters.mode >> ]
steps:
- run: ./run ninja -C build/<< parameters.mode >> checkheaders
- run: ./run ninja -C build/<< parameters.mode >>
- run: ./run ./test.py --mode=<< parameters.mode >>
- when:
condition:
equal: [ "enable-modules", << parameters.with_modules >> ]
steps:
- run: ./run ninja -C build/<< parameters.mode >> hello_cxx_module
- when:
condition:
equal: [ "disable-modules", << parameters.with_modules >> ]
steps:
- run: ./run ninja -C build/<< parameters.mode >>
- run: ./run ./test.py --mode=<< parameters.mode >>

workflows:
version: 2
Expand All @@ -62,3 +83,13 @@ workflows:
standard: ["20"]
mode: ["release"]
with_dpdk: [ "enable-dpdk" ]
# only build this combination with C++20 moduels enabled, so we don't double
# the size of the test matrix, and can at least test the build with
# C++20 modules enabled.
- build_and_test:
matrix:
parameters:
compiler: ["clang++-17"]
standard: ["20"]
mode: ["debug"]
with_modules: [ "enable-modules" ]

0 comments on commit 603ab3d

Please sign in to comment.