Skip to content

Commit

Permalink
Attempt: Alternative caching strategy for builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Jun 17, 2024
1 parent 054a9ba commit 64cd128
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches: [ master ]
tags:
- 'v1'
- 'v1-test'
paths:
- 'action.yml'
- '.github/workflows/test-build-workflow.yml'
Expand Down
25 changes: 11 additions & 14 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,18 @@ inputs:
runs:
using: 'composite'
steps:
- name: Install Nightly Rust
uses: dtolnay/rust-toolchain@nightly
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
matcher: false
cache: false
toolchain: nightly

- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.5

- name: Set Rust caching env vars
shell: bash
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
- name: Setup Rust Caching
uses: Swatinem/rust-cache@v2
with:
key: ${{ inputs.target }}
workspaces: false
cache-on-failure: true

- name: Install gcc-multilib (if on Ubuntu based System, and Not Using Cross)
if: inputs.use-cross == 'false' && runner.os == 'Linux'
Expand Down Expand Up @@ -169,10 +170,6 @@ runs:
echo "Build Dir: ${GITHUB_WORKSPACE}/${{ inputs.rust-project-path }}/target/${{ inputs.target }}/release"
ls "${GITHUB_WORKSPACE}/${{ inputs.rust-project-path }}/target/${{ inputs.target }}/release"
- name: Run sccache stat for check
shell: bash
run: sccache --show-stats

- name: Upload binary artifacts
if: inputs.upload-artifacts == 'true' && inputs.build-library != 'true'
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 64cd128

Please sign in to comment.