diff --git a/.github/actions/vmactions/template.yml b/.github/actions/vmactions/template.yml new file mode 100644 index 0000000..2009ed1 --- /dev/null +++ b/.github/actions/vmactions/template.yml @@ -0,0 +1,12 @@ +name: VM Actions matrix +description: VM Actions matrix template + +runs: + using: "composite" + steps: + - name: Test + uses: ${VMACTIONS} + with: + usesh: true + copyback: false + run: . ./test.sh \ No newline at end of file diff --git a/.github/workflows/build-test.sh b/.github/workflows/build-test.sh index 710c174..89723da 100755 --- a/.github/workflows/build-test.sh +++ b/.github/workflows/build-test.sh @@ -8,4 +8,8 @@ for p in $(go list ./...); do name="$(basename "$p").test" (cd ${dir}; go test -c ${BUILDFLAGS:-}) [ -f "${dir}/${name}" ] && echo "(cd ${dir}; ./${name} ${TESTFLAGS:-})" >> test.sh -done \ No newline at end of file +done + +if [[ -v VMACTIONS ]]; then + envsubst < .github/actions/vmactions/template.yml > .github/actions/vmactions/action.yml +fi \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 772a409..18d0248 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -83,21 +83,6 @@ jobs: github.event_name == 'push' && matrix.os == 'ubuntu-latest' - test-intel: - runs-on: macos-13 - needs: test - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: { go-version: stable } - - - name: Git LFS pull - uses: ./.github/actions/lfs - - - name: Test - run: go test -v ./... - test-bsd: strategy: matrix: @@ -116,8 +101,6 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: { go-version: stable } - name: Git LFS pull uses: ./.github/actions/lfs @@ -137,6 +120,42 @@ jobs: run: . ./test.sh sync_files: runner-to-vm + test-vm: + strategy: + matrix: + os: + - name: dragonfly + action: 'vmactions/dragonflybsd-vm@v1' + flags: '-test.v -test.short' + - name: illumos + action: 'vmactions/omnios-vm@v1' + flags: '-test.v -test.short' + - name: solaris + action: 'vmactions/solaris-vm@v1' + flags: '-test.v -test.short' + runs-on: ubuntu-latest + needs: test + + steps: + - uses: actions/checkout@v4 + + - name: Git LFS pull + uses: ./.github/actions/lfs + + - name: Build + env: + GOOS: ${{ matrix.os.name }} + TESTFLAGS: ${{ matrix.os.flags }} + VMACTIONS: ${{ matrix.os.action }} + run: .github/workflows/build-test.sh + + - name: Test + uses: ./.github/actions/vmactions + with: + usesh: true + copyback: false + run: . ./test.sh + test-qemu: runs-on: ubuntu-latest needs: test @@ -165,8 +184,8 @@ jobs: - name: Test s390x (big-endian) run: GOARCH=s390x go test -v -short -tags sqlite3_dotlk ./... - test-vm: - runs-on: ubuntu-latest + test-macintel: + runs-on: macos-13 needs: test steps: @@ -177,30 +196,5 @@ jobs: - name: Git LFS pull uses: ./.github/actions/lfs - - name: Build illumos - env: - GOOS: illumos - TESTFLAGS: '-test.v -test.short' - run: .github/workflows/build-test.sh - - - name: Test illumos - uses: vmactions/omnios-vm@v1 - with: - usesh: true - copyback: false - run: . ./test.sh - - - name: Build Solaris - env: - GOOS: solaris - TESTFLAGS: '-test.v -test.short' - BUILDFLAGS: '-tags sqlite3_dotlk' - run: .github/workflows/build-test.sh - - - name: Test Solaris - uses: vmactions/solaris-vm@v1 - with: - usesh: true - copyback: false - run: . ./test.sh - continue-on-error: true \ No newline at end of file + - name: Test + run: go test -v ./... \ No newline at end of file diff --git a/README.md b/README.md index 935b9f2..196b75e 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ It also benefits greatly from [SQLite's](https://sqlite.org/testing.html) and Every commit is [tested](https://github.com/ncruces/go-sqlite3/wiki/Test-matrix) on Linux (amd64/arm64/386/riscv64/ppc64le/s390x), macOS (amd64/arm64), Windows (amd64), FreeBSD (amd64), OpenBSD (amd64), NetBSD (amd64), -illumos (amd64), and Solaris (amd64). +DragonFly BSD (amd64), illumos (amd64), and Solaris (amd64). The Go VFS is tested by running SQLite's [mptest](https://github.com/sqlite/sqlite/blob/master/mptest/mptest.c).