mirror of
https://github.com/pion/mediadevices.git
synced 2025-09-27 12:52:20 +08:00
Add CI for M1 Mac (#454)
This commit is contained in:
31
.github/workflows/ci.yaml
vendored
31
.github/workflows/ci.yaml
vendored
@@ -37,14 +37,17 @@ jobs:
|
|||||||
- uses: codecov/codecov-action@v3
|
- uses: codecov/codecov-action@v3
|
||||||
if: matrix.go == '1.19'
|
if: matrix.go == '1.19'
|
||||||
build-darwin:
|
build-darwin:
|
||||||
runs-on: macos-latest
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
runs-on:
|
||||||
|
- macos-latest
|
||||||
|
- ['self-hosted', 'macOS', 'ARM64']
|
||||||
go:
|
go:
|
||||||
- '1.18'
|
- '1.18'
|
||||||
- '1.19'
|
- '1.19'
|
||||||
name: Darwin Go ${{ matrix.go }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
|
name: Darwin Go ${{ matrix.go }} ${{ join(matrix.runs-on, ' ') }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -52,8 +55,32 @@ jobs:
|
|||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
|
- name: Checkout Homebrew
|
||||||
|
if: matrix.runs-on != 'macos-latest'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: Homebrew/brew
|
||||||
|
path: homebrew
|
||||||
|
- name: Set up brew to install deps under temporary dir
|
||||||
|
if: matrix.runs-on != 'macos-latest' # set up local brew only on self-hosted
|
||||||
|
run: |
|
||||||
|
dir="${GITHUB_WORKSPACE}/homebrew"
|
||||||
|
cd "${dir}"
|
||||||
|
|
||||||
|
echo "Set up shellenv" >&2
|
||||||
|
env="$(./bin/brew shellenv)"
|
||||||
|
echo "${env}" | tee -a ${GITHUB_ENV}
|
||||||
|
eval "${env}"
|
||||||
|
|
||||||
|
echo "Set up paths" >&2
|
||||||
|
echo "${dir}/bin" | tee -a ${GITHUB_PATH}
|
||||||
|
|
||||||
|
echo "Brew update" >&2
|
||||||
|
brew update --force --quiet
|
||||||
|
chmod -R go-w "$(brew --prefix)/share/zsh"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
which brew
|
||||||
brew install \
|
brew install \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
opus \
|
opus \
|
||||||
|
Reference in New Issue
Block a user