It looks like Windows GUI is available!
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:
Run export DISPLAY=:99.0
# github.com/go-gl/glfw/v3.2/glfw
In file included from ../../../go/pkg/mod/github.com/go-gl/[email protected]/v3.2/glfw/c_glfw_linbsd.go:24:0:
../../../go/pkg/mod/github.com/go-gl/[email protected]/v3.2/glfw/glfw/src/linux_joystick.c: In function ‘_glfwInitJoysticksLinux’:
##[error]../../../go/pkg/mod/github.com/go-gl/[email protected]/v3.2/glfw/glfw/src/linux_joystick.c:224:42: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 9 [-Wformat-truncation=]
snprintf(path, sizeof(path), "%s/%s", dirname, entry->d_name);
^~~~~~~
In file included from /usr/include/stdio.h:862:0,
from /usr/include/X11/Xcursor/Xcursor.h:26,
from ../../../go/pkg/mod/github.com/go-gl/[email protected]/v3.2/glfw/glfw/src/x11_platform.h:39,
from ../../../go/pkg/mod/github.com/go-gl/[email protected]/v3.2/glfw/glfw/src/internal.h:169,
from ../../../go/pkg/mod/github.com/go-gl/[email protected]/v3.2/glfw/glfw/src/x11_init.c:28,
from ../../../go/pkg/mod/github.com/go-gl/[email protected]/v3.2/glfw/c_glfw_linbsd.go:19:
##[error]/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 12 and 267 bytes into a destination of size 20
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019/10/19 11:45:38 PlatformError: X11: RandR gamma ramp support seems broken
GLFW: An uncaught error has occurred: APIUnavailable: GLX: No GLXFBConfigs returned
GLFW: Please report this bug in the Go package immediately.
GLFW: An invalid error was not accepted by the caller: FormatUnavailable: GLX: Failed to find a suitable GLXFBConfig
GLFW: Please report this bug in the Go package immediately.
panic: FormatUnavailable: GLX: Failed to find a suitable GLXFBConfig
[](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
Most helpful comment
This is the script I use to test an ebiten app in github: