Skip to contentSkip to conversation

CI: Reorder manual tasks to be alphabetical

PATCH New Jon Mason 1 participant 3 messages May 1, 2021

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/3 CI: Reorder manual tasks to be alphabetical

Change-Id I2e5bfdf5794c99da530bc2645fb56a5444444be3
---
 .gitlab-ci.yml | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
.gitlab-ci.yml +10 -10
index 8a47da8..f0e844f 100644
@@ -153,27 +153,27 @@ tc0:
 # Utility tasks, not executed automatically
 #
 
-# Report on disk usage
-usage:
+delete-dl-dir:
   extends: .setup
   stage: prep
   when: manual
   script:
-  - du -h -s $DL_DIR $SSTATE_DIR $KAS_REPO_REF_DIR
+  - rm -rf $DL_DIR/*
 
-delete-dl-dir:
+delete-repo-dir:
   extends: .setup
   stage: prep
   when: manual
   script:
-  - rm -rf $DL_DIR/*
+  - rm -rf $KAS_REPO_REF_DIR/*
 
-delete-repo-dir:
+# Delete all sstate
+delete-sstate:
   extends: .setup
   stage: prep
   when: manual
   script:
-  - rm -rf $KAS_REPO_REF_DIR/*
+  - rm -rf $SSTATE_DIR/*
 
 # Wipe out old sstate
 prune-sstate:
@@ -185,10 +185,10 @@ prune-sstate:
   - find $SSTATE_DIR -type f -atime +30 -delete
   - du -h -s $SSTATE_DIR
 
-# Delete all sstate
-delete-sstate:
+# Report on disk usage
+usage:
   extends: .setup
   stage: prep
   when: manual
   script:
-  - rm -rf $SSTATE_DIR/*
+  - du -h -s $DL_DIR $SSTATE_DIR $KAS_REPO_REF_DIR
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/3 CI: use public KAS image

Use the KAS docker image provided by the KAs project for Gitlab CI. This allows for the external (non-Arm Corp) users/developers to run Gitlab CI.

Change-Id I9fee9a0d571e3fd60862d4ccd36176f9e583fc91
---
 .gitlab-ci.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
.gitlab-ci.yml +1 -2
index f0e844f..dcf13b0 100644
@@ -1,5 +1,4 @@
-# Use our custom Crops-derived image
-image: $CI_REGISTRY/$CI_PROJECT_NAMESPACE/yocto-builder:master
+image: ghcr.io/siemens/kas/kas
 
   # First do a common bootstrap, and then build all the targets
 stages:
Signature · 1 line
2.17.1
author
#2 lore raw

PATCH 3/3 CI: enable non-arm64 builders

In reply to Jon Mason

Abstract away all of the things preventing the current setup from working on only internal, arm64 build hardware.

Change-Id Ib8d0e8e76602d4553e044520a91349015b1aa19b
---
 .gitlab-ci.yml                                | 20 +++++--
 ci/base.yml                                   |  1 +
 ...rnal-gcc-arm32.yml => external-gccarm.yml} |  2 +-
 ci/get-binary-toolchains                      | 52 +++++++++++++++++++
 4 files changed, 71 insertions(+), 4 deletions(-)
 rename ci/{external-gcc-arm32.yml => external-gccarm.yml} (59%)
 create mode 100755 ci/get-binary-toolchains
.gitlab-ci.yml +17 -3
index dcf13b0..c4dd986 100644
@@ -15,11 +15,12 @@ stages:
     SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate
     DL_DIR: $CI_BUILDS_DIR/persist/downloads
     BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml
+    TOOLCHAIN_DIR: $CI_BUILDS_DIR/persist/toolchains
   before_script:
     - echo KAS_WORK_DIR = $KAS_WORK_DIR
     - echo SSTATE_DIR = $SSTATE_DIR
     - echo DL_DIR = $DL_DIR
-    - mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR
+    - mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR
 
 # Generalised fragment to do a Kas build
 .build:
@@ -40,6 +41,12 @@ 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
@@ -78,7 +85,7 @@ fvp-base:
 fvp-base-arm32:
   extends: .build
 
-fvp-base-arm32/external-gcc-arm32:
+fvp-base-arm32/external-gccarm:
   extends: .build
 
 fvp-baser-aemv8r64:
@@ -174,6 +181,13 @@ delete-sstate:
   script:
   - rm -rf $SSTATE_DIR/*
 
+delete-toolchains:
+  extends: .setup
+  stage: prep
+  when: manual
+  script:
+  - rm -rf $TOOLCHAIN_DIR/*
+
 # Wipe out old sstate
 prune-sstate:
   extends: .setup
@@ -190,4 +204,4 @@ usage:
   stage: prep
   when: manual
   script:
-  - du -h -s $DL_DIR $SSTATE_DIR $KAS_REPO_REF_DIR
+  - du -h -s $DL_DIR $SSTATE_DIR $KAS_REPO_REF_DIR $TOOLCHAIN_DIR
ci/base.yml +1 -0
index 62bdead..4b1797e 100644
@@ -22,6 +22,7 @@ repos:
 
 env:
   BB_LOGCONFIG: ""
+  TOOLCHAIN_DIR: ""
 
 local_conf_header:
   base: |
ci/external-gccarm.yml renamed from ci/external-gcc-arm32.yml +1 -1
similarity index 59%
rename from ci/external-gcc-arm32.yml
rename to ci/external-gccarm.yml
index de8798e..ad03298 100644
@@ -5,4 +5,4 @@ local_conf_header:
   cc: |
     PNBLACKLIST[gcc-cross-arm] = "Using external toolchain"
     TCMODE = "external-arm"
-    EXTERNAL_TOOLCHAIN = "/usr/local/gcc-arm-10.2-2020.11-aarch64-arm-none-linux-gnueabihf"
+    EXTERNAL_TOOLCHAIN = "${TOOLCHAIN_DIR}/${TARGET_ARCH}"
ci/get-binary-toolchains new file +52 -0

52 lines not on this page · raw message

Signature · 1 line
2.17.1