Update Github actions #1214
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
# ------------------------------------------------------------ | |
# Build and test workflow (Linux x64, macOS x64, Windows x64) | |
# ------------------------------------------------------------ | |
name: build | |
on: | |
push: | |
branches: | |
- master | |
tags-ignore: | |
- 'v*' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.0 | |
- name: Linux | |
if: matrix.os == 'ubuntu-latest' | |
env: | |
MESA_GL_VERSION_OVERRIDE: 3.3COMPAT | |
run: | | |
sudo apt-get -qq update | |
sudo apt-get -qq install -y \ | |
make pkg-config \ | |
libvpx-dev libx264-dev libopus-dev libyuv-dev libjpeg-turbo8-dev \ | |
libsdl2-dev libgl1-mesa-glx | |
make build | |
xvfb-run --auto-servernum make test verify-cores | |
- name: macOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install pkg-config libvpx x264 opus sdl2 jpeg-turbo | |
make build test verify-cores | |
- uses: msys2/setup-msys2@v2 | |
if: matrix.os == 'windows-latest' | |
with: | |
msystem: MINGW64 | |
path-type: inherit | |
release: false | |
install: > | |
mingw-w64-x86_64-gcc | |
mingw-w64-x86_64-pkgconf | |
mingw-w64-x86_64-dlfcn | |
mingw-w64-x86_64-libvpx | |
mingw-w64-x86_64-opus | |
mingw-w64-x86_64-x264-git | |
mingw-w64-x86_64-SDL2 | |
mingw-w64-x86_64-libyuv | |
mingw-w64-x86_64-libjpeg-turbo | |
- name: Windows | |
if: matrix.os == 'windows-latest' | |
env: | |
MESA_GL_VERSION_OVERRIDE: 3.3COMPAT | |
shell: msys2 {0} | |
run: | | |
wget -q https://github.com/pal1000/mesa-dist-win/releases/download/20.2.1/mesa3d-20.2.1-release-mingw.7z | |
"/c/Program Files/7-Zip/7z.exe" x mesa3d-20.2.1-release-mingw.7z -omesa | |
echo -e " 2\r\n 8\r\n " >> commands | |
./mesa/systemwidedeploy.cmd < ./commands | |
make build test verify-cores | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: emulator-test-frames | |
path: _rendered/*.png |