-
-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use GitHub Actions #939
Comments
Hey! I've been messing around with this today but ended up hitting the following issue with regards to OpenGL. I figure I'll paste what I've figured out so far here so that you have somewhere to start :) Github Actions output:
[](https://github.com/silbinarywolf/gml-go/actions) Based on this sample: [](https://github.com/{owner}/{repo}/actions) go.yml name: Go
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.12
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go
- name: Set up *nix dependencies
run: |
sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r"
sudo apt-get install libasound2-dev libglew-dev libgles2-mesa-dev libalut-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Get Go dependencies
run: |
export GO111MODULE=on
go mod download
go get -v
- name: Generate and Build
run: |
export PATH=${PATH}:`go env GOPATH`/bin
go install -v -tags debug ./gml
go install -v -tags headless ./gml
go install -v -tags "debug headless" ./gml
go install -v ./gml
go install -v ./cmd/gmlgo
gmlgo generate -v ./example/...
go build -tags debug -v ./example/...
go build -tags headless -v ./example/...
go build -tags "debug headless" -v ./example/...
go build -v ./example/...
- name: Test
run: |
export DISPLAY=:99.0
Xvfb :99 &
go test -v ./gml/...
go test -tags debug -v ./gml/...
go test -tags headless -v ./gml/...
go test -tags "debug headless" -v ./gml/...
go test -v ./cmd/...
go test -tags "debug headless" -coverprofile="coverage_spaceship.out" -coverpkg=$(go list ./example/spaceship/game) ./example/spaceship/test
go test -tags "debug headless" -coverprofile="coverage_worm.out" -coverpkg=$(go list ./example/worm/game) ./example/worm/test
- name: Publish
run: |
gmlgo publish -v ./example/spaceship |
https://github.com/hajimehoshi/ebiten/runs/240725659 Yes this is the same situation, but at least running Linux succeeded. |
Ah thanks for showing me yours! I was starting Xvfb incorrectly! |
This is the script I use to test an ebiten app in github: name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Install packages
run: |
sudo apt update
sudo apt install -y build-essential libalut-dev libasound2-dev libc6-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev mesa-utils pkg-config xorg-dev xvfb
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Test
env:
DISPLAY: ":99.0"
run: |
xvfb-run --auto-servernum go test -race -v ./... |
https://foundation.travis-ci.org/2020/06/15/foundation-update/ That's unfortunate, but TravisCI might become unavailable soon. |
Note: Dockerfile for an Android emulator environment: https://github.com/golang/build/blob/master/env/android-amd64-emu/Dockerfile |
It looks like Windows GUI is available!
The text was updated successfully, but these errors were encountered: