From 6db6f1a16bf9d2e42ba90fd02ef61b6e29a42074 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 12 Feb 2021 11:59:28 -0700 Subject: 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 Signed-off-by: Jack Rosenthal Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2697126 --- .gitlab-ci.yml | 27 +++++++++++++++++++++------ 1 file 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 -- cgit v1.2.1