Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sccache in test jobs #87

Merged
merged 1 commit into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,21 @@ jobs:
# Only test MSRV with zig stable version
- toolchain: 1.64.0
zig: master
env:
RUST_BACKTRACE: "1"
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- uses: actions/checkout@v3
- name: Install GNU tar
if: matrix.os == 'macos-latest'
run: |
brew install gnu-tar
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
- name: setup sccache
# Just for test, come back to upstream after released
uses: Xuanwo/sccache-action@c94e27bef21ab3fb4a5152c8a878c53262b4abb0
with:
version: "v0.4.0-pre.6"
- uses: dtolnay/rust-toolchain@master
id: rustup
with:
toolchain: ${{ matrix.toolchain }}
- name: Cache cargo build
uses: Swatinem/rust-cache@v1
- name: Cache test crates cargo build
uses: actions/cache@v3
with:
path: |
tests/hello-tls/target
tests/hello-windows/target
tests/libhello/target
key: test-crates-${{ runner.os }}-${{ steps.rustup.outputs.cachekey }}-${{ hashFiles('tests/*/Cargo.lock') }}
- name: Install zig
uses: korandoru/setup-zig@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
targets: aarch64-apple-darwin
- name: Cache cargo build
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
- name: Build
uses: PyO3/maturin-action@v1
with:
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- uses: actions/setup-python@v2
- uses: dtolnay/rust-toolchain@stable
- name: Cache cargo build
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
- name: Build
uses: PyO3/maturin-action@v1
with:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Cache cargo build
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.platform.target }}
- name: Build
Expand Down