# Native Forge CI for Ronéo (schema 2, Rust 1.100.0) # - [cargo]: format, clippy, tests planned per-crate by Forge's Cargo model # - [jobs.gitleaks]: required secret scan for public repository landings # - [jobs.binaries-linux-*]: rootless BuildKit static musl `FROM scratch` OCI # artifacts built once on protected landings for release promotion & signing schema = 2 [variables] CARGO_HOME = "$CI_PROJECT_DIR/.cache/forge-cargo" RUST_IMAGE = "registry.cleyrop.tech/external/library/rust:1.100.0-slim-trixie@sha256:24516ae4487ab804e3db145c93f7240e58e225587ab9b7c62ea31a218727bf67" [cargo] workspace = "" checks = ["format", "clippy", "tests"] reads = ["crates:public", "rust:dist"] tests_reads = ["apt:debian"] tests_warm = ["target", ".cache/forge-cargo/registry"] [cargo.job] image = "registry.cleyrop.tech/external/library/rust:1.100.0-slim-trixie@sha256:24516ae4487ab804e3db145c93f7240e58e225587ab9b7c62ea31a218727bf67" script = [ "rustup component add clippy rustfmt", "{argv}", ] [cargo.tests] image = "registry.cleyrop.tech/external/library/rust:1.100.0-slim-trixie@sha256:24516ae4487ab804e3db145c93f7240e58e225587ab9b7c62ea31a218727bf67" script = [ "command -v git >/dev/null || (apt-get update -qq && apt-get install -y -qq --no-install-recommends git >/dev/null)", "{argv}", ] # Required secret scan for every change on a published repository (PUBLIC-FORGE.md §6.5). [jobs.gitleaks] inputs = ["**"] image = "registry.cleyrop.tech/external/zricethezav/gitleaks:v8.24.2@sha256:b5918eb91b8d2473cec722f066abb4352e4ffdc4ec9f4283ec143aba9ec9ebc4" script = [ "gitleaks detect --source . --no-banner --redact", ] # Static Linux amd64 binary (`FROM scratch`, `/roneo`) built once on protected landings # and promoted/signed by digest by Forge's release worker (PUBLIC-FORGE.md §8). [jobs.binaries-linux-amd64] inputs = [ "Cargo.toml", "Cargo.lock", "rust-toolchain.toml", ".cargo/config.toml", "crates/**", "ci/binaries/Dockerfile", "ci/binaries/Dockerfile.dockerignore", ] on = { runs = ["landing"], trust = ["protected"] } outputs = ["DOCKER_DESTINATION"] provenance = ["CI_COMMIT_SHA", "CI_PROJECT_URL"] build = { context = ".", dockerfile = "ci/binaries/Dockerfile", platforms = ["linux/amd64"], args = { TARGET_TRIPLE = "x86_64-unknown-linux-musl", SOURCE_REVISION = "$CI_COMMIT_SHA" }, labels = { "org.opencontainers.image.revision" = "$CI_COMMIT_SHA", "org.opencontainers.image.source" = "$CI_PROJECT_URL" } } [jobs.binaries-linux-amd64.variables] DOCKER_DESTINATION = "$HARBOR_REGISTRY/public/roneo-binaries:linux-amd64-$CI_COMMIT_SHA" # Static Linux arm64 binary (`FROM scratch`, `/roneo`), scheduled on arm64 build hosts. [jobs.binaries-linux-arm64] inputs = [ "Cargo.toml", "Cargo.lock", "rust-toolchain.toml", ".cargo/config.toml", "crates/**", "ci/binaries/Dockerfile", "ci/binaries/Dockerfile.dockerignore", ] on = { runs = ["landing"], trust = ["protected"] } allow_failure = true outputs = ["DOCKER_DESTINATION"] provenance = ["CI_COMMIT_SHA", "CI_PROJECT_URL"] build = { context = ".", dockerfile = "ci/binaries/Dockerfile", platforms = ["linux/arm64"], args = { TARGET_TRIPLE = "aarch64-unknown-linux-musl", SOURCE_REVISION = "$CI_COMMIT_SHA" }, labels = { "org.opencontainers.image.revision" = "$CI_COMMIT_SHA", "org.opencontainers.image.source" = "$CI_PROJECT_URL" } } [jobs.binaries-linux-arm64.variables] DOCKER_DESTINATION = "$HARBOR_REGISTRY/public/roneo-binaries:linux-arm64-$CI_COMMIT_SHA" # Signed & notarised macOS arm64 binary built on Forge's macOS signing host (`forge-mac-1`). [jobs.binaries-macos] inputs = [ "Cargo.toml", "Cargo.lock", "rust-toolchain.toml", ".cargo/config.toml", "crates/**", "ci/binaries/macos/build.sh", ] on = { runs = ["landing"], trust = ["protected"] } detached = true allow_failure = true tags = ["platform:darwin/arm64"] resource_group = "macos-signing" image = "registry.cleyrop.tech/external/library/rust:1.100.0-slim-trixie@sha256:24516ae4487ab804e3db145c93f7240e58e225587ab9b7c62ea31a218727bf67" outputs = ["roneo-macos.json"] inline = ["roneo-macos.json"] artifacts = { paths = ["roneo-macos.json"] } notarisations = "notarisations.json" script = ["bash ci/binaries/macos/build.sh $CI_COMMIT_SHA"] [jobs.binaries-macos.variables] FORGE_SIGNING = "keychain" FORGE_SIGNING_TEAM = "4SKW2Z97A2"