mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-11 21:49:13 +00:00
Remove LFS test files. (#210)
This commit is contained in:
23
.github/actions/lfs/action.yml
vendored
23
.github/actions/lfs/action.yml
vendored
@@ -1,23 +0,0 @@
|
||||
name: Git LFS pull
|
||||
description: Cached Git LFS pull.
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Create LFS file list
|
||||
shell: bash
|
||||
run: git lfs ls-files --long | cut -d ' ' -f1 | sort > .lfs-assets-id
|
||||
|
||||
- name: Restore LFS cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .git/lfs/objects
|
||||
key: lfs-${{ hashFiles('.lfs-assets-id') }}
|
||||
restore-keys: lfs-
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: Git LFS pull
|
||||
shell: bash
|
||||
run: |
|
||||
git lfs pull
|
||||
git lfs prune
|
||||
15
.github/workflows/test.yml
vendored
15
.github/workflows/test.yml
vendored
@@ -29,9 +29,6 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with: { go-version: stable }
|
||||
|
||||
- name: Git LFS pull
|
||||
uses: ./.github/actions/lfs
|
||||
|
||||
- name: Format
|
||||
run: gofmt -s -w . && git diff --exit-code
|
||||
if: matrix.os != 'windows-latest'
|
||||
@@ -104,9 +101,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Git LFS pull
|
||||
uses: ./.github/actions/lfs
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
GOOS: ${{ matrix.os.name }}
|
||||
@@ -142,9 +136,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Git LFS pull
|
||||
uses: ./.github/actions/lfs
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
GOOS: ${{ matrix.os.name }}
|
||||
@@ -170,9 +161,6 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with: { go-version: stable }
|
||||
|
||||
- name: Git LFS pull
|
||||
uses: ./.github/actions/lfs
|
||||
|
||||
- name: Test 386 (32-bit)
|
||||
run: GOARCH=386 go test -v -short ./...
|
||||
|
||||
@@ -197,8 +185,5 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with: { go-version: stable }
|
||||
|
||||
- name: Git LFS pull
|
||||
uses: ./.github/actions/lfs
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
|
||||
@@ -32,7 +32,6 @@ curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/ext/misc/uint.c"
|
||||
cd ~-
|
||||
|
||||
cd ../vfs/tests/mptest/testdata/
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/mptest.c"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/config01.test"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/config02.test"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/crash01.test"
|
||||
@@ -40,6 +39,10 @@ curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/crash02.su
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/multiwrite01.test"
|
||||
cd ~-
|
||||
|
||||
cd ../vfs/tests/speedtest1/testdata/
|
||||
cd ../vfs/tests/mptest/wasm/
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/mptest.c"
|
||||
cd ~-
|
||||
|
||||
cd ../vfs/tests/speedtest1/wasm/
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/test/speedtest1.c"
|
||||
cd ~-
|
||||
@@ -2,7 +2,6 @@ package mptest
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/bzip2"
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"embed"
|
||||
@@ -29,10 +28,7 @@ import (
|
||||
_ "github.com/ncruces/go-sqlite3/vfs/xts"
|
||||
)
|
||||
|
||||
//go:embed testdata/mptest.wasm.bz2
|
||||
var compressed string
|
||||
|
||||
//go:embed testdata/*.*test
|
||||
//go:embed testdata/*
|
||||
var scripts embed.FS
|
||||
|
||||
const qemuCI = runtime.GOARCH != "386" && runtime.GOARCH != "amd64" && runtime.GOARCH != "arm64"
|
||||
@@ -57,10 +53,7 @@ func TestMain(m *testing.M) {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if !strings.HasPrefix(compressed, "BZh") {
|
||||
panic("Please use Git LFS to clone this repo: https://git-lfs.com/")
|
||||
}
|
||||
binary, err := io.ReadAll(bzip2.NewReader(strings.NewReader(compressed)))
|
||||
binary, err := os.ReadFile("wasm/mptest.wasm")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
3
vfs/tests/mptest/testdata/.gitattributes
vendored
3
vfs/tests/mptest/testdata/.gitattributes
vendored
@@ -1,2 +1 @@
|
||||
mptest.wasm.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.*test -crlf
|
||||
* -crlf
|
||||
3
vfs/tests/mptest/testdata/mptest.wasm.bz2
vendored
3
vfs/tests/mptest/testdata/mptest.wasm.bz2
vendored
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e20f37d94223a88d8f94b3a20177c0fbf53392df2f9c59a28cc7f1f2b5d3de81
|
||||
size 477370
|
||||
@@ -31,4 +31,3 @@ WASI_SDK="$ROOT/tools/wasi-sdk/bin"
|
||||
--enable-bulk-memory --enable-reference-types \
|
||||
--enable-nontrapping-float-to-int --enable-sign-ext
|
||||
mv mptest.tmp mptest.wasm
|
||||
bzip2 -9f mptest.wasm
|
||||
0
vfs/tests/mptest/wasm/go.mod
Normal file
0
vfs/tests/mptest/wasm/go.mod
Normal file
BIN
vfs/tests/mptest/wasm/mptest.wasm
Normal file
BIN
vfs/tests/mptest/wasm/mptest.wasm
Normal file
Binary file not shown.
@@ -2,7 +2,6 @@ package speedtest1
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/bzip2"
|
||||
"context"
|
||||
"crypto/rand"
|
||||
_ "embed"
|
||||
@@ -27,9 +26,6 @@ import (
|
||||
_ "github.com/ncruces/go-sqlite3/vfs/xts"
|
||||
)
|
||||
|
||||
//go:embed testdata/speedtest1.wasm.bz2
|
||||
var compressed string
|
||||
|
||||
var (
|
||||
rt wazero.Runtime
|
||||
module wazero.CompiledModule
|
||||
@@ -52,10 +48,7 @@ func TestMain(m *testing.M) {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if !strings.HasPrefix(compressed, "BZh") {
|
||||
panic("Please use Git LFS to clone this repo: https://git-lfs.com/")
|
||||
}
|
||||
binary, err := io.ReadAll(bzip2.NewReader(strings.NewReader(compressed)))
|
||||
binary, err := os.ReadFile("wasm/speedtest1.wasm")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
1
vfs/tests/speedtest1/testdata/.gitattributes
vendored
1
vfs/tests/speedtest1/testdata/.gitattributes
vendored
@@ -1 +0,0 @@
|
||||
speedtest1.wasm.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eebe395695c739a24e9cded13553b97d232eb268a5bc36f10f27cc13945e78cd
|
||||
size 491003
|
||||
@@ -26,4 +26,3 @@ WASI_SDK="$ROOT/tools/wasi-sdk/bin"
|
||||
--enable-bulk-memory --enable-reference-types \
|
||||
--enable-nontrapping-float-to-int --enable-sign-ext
|
||||
mv speedtest1.tmp speedtest1.wasm
|
||||
bzip2 -9f speedtest1.wasm
|
||||
0
vfs/tests/speedtest1/wasm/go.mod
Normal file
0
vfs/tests/speedtest1/wasm/go.mod
Normal file
BIN
vfs/tests/speedtest1/wasm/speedtest1.wasm
Normal file
BIN
vfs/tests/speedtest1/wasm/speedtest1.wasm
Normal file
Binary file not shown.
Reference in New Issue
Block a user