Repository navigation
ci/gcc: Split the gcc check into build and test jobs - #49171
Conversation
fdde53e to
0e95b0c
Compare
0e95b0c to
839bbc8
Compare
839bbc8 to
394d5c4
Compare
`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]>
394d5c4 to
dfcaef0
Compare
| if [[ "$CI_TARGET" != "gcc.test_only" ]]; then | ||
| if [[ "$CI_TARGET" == "gcc.build" ]]; then | ||
| echo "bazel fastbuild build with gcc..." | ||
| bazel_envoy_binary_build fastbuild |
There was a problem hiding this comment.
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[@]}"?
There was a problem hiding this comment.
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.
| - envoy/**/* | ||
| - source/**/* | ||
| - test/**/* | ||
| check-build-gcc-build: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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]>
`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]>
`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]>
`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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>

gccbuilt 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.buildandgcc.test(weregcc.server_only,gcc.test_only) do one half each, andgcc.buildbuilds in one invocation too.Check/build runs
gcc.buildandgcc.testas separate jobs, enabled and path selected bycheck-build-gcc-*run flags in the same way as thecto.*jobs; a branch with none keeps the singlegccjob.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.