Skip to contentSkip to conversation

ci: make get-binary-toolchain run per build

PATCH Superseded Jon Mason 3 participants 4 messages Sep 13, 2021 – Sep 14, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/2 ci: make get-binary-toolchain run per build

In a distributed, non-homogeneous CI setup, the binary-toolchain setup script might not run on the machine that needs the toolchains. Make this per-build and it will always be there, at the expense of running on builds that might not need it (though it still should be fast).

---
 .gitlab-ci.yml           | 9 ++-------
 ci/get-binary-toolchains | 2 +-
 2 files changed, 3 insertions(+), 8 deletions(-)
.gitlab-ci.yml +2 -7
index 697603b..ab254f6 100644
@@ -24,6 +24,8 @@ stages:
     - echo DL_DIR = $DL_DIR
     - rm -rf $KAS_WORK_DIR
     - mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR
+    # Must do this here, as it's the only way to make sure the toolhchain is installed on the same builder
+    - ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR
 
 # Generalised fragment to do a Kas build
 .build:
@@ -43,13 +45,6 @@ update-repos:
   script:
   - flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
 
-get-binary-toolchains:
-  extends: .setup
-  stage: prep
-  script:
-    - ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR
-
-
 #
 # Bootstrap stage, bootstrap and machine coverage
 #
ci/get-binary-toolchains +1 -1
index 6fa7ff4..fae3b01 100755
@@ -7,7 +7,7 @@ VER="10.2-2020.11"
 DOWNLOAD_DIR=$1
 TOOLCHAIN_DIR=$2
 
-# These should be already created by .bitlab-ci.yml, but do here if run outside of that env
+# These should be already created by .gitlab-ci.yml, but do here if run outside of that env
 mkdir -p $DOWNLOAD_DIR $TOOLCHAIN_DIR
 
 if [ $HOST_ARCH = "aarch64" ]; then
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/2 ci: update binary gcc version to 10.3

---
 ci/get-binary-toolchains | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ci/get-binary-toolchains +1 -1
index fae3b01..d1072e2 100755
@@ -2,7 +2,7 @@
 set -u
 
 HOST_ARCH=$(uname -m)
-VER="10.2-2020.11"
+VER="10.3-2021.07"
 
 DOWNLOAD_DIR=$1
 TOOLCHAIN_DIR=$2
Signature · 1 line
2.17.1
Acked-by on v1 1/2
#2 lore raw
In reply to Jon Mason
Quoted 6 lines · Jon Mason

In a distributed, non-homogeneous CI setup, the binary-toolchain setup script might not run on the machine that needs the toolchains. Make this per-build and it will always be there, at the expense of running on builds that might not need it (though it still should be fast).

Quoted 6 lines
---
 .gitlab-ci.yml           | 9 ++-------
 ci/get-binary-toolchains | 2 +-
 2 files changed, 3 insertions(+), 8 deletions(-)

Thanks John for the updates.

-Sumit

Quoted 46 lines
.gitlab-ci.yml +2 -7
index 697603b..ab254f6 100644
@@ -24,6 +24,8 @@ stages:
     - echo DL_DIR = $DL_DIR
     - rm -rf $KAS_WORK_DIR
     - mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR
+    # Must do this here, as it's the only way to make sure the toolhchain is installed on the same builder
+    - ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR
 
 # Generalised fragment to do a Kas build
 .build:
@@ -43,13 +45,6 @@ update-repos:
   script:
   - flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
 
-get-binary-toolchains:
-  extends: .setup
-  stage: prep
-  script:
-    - ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR
-
-
 #
 # Bootstrap stage, bootstrap and machine coverage
 #
ci/get-binary-toolchains +1 -2
index 6fa7ff4..fae3b01 100755
@@ -7,7 +7,7 @@ VER="10.2-2020.11"
 DOWNLOAD_DIR=$1
 TOOLCHAIN_DIR=$2
 
-# These should be already created by .bitlab-ci.yml, but do here if run outside of that env
+# These should be already created by .gitlab-ci.yml, but do here if run outside of that env
 mkdir -p $DOWNLOAD_DIR $TOOLCHAIN_DIR
 
 if [ $HOST_ARCH = "aarch64" ]; then
--

2.17.1

#3 lore raw
Quoted 15 lines · Sumit Garg
Quoted 6 lines · Jon Mason

In a distributed, non-homogeneous CI setup, the binary-toolchain setup script might not run on the machine that needs the toolchains. Make this per-build and it will always be there, at the expense of running on builds that might not need it (though it still should be fast).

Quoted 6 lines
---
 .gitlab-ci.yml           | 9 ++-------
 ci/get-binary-toolchains | 2 +-
 2 files changed, 3 insertions(+), 8 deletions(-)
Quoted 3 lines

Thanks John for the updates.

Unfortunately, I found a bug when running against multiple branches simultaneously. v2 coming shortly :)

Thanks,
Jon

Quoted 52 lines

-Sumit

Quoted 46 lines
.gitlab-ci.yml +2 -7
index 697603b..ab254f6 100644
@@ -24,6 +24,8 @@ stages:
     - echo DL_DIR = $DL_DIR
     - rm -rf $KAS_WORK_DIR
     - mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR
+    # Must do this here, as it's the only way to make sure the toolhchain is installed on the same builder
+    - ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR
 
 # Generalised fragment to do a Kas build
 .build:
@@ -43,13 +45,6 @@ update-repos:
   script:
   - flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
 
-get-binary-toolchains:
-  extends: .setup
-  stage: prep
-  script:
-    - ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR
-
-
 #
 # Bootstrap stage, bootstrap and machine coverage
 #
ci/get-binary-toolchains +1 -2
index 6fa7ff4..fae3b01 100755
@@ -7,7 +7,7 @@ VER="10.2-2020.11"
 DOWNLOAD_DIR=$1
 TOOLCHAIN_DIR=$2
 
-# These should be already created by .bitlab-ci.yml, but do here if run outside of that env
+# These should be already created by .gitlab-ci.yml, but do here if run outside of that env
 mkdir -p $DOWNLOAD_DIR $TOOLCHAIN_DIR
 
 if [ $HOST_ARCH = "aarch64" ]; then
--

2.17.1