Skip to content

Commit

Permalink
ci test sscache
Browse files Browse the repository at this point in the history
  • Loading branch information
awnion committed Sep 21, 2023
1 parent 22f0a69 commit 074e86a
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ permissions:

env:
release: ${{ startsWith(github.ref, 'refs/tags/') && github.repository == 'gosh-sh/gosh' }}
CARGO_TERM_COLOR: always

jobs:
build:
Expand Down Expand Up @@ -108,6 +107,12 @@ jobs:
CACHE_RESULT_DIR: ${{ github.workspace }}/.result/${{ matrix.result }}
CACHE_RESULT_BIN: ${{ github.workspace }}/.result/${{ matrix.result }}/${{ matrix.bin }}

CARGO_TERM_COLOR: always
SCCACHE_GHA_VERSION: ${{ vars.SCCACHE_GHA_VERSION || 1 }} # Setting this env var enables the caching
RUSTC_WRAPPER: sccache
CMAKE_C_COMPILER_LAUNCHER: sccache
CMAKE_CXX_COMPILER_LAUNCHER: sccache

steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand All @@ -117,13 +122,16 @@ jobs:
run: |
echo "VERSION=$(cat version.json | jq -r .version)" >> "$GITHUB_OUTPUT"
- name: Setup result cache
uses: actions/cache@v3
with:
path: |
.result
${{ matrix.dir }}/target
key: builder-${{ matrix.target }}-result-${{ matrix.bin }}
# - name: Setup result cache
# uses: actions/cache@v3
# with:
# path: |
# .result
# ${{ matrix.dir }}/target
# key: builder-${{ matrix.target }}-result-${{ matrix.bin }}

- name: Configure sccache
uses: mozilla-actions/[email protected]

- name: Check if can use cache
if: matrix.cache
Expand Down

0 comments on commit 074e86a

Please sign in to comment.