fix(CI): improve caching (#23387)

This commit is contained in:
Francesco Borzì
2025-10-26 13:43:22 +01:00
committed by GitHub
parent 1b2db00701
commit 3bbcc15233
9 changed files with 78 additions and 22 deletions

View File

@@ -10,9 +10,13 @@ on:
- synchronize
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
build:
strategy:

View File

@@ -10,9 +10,13 @@ on:
- synchronize
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
build:
strategy:

View File

@@ -19,8 +19,12 @@ on:
- 'src/server/shared/**/*'
- 'src/tools/**/*'
permissions:
actions: write
contents: read
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
jobs:

View File

@@ -16,7 +16,7 @@ on:
workflow_dispatch:
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
env:

View File

@@ -9,7 +9,7 @@ on:
- synchronize
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
env:
@@ -115,6 +115,6 @@ jobs:
event-type: azerothcore-new-images
client-payload: >
{
"ref": "${{ github.ref }}",
"ref": "${{ github.ref_name }}",
"sha": "${{ github.sha }}"
}

View File

@@ -9,9 +9,13 @@ on:
- synchronize
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
macos-build:
strategy:
@@ -31,13 +35,19 @@ jobs:
uses: actions/cache@v4
with:
path: ~/Library/Caches/ccache
key: ccache:${{ matrix.os }}:${{ github.ref }}:${{ github.sha }}
key: ccache:${{ matrix.os }}:${{ github.ref_name }}
restore-keys: |
ccache:${{ matrix.os }}:${{ github.ref }}
ccache:${{ matrix.os }}:${{ github.ref_name }}
ccache:${{ matrix.os }}
- name: reset ccache stats
shell: bash
run: ccache -z || true
- name: Install latest bash
run: brew install bash
- name: Configure OS
run: source ./acore.sh install-deps
- name: Build
run: source ./apps/ci/mac/ci-compile.sh
- name: ccache stats
shell: bash
run: ccache -s || true

View File

@@ -9,7 +9,7 @@ on:
- synchronize
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
jobs:

View File

@@ -9,7 +9,7 @@ on:
- synchronize
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
jobs: