Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
aea84e9171 | |||
08010b773d | |||
dcf4d74c21 | |||
7d6ff77cf9 | |||
3ec6dbd408 | |||
137d2d5a3a | |||
8282e10527 |
21
CHANGELOG.md
21
CHANGELOG.md
@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [1.3.1] - 2022-08-14
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
* Use the sparse-registry on nightly for faster access to the crate registry on nightly.
|
||||||
|
<https://internals.rust-lang.org/t/call-for-testing-cargo-sparse-registry/16862>
|
||||||
|
|
||||||
|
## [1.3.0] - 2022-07-30
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
* An option to disable configuring Rust cache.
|
||||||
|
Thanks to @filips123 for the PR.
|
||||||
|
|
||||||
|
## [1.2.1] - 2022-07-29
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Set environment variables before invoking the cache action.
|
||||||
|
This ensures restoring and saving are using the same cache key.
|
||||||
|
|
||||||
## [1.2.0] - 2022-07-21
|
## [1.2.0] - 2022-07-21
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
14
README.md
14
README.md
@ -24,6 +24,19 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
- run: cargo test --all-features
|
- run: cargo test --all-features
|
||||||
|
|
||||||
|
# Check formatting with rustfmt
|
||||||
|
formatting:
|
||||||
|
name: cargo fmt
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# Ensure rustfmt is installed and setup problem matcher
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
components: rustfmt
|
||||||
|
- name: Rustfmt Check
|
||||||
|
uses: actions-rust-lang/rustfmt@v1
|
||||||
```
|
```
|
||||||
|
|
||||||
## Inputs
|
## Inputs
|
||||||
@ -37,6 +50,7 @@ All input values are ignored if a toolchain file exists.
|
|||||||
| `toolchain` | Rustup toolchain specifier e.g. `stable`, `nightly`, `1.42.0`. | stable |
|
| `toolchain` | Rustup toolchain specifier e.g. `stable`, `nightly`, `1.42.0`. | stable |
|
||||||
| `target` | Additional target support to install e.g. `wasm32-unknown-unknown` | |
|
| `target` | Additional target support to install e.g. `wasm32-unknown-unknown` | |
|
||||||
| `components` | Comma-separated string of additional components to install e.g. `clippy, rustfmt` | |
|
| `components` | Comma-separated string of additional components to install e.g. `clippy, rustfmt` | |
|
||||||
|
| `cache` | Automatically configure Rust cache (using `Swatinem/rust-cache`) | true |
|
||||||
|
|
||||||
## Outputs
|
## Outputs
|
||||||
|
|
||||||
|
32
action.yml
32
action.yml
@ -22,6 +22,10 @@ inputs:
|
|||||||
components:
|
components:
|
||||||
description: "Comma-separated list of components to be additionally installed"
|
description: "Comma-separated list of components to be additionally installed"
|
||||||
required: false
|
required: false
|
||||||
|
cache:
|
||||||
|
description: "Automatically configure Rust cache"
|
||||||
|
required: false
|
||||||
|
default: "true"
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
rustc-version:
|
rustc-version:
|
||||||
@ -50,6 +54,22 @@ runs:
|
|||||||
targets: ${{inputs.target}}
|
targets: ${{inputs.target}}
|
||||||
components: ${{inputs.components}}
|
components: ${{inputs.components}}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
# The environment variables always need to be set before the caching action
|
||||||
|
- name: "Setting Environment Variables"
|
||||||
|
run: |
|
||||||
|
echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV
|
||||||
|
echo "CARGO_PROFILE_DEV_DEBUG=0" >> $GITHUB_ENV
|
||||||
|
echo "CARGO_TERM_COLOR=always" >> $GITHUB_ENV
|
||||||
|
echo "RUST_BACKTRACE=short" >> $GITHUB_ENV
|
||||||
|
echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV
|
||||||
|
# Enable faster sparse index on nightly
|
||||||
|
# https://internals.rust-lang.org/t/call-for-testing-cargo-sparse-registry/16862
|
||||||
|
echo "CARGO_UNSTABLE_SPARSE_REGISTRY=true" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
- name: "Install Rust Problem Matcher"
|
||||||
|
run: echo "::add-matcher::${{ github.action_path }}/rust.json"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Install rustup, if needed
|
- name: Install rustup, if needed
|
||||||
run: |
|
run: |
|
||||||
if ! command -v rustup &> /dev/null ; then
|
if ! command -v rustup &> /dev/null ; then
|
||||||
@ -87,15 +107,5 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: "Setup Rust Caching"
|
- name: "Setup Rust Caching"
|
||||||
|
if: inputs.cache == 'true'
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
- name: "Install Rust Problem Matcher"
|
|
||||||
run: echo "::add-matcher::${{ github.action_path }}/rust.json"
|
|
||||||
shell: bash
|
|
||||||
- name: "Setting Environment Variables"
|
|
||||||
run: |
|
|
||||||
echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV
|
|
||||||
echo "CARGO_PROFILE_DEV_DEBUG=0" >> $GITHUB_ENV
|
|
||||||
echo "CARGO_TERM_COLOR=always" >> $GITHUB_ENV
|
|
||||||
echo "RUST_BACKTRACE=short" >> $GITHUB_ENV
|
|
||||||
echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV
|
|
||||||
shell: bash
|
|
||||||
|
Reference in New Issue
Block a user