-
Notifications
You must be signed in to change notification settings - Fork 125
104 lines (100 loc) · 2.67 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go:
- '1.18'
- '1.19'
name: Linux Go ${{ matrix.go }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Install dependencies
run: |
sudo apt-get update -qq \
&& sudo apt-get install --no-install-recommends -y \
libopus-dev \
libva-dev \
libvpx-dev \
libx264-dev
- name: Run Test Suite
run: make test
- uses: codecov/codecov-action@v3
if: matrix.go == '1.19'
build-darwin:
strategy:
fail-fast: false
matrix:
runs-on:
- macos-latest
- ['self-hosted', 'macOS', 'ARM64']
go:
- '1.18'
- '1.19'
runs-on: ${{ matrix.runs-on }}
name: Darwin Go ${{ matrix.go }} ${{ join(matrix.runs-on, ' ') }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
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
run: |
which brew
brew install \
pkg-config \
opus \
libvpx \
x264
- name: Run Test Suite
run: make test
check-licenses:
runs-on: ubuntu-latest
name: Check Licenses
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.19'
- name: Installing go-licenses
run: go install github.com/google/go-licenses@latest
- name: Checking licenses
run: go-licenses check ./...