Bump minimum supported Go version to 1.19 #1655
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- 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@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
# Set up local brew only on self-hosted darwin | |
- name: Checkout Homebrew | |
if: matrix.runs-on != 'macos-latest' | |
uses: actions/checkout@v4 | |
with: | |
repository: Homebrew/brew | |
path: homebrew | |
- name: Local brew cache key | |
if: matrix.runs-on != 'macos-latest' | |
id: brew-cache-key | |
run: echo "key=$(date +'%Y-%U')" | tee ${GITHUB_OUTPUT} # weekly update cache | |
- name: Cache local brew taps | |
if: matrix.runs-on != 'macos-latest' | |
uses: actions/cache@v3 | |
with: | |
path: homebrew/Library/Taps | |
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 | |
if: matrix.runs-on != 'macos-latest' | |
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@v4 | |
- 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 ./... |