Skip to content

ci/gcc: Split the gcc check into build and test jobs - #49171

Merged
phlax merged 2 commits into
envoyproxy:mainfrom
phlax:ci-gcc-build-test
Nov 11, 2026
Merged

phlax merged 2 commits into
envoyproxy:mainfrom
phlax:ci-gcc-build-test

Conversation

@phlax

@phlax phlax commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

gcc built the server and tools in five bazel invocations, then ran the tests in a sixth. It now builds them as part of the test invocation. gcc.build and gcc.test (were gcc.server_only, gcc.test_only) do one half each, and gcc.build builds in one invocation too.

Check/build runs gcc.build and gcc.test as separate jobs, enabled and path selected by check-build-gcc-* run flags in the same way as the cto.* jobs; a branch with none keeps the single gcc job.

This changes when gcc runs: it was part of check-build, which runs for any change, and now only runs when the paths its flags list change (the source and test trees, the build configuration and the CI scripts), so not for e.g. a docs only change.

@phlax phlax changed the title [WIP] Ci gcc build test [WIP] ci/gcc: Split the gcc check into build and test jobs Nov 11, 2026
@phlax
phlax marked this pull request as draft November 11, 2026 12:32
@phlax
phlax requested a balanced review from Copilot November 11, 2026 12:32
@phlax
phlax force-pushed the ci-gcc-build-test branch from fdde53e to 0e95b0c Compare November 11, 2026 12:33

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the GCC CI job split and related workflow and documentation updates.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@phlax
phlax force-pushed the ci-gcc-build-test branch from 839bbc8 to 394d5c4 Compare November 11, 2026 13:53
@phlax phlax changed the title [WIP] ci/gcc: Split the gcc check into build and test jobs ci/gcc: Split the gcc check into build and test jobs Nov 11, 2026
@phlax
phlax marked this pull request as ready for review November 11, 2026 13:53
`gcc` built the server and tools in five bazel invocations, then ran the
tests in a sixth. It now builds them as part of the test invocation.
`gcc.build` and `gcc.test` (were `gcc.server_only`, `gcc.test_only`) do
one half each.

Check/build runs `gcc.build` and `gcc.test` as separate jobs, enabled
and path selected by `check-build-gcc-*` run flags in the same way as
the `cto.*` jobs; a branch with none keeps the single `gcc` job.

Signed-off-by: Ryan Northey <[email protected]>
@phlax
phlax force-pushed the ci-gcc-build-test branch from 394d5c4 to dfcaef0 Compare November 11, 2026 14:48
Comment thread ci/do_ci.sh Outdated
if [[ "$CI_TARGET" != "gcc.test_only" ]]; then
if [[ "$CI_TARGET" == "gcc.build" ]]; then
echo "bazel fastbuild build with gcc..."
bazel_envoy_binary_build fastbuild

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The single-invocation build only applies to the combined gcc target. Since main now sets both check-build-gcc-* flags, CI runs gcc.build, which still goes through bazel_envoy_binary_build: 5 separate bazel build calls with --remote_download_toplevel, plus copying the binaries to the delivery dir. So CI doesn't get the saving, and the reworked combined path only runs locally.

Would it make sense to define GCC_BUILD_TARGETS once and have gcc.build run a single bazel build "${BAZEL_BUILD_OPTIONS[@]}" -c fastbuild --remote_download_minimal -- "${GCC_BUILD_TARGETS[@]}"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, done in 7adbc5c: GCC_BUILD_TARGETS is defined once, and gcc.build builds it in a single bazel build ... --remote_download_minimal, so the job CI runs no longer goes through bazel_envoy_binary_build.

Comment thread .github/config.yml
- envoy/**/*
- source/**/*
- test/**/*
check-build-gcc-build:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this change, GCC was covered by check-build ("**/*"), so it ran on every PR. With these flags it uses the narrower cto-base path list. That narrowing is a behaviour change, so it's probably worth mentioning in the PR description. Also, the gcc-build and gcc-test lists are identical; a YAML anchor could share them if config.yml supports anchors.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re anchors - i thought not - but i more recently saw somethign suggesting otherwise - either way that would be a follow up on a different axis

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description now says that gcc no longer runs for every change, only when the paths its flags list change.

`gcc.build` is what CI runs, and still built the binaries in five
invocations and downloaded them.

Signed-off-by: Ryan Northey <[email protected]>
@phlax
phlax merged commit c64ab1f into envoyproxy:main Nov 11, 2026
24 of 25 checks passed
phlax added a commit to phlax/envoy that referenced this pull request Nov 11, 2026
`gcc` built the server and tools in five bazel invocations, then ran the
tests in a sixth. It now builds them as part of the test invocation.
`gcc.build` and `gcc.test` (were `gcc.server_only`, `gcc.test_only`) do
one half each, and `gcc.build` builds in one invocation too.

Check/build runs `gcc.build` and `gcc.test` as separate jobs, enabled
and path selected by `check-build-gcc-*` run flags in the same way as
the `cto.*` jobs; a branch with none keeps the single `gcc` job.

