aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraa0121 <raa0121@gmail.com>2020-08-25 13:56:34 +0900
committerGitHub <noreply@github.com>2020-08-25 13:56:34 +0900
commit09fcd35eaa29f665605ce429fee5e4bedeeef47c (patch)
treecf436e48e640173c325ef5c3c35e773bac900503
parentUpdate amalgamation code (#842) (diff)
downloadgolite-09fcd35eaa29f665605ce429fee5e4bedeeef47c.tar.gz
golite-09fcd35eaa29f665605ce429fee5e4bedeeef47c.tar.xz
Add Github Actions yaml and set LDFLAGS on windows (#843)
and remove .travis.yml
-rw-r--r--.github/workflows/go.yaml131
-rw-r--r--.travis.yml36
-rw-r--r--sqlite3_libsqlite3.go1
3 files changed, 132 insertions, 36 deletions
diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml
new file mode 100644
index 0000000..936b216
--- /dev/null
+++ b/.github/workflows/go.yaml
@@ -0,0 +1,131 @@
+name: Go
+
+on: [push, pull_request]
+
+jobs:
+
+ test:
+ name: Test
+ runs-on: ${{ matrix.os }}
+ defaults:
+ run:
+ shell: bash
+
+ strategy:
+ matrix:
+ os: [ ubuntu-latest, macos-latest ]
+ go: [ '1.11.13', '1.12.17', '1.13.15', '1.14.7', '1.15' ]
+ fail-fast: false
+ steps:
+ - if: startsWith(matrix.os, 'macos')
+ run: brew update
+
+ - uses: actions/setup-go@v2
+ with:
+ go-version: ${{ matrix.go }}
+
+ - name: Get Build Tools
+ run: |
+ go get github.com/mattn/goveralls
+ go get golang.org/x/tools/cmd/cover
+
+ - name: Add $GOPATH/bin to $PATH
+ run: |
+ echo "::add-path::$(go env GOPATH)/bin"
+
+ - uses: actions/checkout@v2
+
+ - name: Setup goveralls
+ run: goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx -parallel
+
+ - name: Test1
+ run: go test -race -v . -tags ""
+
+ - name: Test2
+ run: go test -race -v . -tags "libsqlite3"
+
+ - name: Test3
+ run: go test -race -v . -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable sqlite_unlock_notify"
+
+ - name: Test4
+ run: go test -race -v . -tags "sqlite_vacuum_full"
+
+ test-windows:
+ name: Test for Windows
+ runs-on: windows-latest
+ defaults:
+ run:
+ shell: bash
+
+ strategy:
+ matrix:
+ go: [ '1.11.13', '1.12.17', '1.13.15', '1.14.7', '1.15' ]
+ fail-fast: false
+ steps:
+ - uses: msys2/setup-msys2@v2
+ with:
+ update: true
+ install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-sqlite3
+ msystem: MINGW64
+ path-type: inherit
+
+ - uses: actions/setup-go@v2
+ with:
+ go-version: ${{ matrix.go }}
+
+ - name: Get Build Tools
+ run: |
+ go get github.com/mattn/goveralls
+ go get golang.org/x/tools/cmd/cover
+ shell: msys2 {0}
+
+ - name: Add $GOPATH/bin to $PATH
+ run: |
+ echo "::add-path::$(go env GOPATH)/bin"
+ shell: msys2 {0}
+
+ - uses: actions/checkout@v2
+
+ - name: Setup goveralls
+ run: goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx -parallel
+ shell: msys2 {0}
+
+ - name: Test1
+ run: go test -race -v . -tags ""
+ shell: msys2 {0}
+
+ - name: Test2
+ run: go test -race -v . -tags "libsqlite3"
+ shell: msys2 {0}
+
+ - name: Test3
+ run: |
+ echo 'skip this test'
+ echo go test -race -v . -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable sqlite_unlock_notify"
+ shell: msys2 {0}
+
+ - name: Test4
+ run: go test -race -v . -tags "sqlite_vacuum_full"
+ shell: msys2 {0}
+
+ finish:
+ needs: [test, test-windows]
+ name: Test Finished
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/setup-go@v2
+ with:
+ go-version: 1.x
+
+ - name: Get Build Tools
+ run: |
+ go get github.com/mattn/goveralls
+ go get golang.org/x/tools/cmd/cover
+ - name: Add $GOPATH/bin to $PATH
+ run: |
+ echo "::add-path::$(go env GOPATH)/bin"
+ - name: Send coverage
+ env:
+ COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx -parallel-finish
+# based on: github.com/koron-go/_skeleton/.github/workflows/go.yml
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 126b227..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-language: go
-
-go_import_path: github.com/mattn/go-sqlite3
-
-os:
- - linux
- - osx
-
-addons:
- apt:
- update: true
-
-go:
- - 1.14.x
- - tip
- - 1.13.x
- - 1.12.x
- - 1.11.x
-
-before_install:
- - |
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
- brew update
- fi
- - go get github.com/mattn/goveralls
- - go get golang.org/x/tools/cmd/cover
-
-script:
- - $HOME/gopath/bin/goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx -parallel
- - go test -race -v . -tags ""
- - go test -race -v . -tags "libsqlite3"
- - go test -race -v . -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable sqlite_unlock_notify"
- - go test -race -v . -tags "sqlite_vacuum_full"
-
-notifications:
- webhooks: https://coveralls.io/webhook?repo_token=3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx
diff --git a/sqlite3_libsqlite3.go b/sqlite3_libsqlite3.go
index bd6de0b..e428fe6 100644
--- a/sqlite3_libsqlite3.go
+++ b/sqlite3_libsqlite3.go
@@ -14,5 +14,6 @@ package sqlite3
#cgo darwin CFLAGS: -I/usr/local/opt/sqlite/include
#cgo openbsd LDFLAGS: -lsqlite3
#cgo solaris LDFLAGS: -lsqlite3
+#cgo windows LDFLAGS: -lsqlite3
*/
import "C"