forge
Explore
Log in

Don't you dare go Hollow

forge

Clone
★ 0

0 watching0 forksRustAGPL-3.07.1 MiB490f099Tahinli7 hours ago322 commits

ci.toml52 lines, 2.4 KiBHistoryRawDownload
1# CI for forge itself. Format: docs/ci.md, parser: crates/forge-ci/src/config.rs.
2#
3# The workflow has no branch condition, so the job also runs for pull requests.
4# One job does everything, so its steps run one at a time and no memory is declared. An earlier run
5# with concurrency 4 hit a host-wide OOM and the kernel killed rustc mid-build.
6# A tag push matching "v*" publishes a release with the job's binaries and SHA256SUMS, and
7# self-update deploys forge-<arch>-linux. Both happen only when the job succeeded.
8#
9# The job is named build because self-update's `job` setting and the release assets name it.
10
11[on]
12push = ["main"]
13pull_request = true
14manual = true
15tags = ["v*"]
16
17[jobs.build]
18image = "docker.io/library/rust:1"
19# Build parallelism comes from the runner (CARGO_BUILD_JOBS follows its CPU limit). Drops debuginfo.
20# CARGO_HOME in the workspace puts the downloaded crates in the cache, so a run downloads only new ones.
21# That places turso_core's source inside this repo, and its build.rs then watches our .git/HEAD, which
22# is new in every job, so it would rebuild on every run. With SOURCE_DATE_EPOCH set it skips git.
23# Incremental is off: since topcoat 0.12 the forge-web test build was OOM-killed with it on (runs 156, 158).
24env = { CARGO_INCREMENTAL = "0", CARGO_PROFILE_DEV_DEBUG = "0", CARGO_PROFILE_TEST_DEBUG = "0", CARGO_HOME = "/workspace/.cargo-home", SOURCE_DATE_EPOCH = "0" }
25# Unit tests run first, so a failure shows before the release build. The e2e tests then run against
26# the binary this job ships, so forge is not compiled a third time just for them.
27# The groups are the job's steps on the run page, and `exec 2>&1` keeps a marker in order with cargo's
28# stderr, which the runner reads from a separate pipe.
29run = """
30exec 2>&1
31echo "::group::Unit tests"
32cargo test --workspace --exclude forge-e2e
33echo "::endgroup::"
34echo "::group::Release build"
35cargo build --profile dist -p forge-web -p forge-runner
36echo "::endgroup::"
37echo "::group::E2E tests"
38FORGE_BIN="$PWD/target/dist/forge" cargo test -p forge-e2e
39echo "::endgroup::"
40echo "::group::Package"
41ARCH=$(uname -m)
42cp target/dist/forge forge-$ARCH-linux
43cp target/dist/forge-runner forge-runner-$ARCH-linux
44sha256sum forge-$ARCH-linux forge-runner-$ARCH-linux > SHA256SUMS
45echo "::endgroup::"
46"""
47artifacts = ["forge-*-linux", "SHA256SUMS"]
48cache = ["target", ".cargo-home"]
49timeout_minutes = 240
50
51[release]
52assets = ["build:forge-*-linux", "build:SHA256SUMS"]