Two tooling fixes, both needed before P1 can diff anything.
`build-export` was calling `sylpheed-export --disc ... --out export`, which P0
broke when it moved the exporter behind `export` / `check` subcommands. It is a
regression from 8dd0577 and this is the fix. It now also runs `check` after
exporting, because `export` writes a tree and `check` is the only thing that
says the tree is readable by something other than the program that wrote it.
`build-reference-cli` is new. `sylpheed-cli screen render` is the reference the
Godot port gets diffed against, and the only copy of it in the container is
/reborn/target/release, which has two problems: the release binary predates the
`screen` subcommand entirely, and /reborn is a LIVE mount of the other agent's
working tree -- it moved from e81dcad to f5e7426 during a single iteration. A
reference renderer that runs different decoders than the exporter puts a free
variable in every pixel diff, so this builds the CLI from the same pinned
revision the exporter uses and drops it on the persistent target volume.
Both are COPY'd into the image at Dockerfile:76, so neither takes effect in a
running container until the image is rebuilt. The reference CLI is already built
into the target volume by hand, so P1 is not blocked in the meantime.
24 lines
1003 B
Bash
Executable File
24 lines
1003 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build and run the exporter against the disc.
|
|
#
|
|
# build-export build only
|
|
# build-export --run build, export to ./export, then validate it
|
|
#
|
|
# The validate step is not optional politeness: `export` writes a tree and
|
|
# `check` is the only thing that says the tree is readable by anything other
|
|
# than the program that wrote it. A build that exports and does not check has
|
|
# not shown anything.
|
|
#
|
|
# Jobs are capped: this box runs two agent containers and a desktop, and an
|
|
# unbounded parallel build has crashed it. Do not raise this to "use all cores".
|
|
set -euo pipefail
|
|
cd "${PROJECT_DIR:-/work}"
|
|
export CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-3}"
|
|
cargo build --release -p sylpheed-export
|
|
if [ "${1:-}" = "--run" ]; then
|
|
shift
|
|
disc="${SYLPHEED_DISC:?set SYLPHEED_DISC to the extracted disc root}"
|
|
"$CARGO_TARGET_DIR/release/sylpheed-export" export --disc "$disc" --out export "$@"
|
|
exec "$CARGO_TARGET_DIR/release/sylpheed-export" check --out export
|
|
fi
|