mirror of
https://github.com/actions-rust-lang/setup-rust-toolchain.git
synced 2025-07-04 12:31:11 +00:00
allow disabling RUSTFLAGS
config
This commit is contained in:
parent
cf60eafd0a
commit
24274e4435
2 changed files with 29 additions and 8 deletions
10
action.yml
10
action.yml
|
@ -26,6 +26,10 @@ inputs:
|
|||
description: "Automatically configure Rust cache"
|
||||
required: false
|
||||
default: "true"
|
||||
rustflags:
|
||||
description: "set RUSTFLAGS environment variable, set to empty string to avoid overwriting build.rustflags"
|
||||
requred: false
|
||||
default: "-D warnings"
|
||||
|
||||
outputs:
|
||||
rustc-version:
|
||||
|
@ -76,8 +80,8 @@ runs:
|
|||
if [[ ! -v RUST_BACKTRACE ]]; then
|
||||
echo "RUST_BACKTRACE=short" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ ! -v RUSTFLAGS ]]; then
|
||||
echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV
|
||||
if [[ -v "$NEW_RUSTFLAGS" ]]; then
|
||||
echo "RUSTFLAGS="$NEW_RUSTFLAGS" >> $GITHUB_ENV
|
||||
fi
|
||||
# Enable faster sparse index on nightly
|
||||
# The value is ignored on stable and causes no problems
|
||||
|
@ -89,6 +93,8 @@ runs:
|
|||
echo "CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse" >> $GITHUB_ENV
|
||||
fi
|
||||
shell: bash
|
||||
env:
|
||||
NEW_RUSTFLAGS: ${{inputs.rustflags}}
|
||||
- name: "Install Rust Problem Matcher"
|
||||
run: echo "::add-matcher::${{ github.action_path }}/rust.json"
|
||||
shell: bash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue