summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-02-12 11:59:28 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-23 02:37:35 +0000
commit6db6f1a16bf9d2e42ba90fd02ef61b6e29a42074 (patch)
tree37caa93ea248c549b62ef56ced6d9f0b8d0e45ab
parent57e0642fbfbf8177a94313baa4c51fb6c2559824 (diff)
downloadchrome-ec-6db6f1a16bf9d2e42ba90fd02ef61b6e29a42074.tar.gz
gitlab: Finish the script so it builds volteer
Add a few more pieces to the script so that it checks out the required code and builds for volteer, using the zephyr toolchain. BRANCH=none BUG=b:178731498 TEST=simon, can you test and mark V+1? I have no idea how to run this Change-Id: I31de106a7c8d208c71e9e49378eeb85030ecc7fb Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2697126
-rw-r--r--.gitlab-ci.yml27
1 files changed, 21 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ef59169f6a..fbbc2a2c6f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-image: sjg20/bionic-20200526-28jan2021
+image: sjg20/bionic-20200526-12feb21
# You can update that image using this repo:
# https://gitlab.com/zephyr-ec/gitlab-ci-runner/-/tree/main
@@ -22,11 +22,24 @@ cache:
- .cache/pip
- venv/
+
+# The directory structure is:
+#
+# /zephyr
+# /builds/zephyr-ec/ec EC_DIR
before_script:
+ - export MODULES_DIR="$HOME/modules"
+ - mkdir -p "${MODULES_DIR}"
+ - export ZEPHYR_BASE="$HOME/zephyr"
+ - git clone -b chromeos-v2.5 https://chromium.googlesource.com/chromiumos/third_party/zephyr "${ZEPHYR_BASE}"
+ - git clone -b chromeos-v2.5 https://chromium.googlesource.com/chromiumos/third_party/zephyr/cmsis "${MODULES_DIR}/cmsis"
+ - git clone -b chromeos-v2.5 https://chromium.googlesource.com/chromiumos/third_party/zephyr/hal_stm32 "${MODULES_DIR}/hal_stm32"
+ - ln -s "$(pwd)" "${MODULES_DIR}/ec"
- python3 -V # Print out python version for debugging
- python3 -m pip install zephyr/zmake --user
- - export BUILD_DIR=/tmp/z
- - export PATH=$PATH:~/.local/bin
+ - export BUILD_DIR=build
+ - export ZEPHYR_DIR=/zephyr
+ - export PATH="$PATH:$HOME/.local/bin"
test:
script:
@@ -34,8 +47,10 @@ test:
run:
script:
- - zmake -l DEBUG configure -B ${BUILD_DIR}/vol zephyr/projects/volteer
- - zmake -l DEBUG build ${BUILD_DIR}/vol
+ - zmake --zephyr-base "${ZEPHYR_BASE}" --modules-dir "${MODULES_DIR}"
+ -l DEBUG configure -b -B "${BUILD_DIR}/vol" -t zephyr zephyr/projects/volteer
+ - ls "${BUILD_DIR}/vol" "${BUILD_DIR}/vol/output"
artifacts:
paths:
- - ${BUILD_DIR}/vol
+ - build/vol/output/*
+ expire_in: 1 week