This changes when gcc runs: it was part of `check-build`, which runs for
any change, and now only runs when the paths its flags list change (the
source and test trees, the build configuration and the CI scripts), so
not for e.g. a docs only change.

---------

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 11, 2026
`gcc` built the server and tools in five bazel invocations, then ran the
tests in a sixth. It now builds them as part of the test invocation.
`gcc.build` and `gcc.test` (were `gcc.server_only`, `gcc.test_only`) do
one half each, and `gcc.build` builds in one invocation too.

Check/build runs `gcc.build` and `gcc.test` as separate jobs, enabled
and path selected by `check-build-gcc-*` run flags in the same way as
the `cto.*` jobs; a branch with none keeps the single `gcc` job.

This changes when gcc runs: it was part of `check-build`, which runs for
any change, and now only runs when the paths its flags list change (the
source and test trees, the build configuration and the CI scripts), so
not for e.g. a docs only change.

---------

(cherry picked from commit c64ab1f)

Backport note: the gcc section of `ci/do_ci.sh` and its paragraph in `ci/README.md` conflicted
with this branch's older text and are taken as on main. `AGENTS.md` is left as on this branch.

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit that referenced this pull request Nov 11, 2026
`gcc` built the server and tools in five bazel invocations, then ran the
tests in a sixth. It now builds them as part of the test invocation.
`gcc.build` and `gcc.test` (were `gcc.server_only`, `gcc.test_only`) do
one half each, and `gcc.build` builds in one invocation too.

Check/build runs `gcc.build` and `gcc.test` as separate jobs, enabled
and path selected by `check-build-gcc-*` run flags in the same way as
the `cto.*` jobs; a branch with none keeps the single `gcc` job.

This changes when gcc runs: it was part of `check-build`, which runs for
any change, and now only runs when the paths its flags list change (the
source and test trees, the build configuration and the CI scripts), so
not for e.g. a docs only change.

---------

(cherry picked from commit c64ab1f)

Backport note: the gcc section of `ci/do_ci.sh` and its paragraph in `ci/README.md` conflicted
with this branch's older text and are taken as on main. `AGENTS.md` is left as on this branch.

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 12, 2026
Port of envoyproxy#49171 for this branch: `gcc.build` builds the server and tools,
`gcc.test` runs the tests, and `gcc` still does both. The
`check-build-gcc-*` run flags give each its own job.

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 12, 2026
Port of envoyproxy#49171 for this branch: `gcc.build` builds the server and tools,
`gcc.test` runs the tests, and `gcc` still does both. The
`check-build-gcc-*` run flags give each its own job.

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 12, 2026
Port of envoyproxy#49171 for this branch: `gcc.build` builds the server and tools,
`gcc.test` runs the tests, and `gcc` still does both. The
`check-build-gcc-*` run flags give each its own job.

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 12, 2026
Port of envoyproxy#49171 for this branch: `gcc.build` builds the server and tools,
`gcc.test` runs the tests, and `gcc` still does both. The
`check-build-gcc-*` run flags give each its own job.

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 12, 2026
Port of envoyproxy#49171 for this branch: `gcc.build` builds the server and tools,
`gcc.test` runs the tests, and `gcc` still does both. The
`check-build-gcc-*` run flags give each its own job.

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 12, 2026
Port of envoyproxy#49171 for this branch: `gcc.build` builds the server and tools,
`gcc.test` runs the tests, and `gcc` still does both. The
`check-build-gcc-*` run flags give each its own job.

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
Port of envoyproxy#49171 for this branch: `gcc.build` builds the server and tools,
`gcc.test` runs the tests, and `gcc` still does both. The
`check-build-gcc-*` run flags give each its own job.

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
Port of envoyproxy#49171 for this branch: `gcc.build` builds the server and tools,
`gcc.test` runs the tests, and `gcc` still does both. The
`check-build-gcc-*` run flags give each its own job.

(cherry picked from commit c64ab1f)

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
Port of envoyproxy#49171 for this branch: `gcc.build` builds the server and tools,
`gcc.test` runs the tests, and `gcc` still does both. The
`check-build-gcc-*` run flags give each its own job.

(cherry picked from commit c64ab1f)

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
Port of envoyproxy#49171 for this branch: `gcc.build` builds the server and tools,
`gcc.test` runs the tests, and `gcc` still does both. The
`check-build-gcc-*` run flags give each its own job.

(cherry picked from commit c64ab1f)

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit that referenced this pull request Nov 17, 2026
Port of #49171 for this branch: `gcc.build` builds the server and tools,
`gcc.test` runs the tests, and `gcc` still does both. The
`check-build-gcc-*` run flags give each its own job.

(cherry picked from commit c64ab1f)

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 18, 2026
Port of envoyproxy#49171 for this branch: `gcc.build` builds the server and tools,
`gcc.test` runs the tests, and `gcc` still does both. The
`check-build-gcc-*` run flags give each its own job.

(cherry picked from commit c64ab1f)

Signed-off-by: Ryan Northey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants