Skip to content

Commit

Permalink
add build profile as part of GH CI cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelchcki committed May 27, 2022
1 parent 54162ad commit 309a054
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/actions/cache/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ inputs:
rust_version:
default: "latest"
required: false
build_profile:
default: "unspecified"
required: false

runs:
using: composite
Expand All @@ -17,4 +20,4 @@ runs:
~/.cargo/git/db/
~/.cargo/bin/
target/
key: v1-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ inputs.rust_version }}
key: v1-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ inputs.rust_version }}-${{ inputs.build_profile }}
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
uses: ./.github/actions/cache
with:
rust_version: ${{ matrix.rust_version }}
build_profile: "release"
- name: Install Rust ${{ matrix.rust_version }}
if: ${{ matrix.rust_version != '' }}
run: rustup install ${{ matrix.rust_version }} && rustup default ${{ matrix.rust_version }}
Expand Down

0 comments on commit 309a054

Please sign in to comment.