BSD tests.

This commit is contained in:
Nuno Cruces
2024-02-02 19:10:56 +00:00
parent bb0c77c6fa
commit da0e98f17e
4 changed files with 22 additions and 4 deletions

10
.github/workflows/bsd.sh vendored Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
echo 'set -euo pipefail' > test.sh
for p in $(go list ./...); do
dir=".${p#github.com/ncruces/go-sqlite3}"
name="$(basename "$p").test"
(cd ${dir}; GOOS=freebsd go test -c)
[ -f "${dir}/${name}" ] && echo "(cd ${dir}; ./${name} -test.v)" >> test.sh
done

View File

@@ -12,13 +12,20 @@ jobs:
with:
lfs: 'true'
- name: Set up
uses: actions/setup-go@v5
with:
go-version: stable
- name: Build
run: .github/workflows/bsd.sh
- name: Test
uses: cross-platform-actions/action@v0.22.0
with:
operating_system: freebsd
version: '13.2'
memory: 8G
shell: bash
sync_files: runner-to-vm
run: |
sudo pkg install -y go121
go121 test -v ./...
run: source test.sh

View File

@@ -53,4 +53,4 @@ jobs:
go-version: stable
- name: Test
run: go test -v ./...
run: go test -v ./...

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
echo android ; GOOS=android GOARCH=amd64 go build .
echo darwin ; GOOS=darwin GOARCH=amd64 go build .