Skip to content

Commit

Permalink
Build an assortment of images in buildomat
Browse files Browse the repository at this point in the history
  • Loading branch information
labbott committed Apr 16, 2024
1 parent 5dabf67 commit ba50195
Show file tree
Hide file tree
Showing 12 changed files with 149 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-c.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
#:
#: name = "build-gimlet-c"
#: variety = "basic"
#: target = "ubuntu-22.04"
#: output_rules = [
#: "=/work/hubris/*.zip",
#: ]

exec .github/buildomat/build-one.sh app/gimlet/rev-c.toml gimlet-c default
10 changes: 10 additions & 0 deletions .github/buildomat/jobs/gimlet-d.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
#:
#: name = "build-gimlet-d"
#: variety = "basic"
#: target = "ubuntu-22.04"
#: output_rules = [
#: "=/work/hubris/*.zip",
#: ]

exec .github/buildomat/build-one.sh app/gimlet/rev-d.toml gimlet-d default
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-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/gimlet-f.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
#:
#: name = "build-gimlet-f"
#: variety = "basic"
#: target = "ubuntu-22.04"
#: output_rules = [
#: "=/work/hubris/*.zip",
#: ]

exec .github/buildomat/build-one.sh app/gimlet/rev-f.toml gimlet-f default
10 changes: 10 additions & 0 deletions .github/buildomat/jobs/oxide-rot-1-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
#:
#: name = "build-oxide-rot-1-dev"
#: variety = "basic"
#: target = "ubuntu-22.04"
#: output_rules = [
#: "=/work/hubris/*.zip",
#: ]

exec .github/buildomat/build-one.sh app/oxide-rot-1/app-dev.toml oxide-rot-1-dev "a b"
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-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"
10 changes: 10 additions & 0 deletions .github/buildomat/jobs/psc-b.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
#:
#: name = "build-psc-b"
#: variety = "basic"
#: target = "ubuntu-22.04"
#: output_rules = [
#: "=/work/hubris/*.zip",
#: ]

exec .github/buildomat/build-one.sh app/gimlet/rev-b.toml psc-b default
10 changes: 10 additions & 0 deletions .github/buildomat/jobs/psc-c.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
#:
#: name = "build-psc-c"
#: variety = "basic"
#: target = "ubuntu-22.04"
#: output_rules = [
#: "=/work/hubris/*.zip",
#: ]

exec .github/buildomat/build-one.sh app/psc/rev-c.toml psc-c default
10 changes: 10 additions & 0 deletions .github/buildomat/jobs/sidecar-b.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
#:
#: name = "build-sidecar-b"
#: variety = "basic"
#: target = "ubuntu-22.04"
#: output_rules = [
#: "=/work/hubris/*.zip",
#: ]

exec .github/buildomat/build-one.sh app/sidecar/rev-b.toml sidecar-b default
10 changes: 10 additions & 0 deletions .github/buildomat/jobs/sidecar-c.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
#:
#: name = "build-sidecar-c"
#: variety = "basic"
#: target = "ubuntu-22.04"
#: output_rules = [
#: "=/work/hubris/*.zip",
#: ]

exec .github/buildomat/build-one.sh app/sidecar/rev-c.toml sidecar-c default
10 changes: 10 additions & 0 deletions .github/buildomat/jobs/sidecar-d.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
#:
#: name = "build-sidecar-d"
#: variety = "basic"
#: target = "ubuntu-22.04"
#: output_rules = [
#: "=/work/hubris/*.zip",
#: ]

exec .github/buildomat/build-one.sh app/sidecar/rev-d.toml sidecar-d default

0 comments on commit ba50195

Please sign in to comment.