From 22e3ebdfa539491c16cb28821bdced2993739d8a Mon Sep 17 00:00:00 2001 From: sdarwin Date: Tue, 5 Aug 2025 08:26:47 -0600 Subject: [PATCH] CI: Reflection jobs --- .github/workflows/ci.yml | 4 ++++ .github/workflows/reusable.yml | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c20028..03e5523 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,10 @@ jobs: call-boost-ci: name: Run Boost.CI uses: boostorg/boost-ci/.github/workflows/reusable.yml@master + # Example of customization: + # with: + # enable_reflection: true + # enable_windows: false secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} COVERITY_SCAN_NOTIFICATION_EMAIL: ${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }} diff --git a/.github/workflows/reusable.yml b/.github/workflows/reusable.yml index e606820..00de983 100644 --- a/.github/workflows/reusable.yml +++ b/.github/workflows/reusable.yml @@ -61,6 +61,11 @@ on: required: false type: boolean default: true + enable_reflection: + description: "When enabled, clang-p2996 jobs will be added. By default, p2996 reflection jobs are not enabled." + required: false + type: boolean + default: false exclude_compiler: description: "Comma-separated list of compilers to disable. By default, all compilers are enabled." required: false @@ -170,7 +175,10 @@ jobs: "compiler": "clang-12", "cxxstd": "20", "os": "ubuntu-22.04", "ccache": "no"}, # Big-Endian {"name": "bigendian-s390x", "multiarch": "yes", - "compiler": "clang", "cxxstd": "17", "os": "ubuntu-22.04", "ccache": "no", "distro": "fedora", "edition": "34", "arch": "s390x"} + "compiler": "clang", "cxxstd": "17", "os": "ubuntu-22.04", "ccache": "no", "distro": "fedora", "edition": "34", "arch": "s390x"}, + # Reflection + {"name": "Clang-preview w/ reflection", + "compiler": "clang", "cxxstd": "20,23,2c", "os": "ubuntu-latest", "container": "cppalliance/2404-p2996:1", "reflection": "yes"}, ] exclude_cxxstd = os.environ['EXCLUDE_CXXSTD'] @@ -220,6 +228,10 @@ jobs: if not coverity_scan_token: filtered = [e for e in filtered if not e.get("coverity") == "yes"] + enable_reflection = os.environ['ENABLE_REFLECTION'].lower() == 'true' + if not enable_reflection: + filtered = [e for e in filtered if not e.get("reflection") == "yes"] + with open(os.environ['GITHUB_OUTPUT'], 'a') as fh: print(f"matrix={json.dumps({'include': filtered})}", file=fh) shell: python @@ -229,6 +241,7 @@ jobs: ENABLE_32BIT: ${{ inputs.enable_32bit }} ENABLE_MULTIARCH: ${{ inputs.enable_multiarch }} ENABLE_SANITIZERS: ${{ inputs.enable_sanitizers }} + ENABLE_REFLECTION: ${{ inputs.enable_reflection }} EXCLUDE_COMPILER: ${{ inputs.exclude_compiler }} EXCLUDE_CXXSTD: ${{ inputs.exclude_cxxstd }}