Forgejo action for building rust projects.
Find a file
Paul Campbell d9532aa17a
All checks were successful
/ test (push) Successful in 1h0m55s
build: be more flexible in apt-get versions for docker image
Also merges as we can't build without both in place:

fix(build): revert invalid matrix syntax

Back out "test: verify matrix with stable and nightly"

This backs out commit 5fc345c0de.
2024-09-17 08:44:43 +01:00
.forgejo/workflows build: be more flexible in apt-get versions for docker image 2024-09-17 08:44:43 +01:00
src Add sample app to build and test 2024-05-16 19:46:05 +01:00
.gitignore Add sample app to build and test 2024-05-16 19:46:05 +01:00
Cargo.toml Add sample app to build and test 2024-05-16 19:46:05 +01:00
Dockerfile build: be more flexible in apt-get versions for docker image 2024-09-17 08:44:43 +01:00
entrypoint.sh feat: allow selecting the nightly toolchain 2024-09-16 17:09:17 +01:00
LICENSE Initial commit 2024-05-16 17:59:27 +01:00
README.md feat: allow selecting the nightly toolchain 2024-09-16 17:09:17 +01:00
renovate.json Add renovate.json 2024-08-02 18:16:19 +00:00

docker-builder-rust

Docker image for building Rust projects with Cargo.

Usage

In a Forgejo action file, e.g. .forgejo/workflows/test.yml:

on: [push]
jobs:
  test:
    runs-on: docker
    steps:
      - uses: https://git.kemitix.net/kemitix/rust@v1.80.0
        with:
          args: nightly cargo test
      - uses: https://git.kemitix.net/kemitix/rust@v1.80.0
        with:
          args: v1.79.0 cargo build

The args is one of the following:

  • [ [nightly | stable | v1.xx.x] ]

COMMAND is the command you want to run. The optional prefix is the Rust toolchain, or version. Allowed values are nightly, stable or a Rust version.

Where the optional prefix is not given, the stable toolchain will be used.

Contents

  • nodejs
  • rust
  • git
  • cargo
  • cargo-binstall

Binary size

To reduce the size of the debug binary, add the following to the .cargo/config.toml file in you project.

[profile.dev]
debug = 0
strip = "debuginfo"