Skip to content

Commit 5410c43

Browse files
authored
[ci] apply color across all buildomat jobs (#6789)
Move the config to a `ci-env.sh` script and source it in all the jobs.
1 parent a2bb284 commit 5410c43

10 files changed

+44
-10
lines changed

.github/buildomat/build-and-test.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ set -o errexit
44
set -o pipefail
55
set -o xtrace
66

7-
# Color the output for easier readability.
8-
export CARGO_TERM_COLOR=always
7+
#
8+
# Set up our PATH for the test suite.
9+
#
10+
11+
# shellcheck source=/dev/null
12+
source ./env.sh
13+
# shellcheck source=/dev/null
14+
source .github/buildomat/ci-env.sh
915

1016
target_os=$1
1117

@@ -30,10 +36,7 @@ OUTPUT_DIR='/work'
3036
echo "tests will store non-ephemeral output in $OUTPUT_DIR" >&2
3137
mkdir -p "$OUTPUT_DIR"
3238

33-
#
34-
# Set up our PATH for the test suite.
35-
#
36-
source ./env.sh
39+
3740

3841
banner prerequisites
3942
ptime -m bash ./tools/install_builder_prerequisites.sh -y

.github/buildomat/ci-env.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Setup shared across Buildomat CI builds.
2+
#
3+
# This file contains environment variables shared across Buildomat CI jobs.
4+
5+
# Color the output for easier readability.
6+
export CARGO_TERM_COLOR=always

.github/buildomat/jobs/a4x2-deploy.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ set -o errexit
2121
set -o pipefail
2222
set -o xtrace
2323

24+
# shellcheck source=/dev/null
25+
source .github/buildomat/ci-env.sh
26+
2427
pfexec mkdir -p /out
2528
pfexec chown "$UID" /out
2629

.github/buildomat/jobs/a4x2-prepare.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
#: ]
2323
#: enable = false
2424

25+
# shellcheck source=/dev/null
2526
source ./env.sh
27+
# shellcheck source=/dev/null
28+
source .github/buildomat/ci-env.sh
2629

2730
set -o errexit
2831
set -o pipefail
@@ -91,4 +94,3 @@ for x in ce cr1 cr2 g0 g1 g2 g3 tools omicron-common; do
9194
tar -czf cargo-bay-$x.tgz cargo-bay/$x
9295
mv cargo-bay-$x.tgz /out/
9396
done
94-

.github/buildomat/jobs/check-features.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ set -o errexit
1414
set -o pipefail
1515
set -o xtrace
1616

17+
# shellcheck source=/dev/null
18+
source .github/buildomat/ci-env.sh
19+
1720
cargo --version
1821
rustc --version
1922

.github/buildomat/jobs/clippy.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ set -o errexit
1616
set -o pipefail
1717
set -o xtrace
1818

19-
cargo --version
20-
rustc --version
21-
2219
#
2320
# Set up our PATH for use with this workspace.
2421
#
22+
23+
# shellcheck source=/dev/null
2524
source ./env.sh
25+
# shellcheck source=/dev/null
26+
source .github/buildomat/ci-env.sh
27+
28+
cargo --version
29+
rustc --version
2630

2731
banner prerequisites
2832
ptime -m bash ./tools/install_builder_prerequisites.sh -y

.github/buildomat/jobs/deploy.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ cd /opt/oxide/work
194194

195195
ptime -m tar xvzf /input/package/work/package.tar.gz
196196

197+
# shellcheck source=/dev/null
198+
source .github/buildomat/ci-env.sh
199+
197200
# Ask buildomat for the range of extra addresses that we're allowed to use, and
198201
# break them up into the ranges we need.
199202

.github/buildomat/jobs/omicron-common.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ set -o errexit
1414
set -o pipefail
1515
set -o xtrace
1616

17+
# shellcheck source=/dev/null
18+
source .github/buildomat/ci-env.sh
19+
1720
cargo --version
1821
rustc --version
1922

.github/buildomat/jobs/package.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ set -o errexit
1313
set -o pipefail
1414
set -o xtrace
1515

16+
# shellcheck source=/dev/null
17+
source .github/buildomat/ci-env.sh
18+
1619
cargo --version
1720
rustc --version
1821

@@ -48,6 +51,7 @@ mkdir tests
4851
# deployment phases of buildomat.
4952

5053
files=(
54+
.github/buildomat/ci-env.sh
5155
out/target/test
5256
out/npuzone/*
5357
package-manifest.toml

.github/buildomat/jobs/tuf-repo.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ set -o errexit
4747
set -o pipefail
4848
set -o xtrace
4949

50+
# shellcheck source=/dev/null
51+
source .github/buildomat/ci-env.sh
52+
5053
cargo --version
5154
rustc --version
5255

0 commit comments

Comments
 (0)