diff --git a/.github/buildomat/build-and-test.sh b/.github/buildomat/build-and-test.sh index 5cf086b1a3..30abd02f90 100755 --- a/.github/buildomat/build-and-test.sh +++ b/.github/buildomat/build-and-test.sh @@ -20,9 +20,13 @@ curl -sSfL --retry 10 https://get.nexte.st/"$NEXTEST_VERSION"/"$1" | gunzip | ta # we can check later whether we left detritus around. # TEST_TMPDIR='/var/tmp/omicron_tmp' -echo "tests will store output in $TEST_TMPDIR" >&2 +echo "tests will store ephemeral output in $TEST_TMPDIR" >&2 mkdir "$TEST_TMPDIR" +OUTPUT_DIR='/work' +echo "tests will store non-ephemeral output in $OUTPUT_DIR" >&2 +mkdir -p "$OUTPUT_DIR" + # # Set up our PATH for the test suite. # @@ -50,18 +54,27 @@ ptime -m bash ./tools/install_builder_prerequisites.sh -y # banner build export RUSTFLAGS="-D warnings" +export RUSTDOCFLAGS="-D warnings" # When running on illumos we need to pass an additional runpath that is # usually configured via ".cargo/config" but the `RUSTFLAGS` env variable # takes precedence. This path contains oxide specific libraries such as # libipcc. if [[ $target_os == "illumos" ]]; then - RUSTFLAGS="-D warnings -C link-arg=-R/usr/platform/oxide/lib/amd64" + RUSTFLAGS="$RUSTFLAGS -C link-arg=-R/usr/platform/oxide/lib/amd64" fi -export RUSTDOCFLAGS="-D warnings" -export TMPDIR=$TEST_TMPDIR +export TMPDIR="$TEST_TMPDIR" export RUST_BACKTRACE=1 +# We're building once, so there's no need to incur the overhead of an incremental build. export CARGO_INCREMENTAL=0 -ptime -m cargo test --locked --verbose --no-run +# This allows us to build with unstable options, which gives us access to some +# timing information. +# +# If we remove "--timings=json" below, this would no longer be needed. +export RUSTC_BOOTSTRAP=1 + +# Build all the packages and tests, and keep track of how long each took to build. +# We report build progress to stderr, and the "--timings=json" output goes to stdout. +ptime -m cargo build -Z unstable-options --timings=json --workspace --tests --locked --verbose 1> "$OUTPUT_DIR/crate-build-timings.json" # # We apply our own timeout to ensure that we get a normal failure on timeout diff --git a/.github/buildomat/jobs/build-and-test-helios.sh b/.github/buildomat/jobs/build-and-test-helios.sh index 2c7a1f884d..cfcbb61475 100755 --- a/.github/buildomat/jobs/build-and-test-helios.sh +++ b/.github/buildomat/jobs/build-and-test-helios.sh @@ -5,6 +5,7 @@ #: target = "helios-2.0" #: rust_toolchain = "1.72.1" #: output_rules = [ +#: "%/work/*", #: "%/var/tmp/omicron_tmp/*", #: "!/var/tmp/omicron_tmp/crdb-base*", #: "!/var/tmp/omicron_tmp/rustc*", diff --git a/.github/buildomat/jobs/build-and-test-linux.sh b/.github/buildomat/jobs/build-and-test-linux.sh index 4f4ebc1d8a..22332ce65c 100755 --- a/.github/buildomat/jobs/build-and-test-linux.sh +++ b/.github/buildomat/jobs/build-and-test-linux.sh @@ -5,6 +5,7 @@ #: target = "ubuntu-22.04" #: rust_toolchain = "1.72.1" #: output_rules = [ +#: "%/work/*", #: "%/var/tmp/omicron_tmp/*", #: "!/var/tmp/omicron_tmp/crdb-base*", #: "!/var/tmp/omicron_tmp/rustc*",