Skip to content

Commit

Permalink
Use sccache-action@v0.0.4 for gh-actions caching
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgurakgun committed Feb 26, 2024
1 parent c392135 commit 8c48696
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 28 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ on:
- .github/workflows/build.yml
# other branches that want testing must create a PR

env:
SCCACHE_GHA_ENABLED: "true"

jobs:

Job:
Expand Down Expand Up @@ -51,11 +54,9 @@ jobs:
key: stack-${{ runner.os }}-ghc${{ matrix.GHC_VERSION }}-${{ github.event.repository.updated_at }}
restore-keys: stack-${{ runner.os }}-ghc${{ matrix.GHC_VERSION }}

- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}

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

- name: Setting PATH
shell: bash
run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ on:
permissions:
contents: write

env:
SCCACHE_GHA_ENABLED: "true"

jobs:

Job:
Expand Down Expand Up @@ -53,11 +56,9 @@ jobs:
key: stack-${{ runner.os }}-ghc${{ matrix.GHC_VERSION }}-${{ github.event.repository.updated_at }}
restore-keys: stack-${{ runner.os }}-ghc${{ matrix.GHC_VERSION }}

- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}

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

- name: Setting PATH
shell: bash
run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
Expand All @@ -70,8 +71,6 @@ jobs:
shell: bash
run: |
echo "${HOME}/solver-binaries" >> ${GITHUB_PATH}
echo "/usr/lib/ccache" >> ${GITHUB_PATH}
echo "/usr/local/opt/ccache/libexec" >> ${GITHUB_PATH}
- name: Installing dependencies (gperf) on Linux
shell: bash
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/solvers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on:
- .github/workflows/solvers.yml
# other branches that want testing must create a PR

env:
SCCACHE_GHA_ENABLED: "true"

jobs:

Job:
Expand All @@ -36,17 +39,13 @@ jobs:
- uses: actions/checkout@v3
name: Checkout repository

- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4

- name: Setting PATH
shell: bash
run: |
echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
echo "/usr/lib/ccache" >> ${GITHUB_PATH}
echo "/usr/local/opt/ccache/libexec" >> ${GITHUB_PATH}
- name: Installing dependencies (gperf) on Linux
shell: bash
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
- etc/savilerow/**
- .github/workflows/test-coverage.yml

env:
SCCACHE_GHA_ENABLED: "true"

jobs:

Job:
Expand Down Expand Up @@ -42,11 +45,9 @@ jobs:
key: stack-${{ runner.os }}-ghc${{ matrix.GHC_VERSION }}-${{ github.event.repository.updated_at }}
restore-keys: stack-${{ runner.os }}-ghc${{ matrix.GHC_VERSION }}

- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}

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

- name: Setting PATH
shell: bash
run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ on:
- .github/workflows/test.yml
# other branches that want testing must create a PR

env:
SCCACHE_GHA_ENABLED: "true"

jobs:

Job:
Expand Down Expand Up @@ -55,11 +58,9 @@ jobs:
key: stack-${{ runner.os }}-ghc${{ matrix.GHC_VERSION }}-${{ github.event.repository.updated_at }}
restore-keys: stack-${{ runner.os }}-ghc${{ matrix.GHC_VERSION }}

- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}

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

- name: Setting PATH
shell: bash
run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
Expand Down

0 comments on commit 8c48696

Please sign in to comment.