Skip to content

Commit

Permalink
Can we build it?
Browse files Browse the repository at this point in the history
  • Loading branch information
labbott committed Apr 16, 2024
1 parent 5dabf67 commit c1d6032
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/buildomat/build-one.sh
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions .github/buildomat/jobs/gimlet-e.sh
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions .github/buildomat/jobs/oxide-rot-1.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit c1d6032

Please sign in to comment.