aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml103
1 files changed, 103 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..43a19f9
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,103 @@
+image: ghcr.io/siemens/kas/kas:3.2
+
+variables:
+ CPU_REQUEST: ""
+ DEFAULT_TAG: ""
+ # These are needed as the k8s executor doesn't respect the container
+ # entrypoint by default
+ FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: 0
+ FF_KUBERNETES_HONOR_ENTRYPOINT: 1
+
+stages:
+ - prep
+ - build
+
+# Common job fragment to get a worker ready
+.setup:
+ tags:
+ - $DEFAULT_TAG
+ stage: build
+ interruptible: true
+ variables:
+ KAS_WORK_DIR: $CI_PROJECT_DIR/work
+ KAS_REPO_REF_DIR: $CI_BUILDS_DIR/persist/repos
+ SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate
+ DL_DIR: $CI_BUILDS_DIR/persist/downloads
+ BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml
+ 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
+
+# Generalised fragment to do a Kas build
+.build:
+ extends: .setup
+ variables:
+ KUBERNETES_CPU_REQUEST: $CPU_REQUEST
+ script:
+ - KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME")
+ - kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
+ - kas build $KASFILES
+ - ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
+ artifacts:
+ name: "logs"
+ when: on_failure
+ paths:
+ - $CI_PROJECT_DIR/work/build/tmp/work*/**/temp/log.do_*.*
+
+#
+# Prep stage, update repositories once
+#
+update-repos:
+ extends: .setup
+ stage: prep
+ script:
+ - flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
+
+
+#
+# Bootstrap stage, machine coverage
+#
+
+# What percentage of machines in the layer do we build
+machine-coverage:
+ stage: prep
+ interruptible: true
+ script:
+ - ./ci/check-machine-coverage
+ coverage: '/Coverage: \d+/'
+ tags:
+ - $DEFAULT_TAG
+
+#
+# Build stage, the actual build jobs
+#
+
+96b-avenger96:
+ extends: .build
+
+96b-nitrogen:
+ extends: .build
+
+arduino-nano-33-ble:
+ extends: .build
+
+intel-x86-64:
+ extends: .build
+
+nrf52840dk-nrf52840:
+ extends: .build
+
+qemu-cortex-m3/testimage:
+ extends: .build
+
+qemu-nios2:
+ extends: .build
+
+qemu-x86/testimage:
+ extends: .build
+
+stm32mp157c-dk2:
+ extends: .build