v0.9.0-alpha.3 9059adf

bsd_tests.sh RawHistoryFolder

1#!/bin/sh -e
2
3# SPDX-License-Identifier: Apache-2.0
4# SPDX-FileCopyrightText: 2025 The Ebitengine Authors
5
6# BSD tests run within QEMU on Ubuntu.
7# vmactions/*-vm only supports a single "step" where it
8# brings down the VM at the end of the step, so all
9# the commands to run need to be put into this single block.
10
11echo "Running tests on $(uname -a) at $PWD"
12
13PATH=$PATH:/usr/local/go/bin/
14
15# verify Go is available
16go version
17
18echo "=> go build"
19go build -v ./...
20# Compile without optimization to check potential stack overflow.
21# The option '-gcflags=all=-N -l' is often used at Visual Studio Code.
22# See also https://go.googlesource.com/vscode-go/+/HEAD/docs/debugging.md#launch and the issue hajimehoshi/ebiten#2120.
23go build "-gcflags=all=-N -l" -v ./...
24
25# Check cross-compiling Windows binaries.
26env GOOS=windows GOARCH=386 go build -v ./...
27env GOOS=windows GOARCH=amd64 go build -v ./...
28env GOOS=windows GOARCH=arm go build -v ./...
29env GOOS=windows GOARCH=arm64 go build -v ./...
30
31# Check cross-compiling macOS binaries.
32env GOOS=darwin GOARCH=amd64 go build -v ./...
33env GOOS=darwin GOARCH=arm64 go build -v ./...
34
35# Check cross-compiling Linux binaries.
36env GOOS=linux GOARCH=amd64 go build -v ./...
37env GOOS=linux GOARCH=arm64 go build -v ./...
38
39# Check cross-compiling FreeBSD binaries.
40env GOOS=freebsd GOARCH=amd64 go build -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -v ./...
41env GOOS=freebsd GOARCH=arm64 go build -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -v ./...
42
43# Check cross-compiling NetBSD binaries.
44env GOOS=netbsd GOARCH=amd64 go build -v ./...
45env GOOS=netbsd GOARCH=arm64 go build -v ./...
46
47echo "=> go build (plugin)"
48# Make sure that plugin buildmode works since we save the R15 register (#254)
49go build -buildmode=plugin ./examples/libc
50
51echo "=> go mod vendor"
52mkdir /tmp/vendoring
53cd /tmp/vendoring
54go mod init foo
55echo 'package main' > main.go
56echo 'import (' >> main.go
57echo '  _ "github.com/ebitengine/purego"' >> main.go
58echo ')' >> main.go
59echo 'func main() {}' >> main.go
60go mod edit -replace github.com/ebitengine/purego=$GITHUB_WORKSPACE
61go mod tidy
62go mod vendor
63go build -v .
64
65cd $GITHUB_WORKSPACE
66echo "=> go test CGO_ENABLED=0"
67env CGO_ENABLED=0 go test -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -shuffle=on -v -count=10 ./...
68
69echo "=> go test CGO_ENABLED=1"
70env CGO_ENABLED=1 go test -shuffle=on -v -count=10 ./...
71
72# TODO: Enable this test again (#305).
73# echo "=> go test CGO_ENABLED=0 w/o optimization"
74# env CGO_ENABLED=0 go test "-gcflags=all=-N -l" -v ./...
75
76# TODO: Enable this test again (#305).
77# echo "=> go test CGO_ENABLED=1 w/o optimization"
78# env CGO_ENABLED=1 go test "-gcflags=all=-N -l" -v ./...
79
80if [ -z "$(go version | grep '^1.1')" ]; then
81  echo "=> go test race"
82  go test -race -shuffle=on -v -count=10 ./...
83fi

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close