Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we build it? #1751

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Borrowed this technique of putting a common script from omicron

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/psc/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
Loading