CI fix

AuthorKonata <konata@posteo.jp>
Date
Commitd037043de25fb3df7f03358df759784f0fcf90e0
Parent3b9c6ed
1 file changed, 12 insertions(+), 4 deletions(-)
▾M.hearthforge-ci.toml
@@ -8,7 +8,15 @@ clone_project_to = "/ci/build/project"
# The rust image ships bash. /bin/sh is dash and has no `pipefail`.
shell = ["/bin/bash", "-c"]
shell_setup = "set -euo pipefail"
# shell_setup is prepended to every step, so this exports the target dir once.
# It must sit outside the clone path: a cache volume mounted under
# /ci/build/project would create that directory, and `git clone` refuses to
# clone into a directory that is not empty.
shell_setup = """
set -euo pipefail
export CARGO_TARGET_DIR=/ci/cache/target
"""
timeout = 5400
memory_limit = "6g"
@@ -16,7 +24,7 @@ memory_limit = "6g"
# Without these every run recompiles the whole dependency tree from scratch.
cache = [
"/usr/local/cargo/registry",
"/ci/build/project/target",
"/ci/cache/target",
"/root/.bun/install/cache",
]
@@ -76,7 +84,7 @@ run_sh = "cd project && just test && cargo test -p web"
[build]
timeout = 2400
run_sh = "cd project && just build"
publish_file = ["/ci/build/project/target/release/filebrowser-ng"]
publish_file = ["/ci/cache/target/release/filebrowser-ng"]
# `just e2e` would rebuild the frontend. The build step already staged
# server/dist, so run the embedded suite against it directly.
@@ -89,7 +97,7 @@ run_sh = "cd project && cargo test -p server --features embedded"
run_if = 'test -n "${CI_COMMIT_TAG}"'
run_sh = """
cd project
install -Dm755 target/release/filebrowser-ng \
install -Dm755 "${CARGO_TARGET_DIR}/release/filebrowser-ng" \
"dist/filebrowser-ng-${CI_COMMIT_TAG}-x86_64-linux-gnu"
"""
publish_gzip = ["/ci/build/project/dist/"]