2019-08-15 23:43:28 +00:00
|
|
|
# setup-rust-action
|
2019-08-15 17:16:59 +00:00
|
|
|
|
2019-08-16 00:16:04 +00:00
|
|
|
[![Integration status](https://github.com/hecrj/setup-rust-action/workflows/Integration/badge.svg)](https://github.com/hecrj/setup-rust-action/actions)
|
2019-08-15 17:16:59 +00:00
|
|
|
|
2019-08-15 23:43:28 +00:00
|
|
|
Sets up a specific Rust toolchain for use in your GitHub Actions workflows.
|
2019-08-15 17:16:59 +00:00
|
|
|
|
2019-08-15 23:43:28 +00:00
|
|
|
# Usage
|
2019-08-15 17:16:59 +00:00
|
|
|
|
2019-08-15 23:43:28 +00:00
|
|
|
Provide a `rust-version` with the desired toolchain version to install.
|
|
|
|
|
2019-08-15 23:49:38 +00:00
|
|
|
You can combine it with `matrix` to test different Rust toolchains in different
|
|
|
|
platforms!
|
|
|
|
|
2019-08-15 23:43:28 +00:00
|
|
|
```yml
|
2019-08-16 00:16:04 +00:00
|
|
|
name: Test Rust project
|
2019-08-15 23:43:28 +00:00
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
|
|
rust: [stable, nightly]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: hecrj/setup-rust-action@master
|
|
|
|
with:
|
|
|
|
rust-version: ${{ matrix.rust }}
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --verbose
|
|
|
|
```
|
|
|
|
|
|
|
|
For more details, check out [`action.yml`].
|
|
|
|
|
|
|
|
[`action.yml`]: https://github.com/hecrj/setup-rust-action/blob/master/action.yml
|
|
|
|
|
|
|
|
# Contributing / Feedback
|
|
|
|
|
|
|
|
Contributions and feedback are welcome! Feel free to open any issues or pull
|
|
|
|
requests.
|