From 95a2f11bba6770e3b08255499e582d028ff24fc5 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Sun, 17 Apr 2022 19:51:59 +0000 Subject: [PATCH] Add README --- README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7732ba3 --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +# Install Rust Toolchain + +This GitHub Action installs a Rust toolchain using rustup. +It further integrates into the ecosystem. +Caching for Rust tools and build artifacts is enabled. +Environment variables are set to optimize the cache hits. +[Problem Matchers] are provided for build messages (cargo, clippy) and formatting (rustfmt). + +The action is heavily inspired by *dtolnay*'s and extends it with further features. + +## Example workflow + +```yaml +name: "Test Suite" +on: + push: + pull_request: + +jobs: + test: + name: cargo test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - run: cargo test --all-features +``` + +## Inputs + +All inputs are optional. + +| Name | Description | Default | +| ------------ | --------------------------------------------------------------------------------- | ------- | +| `toolchain` | Rustup toolchain specifier e.g. `stable`, `nightly`, `1.42.0`. | stable | +| `target` | Additional target support to install e.g. `wasm32-unknown-unknown` | | +| `components` | Comma-separated string of additional components to install e.g. `clippy, rustfmt` | | + +## Outputs + +| Name | Description | +| ---------------- | ----------------------------------------- | +| `rustc-version` | Version as reported by `rustc --version` | +| `cargo-version` | Version as reported by `cargo --version` | +| `rustup-version` | Version as reported by `rustup --version` | + +## License + +The scripts and documentation in this project are released under the [MIT +License]. + +[MIT License]: LICENSE +[Problem Matchers]: https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md