mirror of
https://github.com/pion/mediadevices.git
synced 2025-09-27 04:46:10 +08:00
Improve ARM Darwin CI stability (#586)
- Isolate local homebrew cache directory from the host environment - Weekly refresh homebrew cache
This commit is contained in:
11
.github/workflows/ci.yaml
vendored
11
.github/workflows/ci.yaml
vendored
@@ -50,6 +50,8 @@ jobs:
|
|||||||
- '1.21'
|
- '1.21'
|
||||||
runs-on: ${{ matrix.runs-on }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
name: Darwin Go ${{ matrix.go }} ${{ join(matrix.runs-on, ' ') }}
|
name: Darwin Go ${{ matrix.go }} ${{ join(matrix.runs-on, ' ') }}
|
||||||
|
env:
|
||||||
|
HOMEBREW_CACHE: ${{ github.workspace }}/brew-cache
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -68,14 +70,19 @@ jobs:
|
|||||||
- name: Local brew cache key
|
- name: Local brew cache key
|
||||||
if: matrix.runs-on != 'macos-latest'
|
if: matrix.runs-on != 'macos-latest'
|
||||||
id: brew-cache-key
|
id: brew-cache-key
|
||||||
run: echo "key=$(date +'%Y-%U')" | tee ${GITHUB_OUTPUT} # weekly update cache
|
run: echo "key=$(date +'%Y-%U')" | tee ${GITHUB_OUTPUT} # weekly refresh the cache
|
||||||
|
- name: Cache brew
|
||||||
|
if: matrix.runs-on != 'macos-latest'
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ env.HOMEBREW_CACHE }}
|
||||||
|
key: ${{ runner.os }}-brew-cache-${{ steps.brew-cache-key.outputs.key }}
|
||||||
- name: Cache local brew taps
|
- name: Cache local brew taps
|
||||||
if: matrix.runs-on != 'macos-latest'
|
if: matrix.runs-on != 'macos-latest'
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: homebrew/Library/Taps
|
path: homebrew/Library/Taps
|
||||||
key: ${{ runner.os }}-brew-taps-${{ steps.brew-cache-key.outputs.key }}
|
key: ${{ runner.os }}-brew-taps-${{ steps.brew-cache-key.outputs.key }}
|
||||||
restore-keys: ${{ runner.os }}-brew-taps-
|
|
||||||
- name: Set up brew to install deps under temporary dir
|
- name: Set up brew to install deps under temporary dir
|
||||||
if: matrix.runs-on != 'macos-latest'
|
if: matrix.runs-on != 'macos-latest'
|
||||||
run: |
|
run: |
|
||||||
|
Reference in New Issue
Block a user