sr.ht-buildtest/README.md
Christoph Heiss 15a0aae7c6
Initial commit
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-08-12 13:25:40 +02:00

1.7 KiB

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.