1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-06-02 01:20:09 +00:00

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).

Also, there is an issue with the directory where the binary toolchain is
located being global, and racing against other systems using, setting up,
and tearing down.  Link this to a local directory to avoid any races.

Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Jon Mason
2021-09-13 13:44:35 -04:00
parent 6566abf9d7
commit bf5ec4f203
3 changed files with 15 additions and 25 deletions
+4 -8
View File
@@ -18,12 +18,15 @@ stages:
BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml
TOOLCHAIN_DIR: $CI_BUILDS_DIR/persist/toolchains
IMAGE_DIR: $CI_PROJECT_DIR/work/build/tmp/deploy/images
TOOLCHAIN_LINK_DIR: $CI_PROJECT_DIR/work/build/toolchains
before_script:
- echo KAS_WORK_DIR = $KAS_WORK_DIR
- echo SSTATE_DIR = $SSTATE_DIR
- 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
- mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR
# Must do this here, as it's the only way to make sure the toolchain is installed on the same builder
- ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR
# Generalised fragment to do a Kas build
.build:
@@ -43,13 +46,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
#