From c1d6032a5af8b2ba2accc82c1d072acbb551273d Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Tue, 16 Apr 2024 13:40:32 -0400 Subject: [PATCH] Can we build it? --- .github/buildomat/build-one.sh | 39 +++++++++++++++++++++++++++ .github/buildomat/jobs/gimlet-e.sh | 10 +++++++ .github/buildomat/jobs/oxide-rot-1.sh | 10 +++++++ 3 files changed, 59 insertions(+) create mode 100644 .github/buildomat/build-one.sh create mode 100644 .github/buildomat/jobs/gimlet-e.sh create mode 100644 .github/buildomat/jobs/oxide-rot-1.sh diff --git a/.github/buildomat/build-one.sh b/.github/buildomat/build-one.sh new file mode 100644 index 0000000000..97f0828e4c --- /dev/null +++ b/.github/buildomat/build-one.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +set -o errexit +set -o pipefail +set -o xtrace + +toml=$1 +app_name=$2 +images=$3 + +if [ ! -f $toml ]; then + echo "$toml does not exist" + exit 1 +fi + +if [ -z ${app_name} ]; then + echo "Missing app name" + exit 1 +fi + +if [ -z $images ]; then + echo "Missing images" + exit 1 +fi + +banner build +mkdir /work/hubris + +# We intentionally omit rust-toolchain above and install rustup/cargo +# here with no default toolchain since rustup will pickup whatever +# toolchain (probably nightly!) we have in our repo +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | /bin/bash -s - \ + -y --no-modify-path --default-toolchain none --profile default + +cargo xtask dist $toml +for image in $images; do + cp target/${app_name}/dist/$image/build-${app_name}-image-$image.zip \ + /work/hubris/build-${app_name}-image-$image.zip +done diff --git a/.github/buildomat/jobs/gimlet-e.sh b/.github/buildomat/jobs/gimlet-e.sh new file mode 100644 index 0000000000..98e425e22c --- /dev/null +++ b/.github/buildomat/jobs/gimlet-e.sh @@ -0,0 +1,10 @@ +#!/bin/bash +#: +#: name = "build-and-test gimlet-e" +#: variety = "basic" +#: target = "ubuntu-22.04" +#: output_rules = [ +#: "=/work/hubris/*.zip", +#: ] + +exec .github/buildomat/build-one.sh app/gimlet/rev-e.toml gimlet-e default diff --git a/.github/buildomat/jobs/oxide-rot-1.sh b/.github/buildomat/jobs/oxide-rot-1.sh new file mode 100644 index 0000000000..f207044ee3 --- /dev/null +++ b/.github/buildomat/jobs/oxide-rot-1.sh @@ -0,0 +1,10 @@ +#!/bin/bash +#: +#: name = "build-and-test oxide-rot-1" +#: variety = "basic" +#: target = "ubuntu-22.04" +#: output_rules = [ +#: "=/work/hubris/*.zip", +#: ] + +exec .github/buildomat/build-one.sh app/oxide-rot-1/app.toml oxide-rot-1 "a b"