Files
mediadevices/.github/workflows/ci.yaml
2020-10-02 01:42:01 -04:00

82 lines
2.0 KiB
YAML

name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.15', '1.14' ]
name: Linux Go ${{ matrix.go }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v1
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: go vet
run: go vet -tags nolibopusfile ./...
- name: go build
run: go build -tags nolibopusfile ./...
- name: go build without CGO
run: go build . pkg/...
env:
CGO_ENABLED: 0
- name: go test
run: go test -tags nolibopusfile ./... -v -race -coverprofile=coverage.txt -covermode=atomic
- uses: codecov/codecov-action@v1
if: matrix.go == '1.15'
- name: go test without CGO
run: go test . pkg/... -v
env:
CGO_ENABLED: 0
build-darwin:
runs-on: macos-latest
strategy:
matrix:
go: [ '1.15', '1.14' ]
name: Darwin Go ${{ matrix.go }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- name: Install dependencies
run: |
brew install \
pkg-config \
opus \
libvpx \
x264
- name: go vet
run: go vet ./...
- name: go build
run: go build ./...
- name: go build without CGO
run: go build . pkg/...
env:
CGO_ENABLED: 0
- name: go test
run: go test ./... -v -race
- name: go test without CGO
run: go test . pkg/... -v
env:
CGO_ENABLED: 0