detached 1b61881

.github/workflows: add -e for FreeBSD test script and skip NetBSD tests (#306)

Without -e in the shebang #!/bin/sh, the script passed even some
commands failed and then we missed some errors happened. This change
adds -e to abort tests with an error code explicitly.

As #305 says, FreeBSD tests w/o optimization fails. This change skips
the test temporarilly.

This change also retracts the support of NetBSD temporarily. Let's
revert README again after #304 is fixed.

Updates #304
Updates #305
commit
1b61881350eafabf8a0a738f79723ca508a66eec
author
Hajime Hoshi · · 2025-03-17 18:19 UTC
committer
GitHub · · 2025-03-17 18:19 UTC
parent
009f4b0
signature
GPG UnverifiedB5690EEEBB952194 The key is unknown
3 files · +9 -8
M .github/scripts/bsd_tests.sh +7 -5
@@ -1,4 +1,4 @@
1-#!/bin/sh
1+#!/bin/sh -e
22
33 # SPDX-License-Identifier: Apache-2.0
44 # SPDX-FileCopyrightText: 2025 The Ebitengine Authors
@@ -69,11 +69,13 @@ env CGO_ENABLED=0 go test -gcflags="github.com/ebitengine/purego/internal/fakecg
6969 echo "=> go test CGO_ENABLED=1"
7070 env CGO_ENABLED=1 go test -shuffle=on -v -count=10 ./...
7171
72-echo "=> go test CGO_ENABLED=0 w/o optimization"
73-env CGO_ENABLED=0 go test "-gcflags=all=-N -l" -v ./...
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 ./...
7475
75-echo "=> go test CGO_ENABLED=1 w/o optimization"
76-env CGO_ENABLED=1 go test "-gcflags=all=-N -l" -v ./...
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 ./...
7779
7880 if [ -z "$(go version | grep '^1.1')" ]; then
7981 echo "=> go test race"
@@ -1,4 +1,4 @@
1-#!/bin/sh1+#!/bin/sh -e
2 2
3 # SPDX-License-Identifier: Apache-2.03 # SPDX-License-Identifier: Apache-2.0
4 # SPDX-FileCopyrightText: 2025 The Ebitengine Authors4 # SPDX-FileCopyrightText: 2025 The Ebitengine Authors
@@ -69,11 +69,13 @@ env CGO_ENABLED=0 go test -gcflags="github.com/ebitengine/purego/internal/fakecg
69 echo "=> go test CGO_ENABLED=1"69 echo "=> go test CGO_ENABLED=1"
70 env CGO_ENABLED=1 go test -shuffle=on -v -count=10 ./...70 env CGO_ENABLED=1 go test -shuffle=on -v -count=10 ./...
71 71
72-echo "=> go test CGO_ENABLED=0 w/o optimization"72+# TODO: Enable this test again (#305).
73-env CGO_ENABLED=0 go test "-gcflags=all=-N -l" -v ./...73+# echo "=> go test CGO_ENABLED=0 w/o optimization"
74+# env CGO_ENABLED=0 go test "-gcflags=all=-N -l" -v ./...
74 75
75-echo "=> go test CGO_ENABLED=1 w/o optimization"76+# TODO: Enable this test again (#305).
76-env CGO_ENABLED=1 go test "-gcflags=all=-N -l" -v ./...77+# echo "=> go test CGO_ENABLED=1 w/o optimization"
78+# env CGO_ENABLED=1 go test "-gcflags=all=-N -l" -v ./...
77 79
78 if [ -z "$(go version | grep '^1.1')" ]; then80 if [ -z "$(go version | grep '^1.1')" ]; then
79 echo "=> go test race"81 echo "=> go test race"
M .github/workflows/test.yml +1 -1
@@ -141,7 +141,7 @@ jobs:
141141 bsd:
142142 strategy:
143143 matrix:
144- os: ['FreeBSD', 'NetBSD']
144+ os: ['FreeBSD'] # TODO: Add 'NetBSD' again (#304)
145145 go: ['1.18.10', '1.19.13', '1.20.14', '1.21.13', '1.22.12', '1.23.7', '1.24.1']
146146 exclude:
147147 # there are no prebuilt download links for these versions of Go for NetBSD
@@ -141,7 +141,7 @@ jobs:
141 bsd:141 bsd:
142 strategy:142 strategy:
143 matrix:143 matrix:
144- os: ['FreeBSD', 'NetBSD']144+ os: ['FreeBSD'] # TODO: Add 'NetBSD' again (#304)
145 go: ['1.18.10', '1.19.13', '1.20.14', '1.21.13', '1.22.12', '1.23.7', '1.24.1']145 go: ['1.18.10', '1.19.13', '1.20.14', '1.21.13', '1.22.12', '1.23.7', '1.24.1']
146 exclude:146 exclude:
147 # there are no prebuilt download links for these versions of Go for NetBSD147 # there are no prebuilt download links for these versions of Go for NetBSD
M README.md +1 -2
@@ -29,14 +29,13 @@ except for float arguments and return values.
2929 - **FreeBSD**: amd64, arm64
3030 - **Linux**: amd64, arm64
3131 - **macOS / iOS**: amd64, arm64
32-- **NetBSD**: amd64, arm64
3332 - **Windows**: 386*, amd64, arm*, arm64
3433
3534 `*` These architectures only support SyscallN and NewCallback
3635
3736 ## Example
3837
39-The example below only showcases purego use for macOS, NetBSD and Linux. The other platforms require special handling which can
38+The example below only showcases purego use for macOS, and Linux. The other platforms require special handling which can
4039 be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports Windows and FreeBSD.
4140
4241 ```go
@@ -29,14 +29,13 @@ except for float arguments and return values.
29 - **FreeBSD**: amd64, arm6429 - **FreeBSD**: amd64, arm64
30 - **Linux**: amd64, arm6430 - **Linux**: amd64, arm64
31 - **macOS / iOS**: amd64, arm6431 - **macOS / iOS**: amd64, arm64
32-- **NetBSD**: amd64, arm64
33 - **Windows**: 386*, amd64, arm*, arm6432 - **Windows**: 386*, amd64, arm*, arm64
34 33
35 `*` These architectures only support SyscallN and NewCallback34 `*` These architectures only support SyscallN and NewCallback
36 35
37 ## Example36 ## Example
38 37
39-The example below only showcases purego use for macOS, NetBSD and Linux. The other platforms require special handling which can38+The example below only showcases purego use for macOS, and Linux. The other platforms require special handling which can
40 be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports Windows and FreeBSD.39 be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports Windows and FreeBSD.
41 40
42 ```go41 ```go

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