forgeFRENParcourir les dépôts

roneocijobs.toml

98ff76d5794bbd1480ad719803187d2c40e42403

At commit 98ff76d

105 lines · 4.2 KiBRaw
  1. # Native Forge CI for Ronéo (schema 2, Rust 1.100.0)
  2. # - [cargo]: format, clippy, tests planned per-crate by Forge's Cargo model
  3. # - [jobs.gitleaks]: required secret scan for public repository landings
  4. # - [jobs.binaries-linux-*]: rootless BuildKit static musl `FROM scratch` OCI
  5. # artifacts built once on protected landings for release promotion & signing
  6. schema = 2
  7. [variables]
  8. CARGO_HOME = "$CI_PROJECT_DIR/.cache/forge-cargo"
  9. RUST_IMAGE = "registry.cleyrop.tech/external/library/rust:1.100.0-slim-trixie@sha256:24516ae4487ab804e3db145c93f7240e58e225587ab9b7c62ea31a218727bf67"
  10. [cargo]
  11. workspace = ""
  12. checks = ["format", "clippy", "tests"]
  13. reads = ["crates:public", "rust:dist"]
  14. tests_reads = ["apt:debian"]
  15. tests_warm = ["target", ".cache/forge-cargo/registry"]
  16. [cargo.job]
  17. image = "registry.cleyrop.tech/external/library/rust:1.100.0-slim-trixie@sha256:24516ae4487ab804e3db145c93f7240e58e225587ab9b7c62ea31a218727bf67"
  18. script = [
  19. "rustup component add clippy rustfmt",
  20. "{argv}",
  21. ]
  22. [cargo.tests]
  23. image = "registry.cleyrop.tech/external/library/rust:1.100.0-slim-trixie@sha256:24516ae4487ab804e3db145c93f7240e58e225587ab9b7c62ea31a218727bf67"
  24. script = [
  25. "command -v git >/dev/null || (apt-get update -qq && apt-get install -y -qq --no-install-recommends git >/dev/null)",
  26. "{argv}",
  27. ]
  28. # Required secret scan for every change on a published repository (PUBLIC-FORGE.md §6.5).
  29. [jobs.gitleaks]
  30. inputs = ["**"]
  31. image = "registry.cleyrop.tech/external/zricethezav/gitleaks:v8.24.2@sha256:b5918eb91b8d2473cec722f066abb4352e4ffdc4ec9f4283ec143aba9ec9ebc4"
  32. script = [
  33. "gitleaks detect --source . --no-banner --redact",
  34. ]
  35. # Static Linux amd64 binary (`FROM scratch`, `/roneo`) built once on protected landings
  36. # and promoted/signed by digest by Forge's release worker (PUBLIC-FORGE.md §8).
  37. [jobs.binaries-linux-amd64]
  38. inputs = [
  39. "Cargo.toml",
  40. "Cargo.lock",
  41. "rust-toolchain.toml",
  42. ".cargo/config.toml",
  43. "crates/**",
  44. "ci/binaries/Dockerfile",
  45. "ci/binaries/Dockerfile.dockerignore",
  46. ]
  47. on = { runs = ["landing"], trust = ["protected"] }
  48. outputs = ["DOCKER_DESTINATION"]
  49. provenance = ["CI_COMMIT_SHA", "CI_PROJECT_URL"]
  50. 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" } }
  51. [jobs.binaries-linux-amd64.variables]
  52. DOCKER_DESTINATION = "$HARBOR_REGISTRY/public/roneo-binaries:linux-amd64-$CI_COMMIT_SHA"
  53. # Static Linux arm64 binary (`FROM scratch`, `/roneo`), scheduled on arm64 build hosts.
  54. [jobs.binaries-linux-arm64]
  55. inputs = [
  56. "Cargo.toml",
  57. "Cargo.lock",
  58. "rust-toolchain.toml",
  59. ".cargo/config.toml",
  60. "crates/**",
  61. "ci/binaries/Dockerfile",
  62. "ci/binaries/Dockerfile.dockerignore",
  63. ]
  64. on = { runs = ["landing"], trust = ["protected"] }
  65. allow_failure = true
  66. outputs = ["DOCKER_DESTINATION"]
  67. provenance = ["CI_COMMIT_SHA", "CI_PROJECT_URL"]
  68. 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" } }
  69. [jobs.binaries-linux-arm64.variables]
  70. DOCKER_DESTINATION = "$HARBOR_REGISTRY/public/roneo-binaries:linux-arm64-$CI_COMMIT_SHA"
  71. # Signed & notarised macOS arm64 binary built on Forge's macOS signing host (`forge-mac-1`).
  72. [jobs.binaries-macos]
  73. inputs = [
  74. "Cargo.toml",
  75. "Cargo.lock",
  76. "rust-toolchain.toml",
  77. ".cargo/config.toml",
  78. "crates/**",
  79. "ci/binaries/macos/build.sh",
  80. ]
  81. on = { runs = ["landing"], trust = ["protected"] }
  82. detached = true
  83. allow_failure = true
  84. tags = ["platform:darwin/arm64"]
  85. resource_group = "macos-signing"
  86. image = "registry.cleyrop.tech/external/library/rust:1.100.0-slim-trixie@sha256:24516ae4487ab804e3db145c93f7240e58e225587ab9b7c62ea31a218727bf67"
  87. outputs = ["roneo-macos.json"]
  88. inline = ["roneo-macos.json"]
  89. artifacts = { paths = ["roneo-macos.json"] }
  90. notarisations = "notarisations.json"
  91. script = ["bash ci/binaries/macos/build.sh $CI_COMMIT_SHA"]
  92. [jobs.binaries-macos.variables]
  93. FORGE_SIGNING = "keychain"
  94. FORGE_SIGNING_TEAM = "4SKW2Z97A2"