mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
104 lines
3.4 KiB
YAML
104 lines
3.4 KiB
YAML
addons:
|
|
apt:
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
packages:
|
|
- libasound2-dev
|
|
- libgl1-mesa-dev
|
|
- libalut-dev
|
|
- libxcursor-dev
|
|
- libxi-dev
|
|
- libxinerama-dev
|
|
- libxrandr-dev
|
|
- libxxf86vm-dev
|
|
chrome: stable
|
|
|
|
services:
|
|
- xvfb
|
|
|
|
install:
|
|
# Install Go 1.13.7 manualy
|
|
# See https://travis-ci.community/t/goos-js-goarch-wasm-go-run-fails-panic-newosproc-not-implemented/1651
|
|
- wget -O go.tar.gz https://dl.google.com/go/go1.13.7.linux-amd64.tar.gz
|
|
- tar -C ~ -xzf go.tar.gz
|
|
- rm go.tar.gz
|
|
- export GOROOT=~/go
|
|
- export GOPATH=/home/travis/gopath
|
|
- export PATH=$GOROOT/bin:$PATH
|
|
- go version
|
|
- go env
|
|
|
|
# Install Go 1.12.16
|
|
- go get golang.org/dl/go1.12.16
|
|
- go1.12.16 download
|
|
|
|
# Install Go 1.14rc1
|
|
- go get golang.org/dl/go1.14rc1
|
|
- go1.14rc1 download
|
|
|
|
# Make the working directory
|
|
- mkdir /tmp/work
|
|
- cd /tmp/work
|
|
- go mod init example.com/m
|
|
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then go get github.com/hajimehoshi/ebiten@$TRAVIS_COMMIT; fi
|
|
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then go get github.com/hajimehoshi/ebiten; fi
|
|
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then wget -O ebiten.zip https://github.com/hajimehoshi/ebiten/archive/$TRAVIS_COMMIT.zip; fi
|
|
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then unzip ebiten.zip; fi
|
|
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then mv ./ebiten-$TRAVIS_COMMIT ebiten; fi
|
|
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then go mod edit -replace=github.com/hajimehoshi/ebiten=./ebiten; fi
|
|
|
|
# wasmbrowsertest
|
|
- GO111MODULE=off go1.14rc1 get github.com/agnivade/wasmbrowsertest
|
|
- mv $GOPATH/bin/wasmbrowsertest $GOPATH/bin/go_js_wasm_exec
|
|
|
|
# GopherJS
|
|
- GO111MODULE=off go1.12.16 get github.com/gopherjs/gopherjs
|
|
- mkdir -p $GOPATH/src/github.com/hajimehoshi
|
|
- cd $GOPATH/src/github.com/hajimehoshi
|
|
- wget -O ebiten.zip https://github.com/hajimehoshi/ebiten/archive/$TRAVIS_COMMIT.zip
|
|
- unzip ebiten.zip
|
|
- mv ./ebiten-$TRAVIS_COMMIT ebiten
|
|
- cd ./ebiten
|
|
- GO111MODULE=off go get -d -tags=example ./...
|
|
- cd /tmp/work
|
|
|
|
# gjbt
|
|
- GO111MODULE=off go1.12.16 get myitcv.io/cmd/gjbt
|
|
|
|
# Chrome
|
|
- mkdir /tmp/google-chrome-bin
|
|
- ln -s /usr/bin/google-chrome-stable /tmp/google-chrome-bin/google-chrome
|
|
- export PATH=/tmp/google-chrome-bin:$PATH
|
|
- curl -s https://chromedriver.storage.googleapis.com/2.38/chromedriver_linux64.zip > /tmp/chromedriver_linux64.zip
|
|
- unzip -d /tmp/chromedriver_linux64 /tmp/chromedriver_linux64.zip
|
|
- export PATH=/tmp/chromedriver_linux64:$PATH
|
|
|
|
before_script:
|
|
- export DISPLAY=:99.0
|
|
|
|
script:
|
|
- cd /tmp/work
|
|
|
|
# go vet
|
|
- go vet -tags=example -v github.com/hajimehoshi/ebiten/...
|
|
|
|
# go build
|
|
- go build -tags=example -v github.com/hajimehoshi/ebiten/...
|
|
- GOOS=windows GOARCH=amd64 go build -tags=example -v github.com/hajimehoshi/ebiten/...
|
|
- GOOS=windows GOARCH=386 go build -tags=example -v github.com/hajimehoshi/ebiten/...
|
|
|
|
# go test
|
|
- go test -v github.com/hajimehoshi/ebiten/...
|
|
- GOOS=js GOARCH=wasm go1.14rc1 test -v github.com/hajimehoshi/ebiten/...
|
|
|
|
# GopherJS
|
|
- GO111MODULE=off go1.12.16 run github.com/gopherjs/gopherjs build --tags=example -v github.com/hajimehoshi/ebiten/examples/blocks
|
|
- GO111MODULE=off go1.12.16 run myitcv.io/cmd/gjbt github.com/hajimehoshi/ebiten # TODO: Test the subdirectories
|
|
|
|
# - test -z $(gofmt -s -l $GOPATH/src/github.com/hajimehoshi/ebiten)
|
|
|
|
notifications:
|
|
email:
|
|
recipients:
|
|
- hajimehoshi@gmail.com
|