mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Use ccache-action on linux too
This commit is contained in:
parent
155894ec9c
commit
9fa149b595
1 changed files with 5 additions and 14 deletions
19
.github/workflows/desktop-build.yml
vendored
19
.github/workflows/desktop-build.yml
vendored
|
|
@ -135,7 +135,6 @@ jobs:
|
||||||
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
||||||
env:
|
env:
|
||||||
NAME: ${{matrix.distro}}${{matrix.version}}
|
NAME: ${{matrix.distro}}${{matrix.version}}
|
||||||
CACHE: ${{github.workspace}}/.cache/${{matrix.distro}}${{matrix.version}} # directory for caching docker image and ccache
|
|
||||||
# Cache size over the entire repo is 10Gi:
|
# Cache size over the entire repo is 10Gi:
|
||||||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
|
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
|
||||||
CCACHE_SIZE: 500M
|
CCACHE_SIZE: 500M
|
||||||
|
|
@ -145,15 +144,14 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Restore compiler cache (ccache)
|
- name: Setup ccache
|
||||||
id: ccache_restore
|
uses: jianmingyong/ccache-action@v1
|
||||||
uses: actions/cache/restore@v4
|
|
||||||
env:
|
env:
|
||||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||||
with:
|
with:
|
||||||
path: ${{env.CACHE}}
|
install-type: "binary"
|
||||||
key: ccache-${{matrix.distro}}${{matrix.version}}-${{env.BRANCH_NAME}}
|
ccache-key-prefix: ccache-${{matrix.distro}}${{matrix.version}}-${{env.BRANCH_NAME}}
|
||||||
restore-keys: ccache-${{matrix.distro}}${{matrix.version}}-
|
gh-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build ${{matrix.distro}} ${{matrix.version}} Docker image
|
- name: Build ${{matrix.distro}} ${{matrix.version}} Docker image
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
@ -183,13 +181,6 @@ jobs:
|
||||||
--ccache "$CCACHE_SIZE"
|
--ccache "$CCACHE_SIZE"
|
||||||
.ci/name_build.sh
|
.ci/name_build.sh
|
||||||
|
|
||||||
- name: Save compiler cache (ccache)
|
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
uses: actions/cache/save@v4
|
|
||||||
with:
|
|
||||||
path: ${{env.CACHE}}
|
|
||||||
key: ${{ steps.ccache_restore.outputs.cache-primary-key }}
|
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
id: upload_artifact
|
id: upload_artifact
|
||||||
if: matrix.package != 'skip'
|
if: matrix.package != 'skip'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue