Run your sr.ht build manifests locally before pushing.
Find a file
Christoph Heiss 02ad3fd0a8
flake: Add rust-analyzer to Rust toolchain
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-08-12 13:32:55 +02:00
src Initial commit 2023-08-12 13:25:40 +02:00
.build.yml Initial commit 2023-08-12 13:25:40 +02:00
.editorconfig Initial commit 2023-08-12 13:25:40 +02:00
.gitignore Initial commit 2023-08-12 13:25:40 +02:00
.prettierrc.json Initial commit 2023-08-12 13:25:40 +02:00
Cargo.lock Initial commit 2023-08-12 13:25:40 +02:00
Cargo.toml Initial commit 2023-08-12 13:25:40 +02:00
flake.lock Initial commit 2023-08-12 13:25:40 +02:00
flake.nix flake: Add rust-analyzer to Rust toolchain 2023-08-12 13:32:55 +02:00
LICENSE Initial commit 2023-08-12 13:25:40 +02:00
README.md Initial commit 2023-08-12 13:25:40 +02:00

srht-buildtest

Run your sr.ht build manifests locally before pushing.

Requirements

podman is used to run the builds, which must be installed and properly configured as well (see here).

To run foreign-architecture builds (e.g. your host is a x86_64 machine and your build manifest specifies arch: arm64), qemu-user-static (and accompanying binfmt rules) are needed. Again, these should be readily available on most distributions.

Supporting Docker instead of podman would likely not that hard overall, but is not officially supported by srht-buildtest. You might get away with a simple sed -i 's/"podman"/"docker"/g' src/podman.rs since the podman CLI tries to be drop-in compatible with docker, but YMMV.

Usage

srht-buildtest <path-to-repo>

This will pick up the build manifest .build.yaml (multiple builds via .builds/ are not [yet] supported) of the pointed-to repository.

Build manifest support

Architectures:

  • x86_64
  • aarch64

Images:

  • alpine/edge
  • archlinux
  • debian/stable
  • nixos/unstable

Adding more architectures and images is generally as easy as adding some more mappings.

License

Licensed under the terms of the GPL 3.0.

Contribution

The development mailing list is hosted at ~c8h4/devel@lists.sr.ht, the archive can be found at lists.sr.ht/~c8h4/devel.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed by GPL-3.0-only license as above, without any additional terms or conditions.