From c9feb221609ba6592f78db0555d646e4b99f66d1 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 24 Oct 2022 16:53:16 +0200 Subject: [PATCH] contrib/jenkins.sh: new CI script Add a CI script to build and upload firmware, based on the similar script in osmo-e1-hardware.git. Related: OS#6169 --- contrib/jenkins.sh | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 contrib/jenkins.sh diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..9ce60c2 --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# jenkins build helper script for ice40-usbtrace. This is how we build on jenkins.osmocom.org. +# +# environment variables: +# * WITH_MANUALS: build manual PDFs if set to "1" +# * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1") + +set -e +set -x + +TOPDIR=$(pwd) +publish="$1" + +# we assume that PATH includes the path to the respective toolchain + +# firmware build +FW_DIRS="firmware/boot firmware/main" +for d in $FW_DIRS; do + echo + echo "=============== $d FIRMWARE ==============" + make -C $d clean + make -C $d +done + +# The argument '--publish' is used to trigger publication/upload of firmware +if [ "x$publish" = "x--publish" ]; then + + echo + echo "=============== UPLOAD FIRMWARE ==============" + + cat > "/build/known_hosts" <