mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 20:45:19 +00:00
Salt SwiftPM cache by toolchain
This commit is contained in:
@@ -32,14 +32,24 @@ jobs:
|
|||||||
- name: Set up Swift
|
- name: Set up Swift
|
||||||
uses: swift-actions/setup-swift@v2
|
uses: swift-actions/setup-swift@v2
|
||||||
|
|
||||||
|
- name: Compute Swift cache salt
|
||||||
|
id: swift_cache_salt
|
||||||
|
run: |
|
||||||
|
{
|
||||||
|
swift --version
|
||||||
|
xcrun --show-sdk-platform-path
|
||||||
|
xcrun --show-sdk-version
|
||||||
|
xcodebuild -version
|
||||||
|
} | shasum -a 256 | awk '{ print "value=" $1 }' >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Cache build artifacts
|
- name: Cache build artifacts
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ matrix.path }}/.build
|
path: ${{ matrix.path }}/.build
|
||||||
key: ${{ runner.os }}-${{ matrix.name }}-${{ hashFiles(format('{0}/**/*.swift', matrix.path), format('{0}/**/Package.resolved', matrix.path)) }}
|
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.name }}-${{ steps.swift_cache_salt.outputs.value }}-${{ hashFiles(format('{0}/**/*.swift', matrix.path), format('{0}/**/Package.resolved', matrix.path)) }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-${{ matrix.name }}-${{ hashFiles(format('{0}/**/Package.resolved', matrix.path)) }}
|
${{ runner.os }}-${{ runner.arch }}-${{ matrix.name }}-${{ steps.swift_cache_salt.outputs.value }}-${{ hashFiles(format('{0}/**/Package.resolved', matrix.path)) }}
|
||||||
${{ runner.os }}-${{ matrix.name }}-
|
${{ runner.os }}-${{ runner.arch }}-${{ matrix.name }}-${{ steps.swift_cache_salt.outputs.value }}-
|
||||||
|
|
||||||
- name: Build tests
|
- name: Build tests
|
||||||
# Built separately so the hang watchdog below times only test
|
# Built separately so the hang watchdog below times only test
|
||||||
|
|||||||
Reference in New Issue
Block a user