mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Integrate all the test cases in a matrix
This commit is contained in:
parent
80d04732c2
commit
23dd8bb364
119
.github/workflows/test.yml
vendored
119
.github/workflows/test.yml
vendored
@ -3,93 +3,15 @@ name: test
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
go: ['1.12.17', '1.13.15', '1.14.7', '1.15']
|
||||
name: Test with Go ${{ matrix.go }} on Linux
|
||||
name: Test with Go ${{ matrix.go }} on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
DISPLAY: ':99.0'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libasound2-dev libgl1-mesa-dev libalut-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev
|
||||
env GO111MODULE=off go get github.com/agnivade/wasmbrowsertest
|
||||
mv $(go env GOPATH)/bin/wasmbrowsertest $(go env GOPATH)/bin/go_js_wasm_exec
|
||||
|
||||
- name: Start X
|
||||
run: |
|
||||
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
|
||||
|
||||
- name: go vet
|
||||
run: |
|
||||
go vet -tags=example -v ./...
|
||||
|
||||
- name: go build
|
||||
run: |
|
||||
go build -tags=example -v ./...
|
||||
env GOOS=js GOARCH=wasm go build -tags=example -v ./...
|
||||
env GOOS=windows GOARCH=amd64 go build -tags=example -v ./...
|
||||
env GOOS=windows GOARCH=386 go build -tags=example -v ./...
|
||||
|
||||
- name: go test
|
||||
run: |
|
||||
go test -tags=example -v ./...
|
||||
env GOOS=js GOARCH=wasm go test -tags=example -v ./...
|
||||
|
||||
macos:
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go: ['1.12.17', '1.13.15', '1.14.7', '1.15']
|
||||
name: Test with Go ${{ matrix.go }} on macOS
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
env GO111MODULE=off go get github.com/agnivade/wasmbrowsertest
|
||||
mv $(go env GOPATH)/bin/wasmbrowsertest $(go env GOPATH)/bin/go_js_wasm_exec
|
||||
|
||||
- name: go vet
|
||||
run: |
|
||||
go vet -tags=example -v ./...
|
||||
|
||||
- name: go build
|
||||
run: |
|
||||
go build -tags=example -v ./...
|
||||
env GOOS=js GOARCH=wasm go build -tags=example -v ./...
|
||||
env GOOS=windows GOARCH=amd64 go build -tags=example -v ./...
|
||||
env GOOS=windows GOARCH=386 go build -tags=example -v ./...
|
||||
|
||||
- name: go test
|
||||
run: |
|
||||
# Using OpenGL fails on a VM. (#1305)
|
||||
# go test -tags=example -v ./...
|
||||
env GOOS=js GOARCH=wasm go test -tags=example -v ./...
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go: ['1.12.17', '1.13.15', '1.14.7', '1.15']
|
||||
name: Test with Go ${{ matrix.go }} on Windows
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
@ -103,22 +25,43 @@ jobs:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libasound2-dev libgl1-mesa-dev libalut-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev
|
||||
|
||||
- name: Install wasmbrowsertest
|
||||
run: |
|
||||
env GO111MODULE=off go get github.com/agnivade/wasmbrowsertest
|
||||
mv $(go env GOPATH)/bin/wasmbrowsertest $(go env GOPATH)/bin/go_js_wasm_exec
|
||||
|
||||
- name: go vet
|
||||
- name: Xvfb
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
run: |
|
||||
# go vet fails on Windows. (#1306)
|
||||
# go vet -tags=example -v ./...
|
||||
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
|
||||
|
||||
- name: go vet
|
||||
if: ${{ matrix.os != 'windows-latest' }} # TODO: Fix go vet errors on Windows. (#1306)
|
||||
run: |
|
||||
go vet -tags=example -v ./...
|
||||
|
||||
- name: go build
|
||||
run: |
|
||||
go build -tags=example -v ./...
|
||||
env GOOS=js GOARCH=wasm go build -tags=example -v ./...
|
||||
|
||||
- name: go test
|
||||
- name: go build (Windows)
|
||||
if: ${{ matrix.os != 'windows-latest' }}
|
||||
run: |
|
||||
env GOOS=windows GOARCH=amd64 go build -tags=example -v ./...
|
||||
env GOOS=windows GOARCH=386 go build -tags=example -v ./...
|
||||
|
||||
- name: go test
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }} # TODO: Add more test environments (#1305)
|
||||
run: |
|
||||
go test -tags=example -v ./...
|
||||
|
||||
- name: go test (Wasm)
|
||||
if: ${{ matrix.os != 'windows-latest' }} # TODO: Investigate times out on Windows. (#1313)
|
||||
run: |
|
||||
# Getting OpenGL context fails on a VM. (#1305)
|
||||
# go test -tags=example -v ./...
|
||||
env GOOS=js GOARCH=wasm go test -tags=example -v ./...
|
||||
|
Loading…
Reference in New Issue
Block a user