git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] CI: select CC based on CC_PACKAGE (again)
@ 2022-04-21 13:03 Ævar Arnfjörð Bjarmason
  2022-04-21 16:26 ` Phillip Wood
  2022-04-21 17:48 ` [PATCH v2] " Ævar Arnfjörð Bjarmason
  0 siblings, 2 replies; 18+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2022-04-21 13:03 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Eric Sunshine, Carlo Arenas, Phillip Wood,
	Ævar Arnfjörð Bjarmason

Fix a regression in 707d2f2fe86 (CI: use "$runs_on_pool", not
"$jobname" to select packages & config, 2021-11-23).

In that commit I changed CC=gcc from CC=gcc-9, but on OSX the "gcc" in
$PATH points to clang, we need to use gcc-9 instead. Likewise for the
linux-gcc job CC=gcc-8 was changed to the implicit CC=gcc, which would
select GCC 9.4.0 instead of GCC 8.4.0.

Furthermore in 25715419bf4 (CI: don't run "make test" twice in one
job, 2021-11-23) when the "linux-TEST-vars" job was split off from
"linux-gcc" the "cc_package: gcc-8" line was copied along with
it.

That wasn't a bug per-se, as that "make test" would have run under GCC
8 before the split into two jobs, but the point of selecting different
compiler for these jobs is to get better coverage, and to narrow down
any issues with a given compiler to the job that runs it. Since the
"linux-TEST-vars" job is already special in other ways (in running
with various GIT_TEST_* variables), and we've got the "linux-gcc" job
covering gcc-8 let's have it used the default system compiler instead.

Reported-by: Carlo Arenas <carenas@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
Range-diff:
1:  94abb826627 < -:  ----------- CI: have osx-gcc use gcc, not clang
-:  ----------- > 1:  d89ad4d5b7c CI: select CC based on CC_PACKAGE (again)

The range-diff is against a relevant patch in v4 of a larger CI series
of mine[1]. This fix is independent of that, and on top of master. See
[2] for the original fix and discussion.

As noted in the updated commit message not only the OSX jobs were
affected, but also the linux-gcc job. This fixes both, along with a
small fix to the related linux-TEST-vars recipe.

1. https://lore.kernel.org/git/cover-v4-00.31-00000000000-20220418T132809Z-avarab@gmail.com/
2. https://lore.kernel.org/git/patch-v4-30.31-94abb826627-20220418T132809Z-avarab@gmail.com/

 .github/workflows/main.yml | 1 -
 ci/lib.sh                  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index c35200defb9..f12819a00d7 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -236,7 +236,6 @@ jobs:
           - jobname: linux-TEST-vars
             cc: gcc
             os: ubuntu
-            cc_package: gcc-8
             pool: ubuntu-latest
           - jobname: osx-clang
             cc: clang
diff --git a/ci/lib.sh b/ci/lib.sh
index cbc2f8f1caa..44007dcf93b 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -122,7 +122,7 @@ then
 	test macos != "$CI_OS_NAME" || CI_OS_NAME=osx
 	CI_REPO_SLUG="$GITHUB_REPOSITORY"
 	CI_JOB_ID="$GITHUB_RUN_ID"
-	CC="${CC:-gcc}"
+	CC="${CC:-${CC_PACKAGE:-gcc}}"
 	DONT_SKIP_TAGS=t
 
 	cache_dir="$HOME/none"
-- 
2.36.0.876.g4bfefc07680


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-04-22 23:10 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 13:03 [PATCH] CI: select CC based on CC_PACKAGE (again) Ævar Arnfjörð Bjarmason
2022-04-21 16:26 ` Phillip Wood
2022-04-21 17:48 ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2022-04-21 19:05   ` Carlo Arenas
2022-04-21 19:11     ` Junio C Hamano
2022-04-21 19:22       ` Carlo Arenas
2022-04-21 19:47         ` Junio C Hamano
2022-04-21 19:08   ` Junio C Hamano
2022-04-21 19:13     ` Ævar Arnfjörð Bjarmason
2022-04-21 19:51       ` Junio C Hamano
2022-04-21 19:52         ` Ævar Arnfjörð Bjarmason
2022-04-21 19:55         ` Junio C Hamano
2022-04-22  9:20   ` [PATCH v3] " Ævar Arnfjörð Bjarmason
2022-04-22  9:25     ` Phillip Wood
2022-04-22 11:43       ` Ævar Arnfjörð Bjarmason
2022-04-22 18:27     ` Junio C Hamano
2022-04-22 22:40     ` Junio C Hamano
2022-04-22 22:46       ` Ævar Arnfjörð Bjarmason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).