Skip to content

Commit

Permalink
use Cargo.toml & Cargo.lock for sccache build dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Be-ing committed Mar 15, 2021
1 parent 460912a commit f3d9b69
Show file tree
Hide file tree
Showing 4 changed files with 3,481 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,19 @@ jobs:
name: ${{ matrix.name }}
steps:

# sccache's handling of the /fp:fast MSVC compiler option is broken, so use our fork with the fix.
# https://github.com/mozilla/sccache/issues/950
- name: "[Windows] Set up cargo cache"
if: runner.os == 'Windows'
uses: actions/cache@v2
id: sccache-build-cache
with:
path: C:\Users\runneradmin\.cargo
# hash of commit to build
key: e12434e4db24ccbe52b83fb6e37afcb94fc8d37b
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

# This needs to be done first because something later messes with $PATH in a way that breaks cargo
# by causing it to find link.exe from Git for Windows instead of MSVC.
- name: "[Windows] Build fixed sccache"
shell: bash
if: runner.os == 'Windows' && steps.sccache-build-cache.outputs.cache-hit != 'true'
# TODO: change this to simply `cargo install sccache` after 0.2.16 has been released
run: cargo install --git https://github.com/mozilla/sccache.git --branch master
run: cargo update

- name: "Check out repository"
uses: actions/checkout@v2
Expand Down
Loading

0 comments on commit f3d9b69

Please sign in to comment.