Skip to content

Commit 1c58744

Browse files
committed
Test Solaris.
1 parent f0ce3e5 commit 1c58744

File tree

4 files changed

+47
-38
lines changed

4 files changed

+47
-38
lines changed

.github/workflows/bsd.sh renamed to .github/workflows/build-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ echo 'set -eu' > test.sh
66
for p in $(go list ./...); do
77
dir=".${p#github.com/ncruces/go-sqlite3}"
88
name="$(basename "$p").test"
9-
(cd ${dir}; GOOS=freebsd go test -c)
10-
[ -f "${dir}/${name}" ] && echo "(cd ${dir}; ./${name} -test.v)" >> test.sh
9+
(cd ${dir}; go test -c)
10+
[ -f "${dir}/${name}" ] && echo "(cd ${dir}; ./${name} ${TESTFLAGS})" >> test.sh
1111
done

.github/workflows/illumos.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 43 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ jobs:
7878
with: { go-version: stable }
7979

8080
- name: Build
81-
run: .github/workflows/bsd.sh
81+
env:
82+
GOOS: freebsd
83+
TESTFLAGS: '-test.v'
84+
run: .github/workflows/build-test.sh
8285

8386
- name: Test
8487
uses: cross-platform-actions/[email protected]
@@ -88,28 +91,7 @@ jobs:
8891
shell: bash
8992
run: . ./test.sh
9093
sync_files: runner-to-vm
91-
92-
test-illumos:
93-
runs-on: ubuntu-latest
94-
needs: test
95-
96-
steps:
97-
- uses: actions/checkout@v4
98-
with: { lfs: 'true' }
99-
100-
- uses: actions/setup-go@v5
101-
with: { go-version: stable }
102-
103-
- name: Build
104-
run: .github/workflows/illumos.sh
105-
106-
- name: Test
107-
uses: vmactions/omnios-vm@v1
108-
with:
109-
usesh: true
110-
copyback: false
111-
run: . ./test.sh
112-
94+
11395
test-m1:
11496
runs-on: macos-14
11597
needs: test
@@ -147,4 +129,41 @@ jobs:
147129
run: GOARCH=riscv64 go test -v -short ./...
148130

149131
- name: Test s390x (like z/OS)
150-
run: GOARCH=s390x go test -v -short -tags sqlite3_flock ./...
132+
run: GOARCH=s390x go test -v -short -tags sqlite3_flock ./...
133+
134+
test-vm:
135+
runs-on: ubuntu-latest
136+
needs: test
137+
138+
steps:
139+
- uses: actions/checkout@v4
140+
with: { lfs: 'true' }
141+
142+
- uses: actions/setup-go@v5
143+
with: { go-version: stable }
144+
145+
- name: Build illumos
146+
env:
147+
GOOS: illumos
148+
TESTFLAGS: '-test.v -test.short'
149+
run: .github/workflows/build-test.sh
150+
151+
- name: Test illumos
152+
uses: vmactions/omnios-vm@v1
153+
with:
154+
usesh: true
155+
copyback: false
156+
run: . ./test.sh
157+
158+
- name: Build Solaris
159+
env:
160+
GOOS: solaris
161+
TESTFLAGS: '-test.v -test.short'
162+
run: .github/workflows/build-test.sh
163+
164+
- name: Test Solaris
165+
uses: vmactions/solaris-vm@v1
166+
with:
167+
usesh: true
168+
copyback: false
169+
run: . ./test.sh

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ It also benefits greatly from [SQLite's](https://sqlite.org/testing.html) and
8888
[wazero's](https://tetrate.io/blog/introducing-wazero-from-tetrate/#:~:text=Rock%2Dsolid%20test%20approach) thorough testing.
8989

9090
Every commit is [tested](.github/workflows/test.yml) on
91-
Linux (amd64/arm64/386/riscv64), macOS (amd64/arm64), Windows, FreeBSD and illumos.
91+
Linux (amd64/arm64/386/riscv64/s390x), macOS (amd64/arm64),
92+
Windows, FreeBSD, illumos, and Solaris.
9293
The Go VFS is tested by running SQLite's
9394
[mptest](https://github.com/sqlite/sqlite/blob/master/mptest/mptest.c).
9495

0 commit comments

Comments
 (0)