forge
Explore
Log in

Don't you dare go Hollow

personality

Clone
★ 0

0 watching0 forksRustGPL-3.0460.1 KiB4de8815Tahinli7 days ago22 commits

ci.toml36 lines, 1.1 KiBHistoryRawDownload
1# CI for personality. Format: forge's docs/ci.md.
2#
3# The workflow has no branch condition, so the job also runs for pull requests.
4# A tag push matching "v*" publishes a release with the binary and SHA256SUMS, only when the job succeeded.
5
6name = "build"
7
8[on]
9push = ["main"]
10pull_request = true
11manual = true
12tags = ["v*"]
13
14[jobs.build]
15image = "docker.io/library/rust:1"
16# CARGO_HOME in the workspace puts the downloaded crates in the cache, so a run downloads only new ones.
17env = { CARGO_HOME = "/workspace/.cargo-home" }
18# The groups are the job's steps on the run page, and `exec 2>&1` keeps a marker in order with cargo's
19# stderr, which the runner reads from a separate pipe.
20run = """
21exec 2>&1
22echo "::group::Release build"
23cargo build --release
24echo "::endgroup::"
25echo "::group::Package"
26ARCH=$(uname -m)
27cp target/release/personality personality-$ARCH-linux
28sha256sum personality-$ARCH-linux > SHA256SUMS
29echo "::endgroup::"
30"""
31artifacts = ["personality-*-linux", "SHA256SUMS"]
32cache = ["target", ".cargo-home"]
33timeout_minutes = 60
34
35[release]
36assets = ["build:personality-*-linux", "build:SHA256SUMS"]