- Replace `::add-path::` CI command with environment files
- Placate Clippy
- Consolidate cache actions
This commit is contained in:
Casey Rodarmor 2020-11-19 14:47:04 -08:00 committed by GitHub
parent 8502cf6618
commit 1fc4842e4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 25 deletions

View file

@ -10,12 +10,6 @@ on:
branches:
- master
env:
# Increment to invalidate github actions caches if they become corrupt.
# Errors of the form "can't find crate for `snafu_derive` which `snafu` depends on"
# can usually be fixed by incrementing this value.
CACHE_KEY_PREFIX: 4
jobs:
all:
name: All
@ -48,25 +42,16 @@ jobs:
if: matrix.os == 'macos-latest'
run: |
brew install gnu-tar
echo "::add-path::/usr/local/opt/gnu-tar/libexec/gnubin"
echo /usr/local/opt/gnu-tar/libexec/gnubin > $GITHUB_PATH
- name: Cache cargo registry
- name: Cache Cargo
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ env.CACHE_KEY_PREFIX }}-${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ env.CACHE_KEY_PREFIX }}-${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ env.CACHE_KEY_PREFIX }}-${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Main Toolchain
uses: actions-rs/toolchain@v1

View file

@ -1,7 +1,6 @@
#![deny(clippy::all, clippy::pedantic, clippy::restriction)]
#![allow(
clippy::blanket_clippy_restriction_lints,
clippy::option_if_let_else,
clippy::comparison_chain,
clippy::else_if_without_else,
clippy::enum_glob_use,
@ -19,7 +18,9 @@
clippy::missing_inline_in_public_items,
clippy::needless_pass_by_value,
clippy::non_ascii_literal,
clippy::option_if_let_else,
clippy::panic,
clippy::panic_in_result_fn,
clippy::pattern_type_mismatch,
clippy::print_stdout,
clippy::shadow_unrelated,
@ -27,6 +28,7 @@
clippy::struct_excessive_bools,
clippy::too_many_lines,
clippy::unreachable,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::use_debug,
clippy::wildcard_enum_match_arm,

View file

@ -234,7 +234,7 @@ impl<'src, D> Recipe<'src, D> {
command = &command[1..];
}
if command == "" {
if command.is_empty() {
continue;
}

View file

@ -19,7 +19,7 @@ impl<'line> Shebang<'line> {
let interpreter = pieces.next().unwrap_or("");
let argument = pieces.next();
if interpreter == "" {
if interpreter.is_empty() {
return None;
}