From 56ffb7a49bb14a6dc6c912872bbc3e9fa6691e64 Mon Sep 17 00:00:00 2001 From: Gert-Jan Timmer Date: Wed, 23 May 2018 19:20:57 +0200 Subject: [PATCH 1/5] Update Travis CI Add: OSX Add: Windows Cross-Compile Add: Golang: 1.10.x Exclusions: - Golang: 1.7 from OSX - Golang: Master does not cause build failure - Tests for Windows Cross-Platform --- .travis.yml | 148 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 138 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 46e70cb..cc7b207 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,147 @@ language: go -sudo: required -dist: trusty + +os: + - linux + - osx + +addons: + apt: + update: true + env: - - GOTAGS= - - GOTAGS=libsqlite3 - - GOTAGS=trace - - GOTAGS=vtable + matrix: + - GOTAGS= + - GOTAGS=libsqlite3 + - GOTAGS=trace + - GOTAGS=vtable + go: - 1.7.x - 1.8.x - 1.9.x + - 1.10.x - master + +matrix: + allow_failures: + - go: master + exclude: + - os: osx + go: 1.7.x + include: + - os: linux + go: 1.7.x + env: GOTAGS= GOOS=windows GOARCH=386 + - os: linux + go: 1.7.x + env: GOTAGS= GOOS=windows GOARCH=amd64 + - os: linux + go: 1.7.x + env: GOTAGS=libsqlite3 GOOS=windows GOARCH=386 + - os: linux + go: 1.7.x + env: GOTAGS=libsqlite3 GOOS=windows GOARCH=amd64 + - os: linux + go: 1.7.x + env: GOTAGS=trace GOOS=windows GOARCH=386 + - os: linux + go: 1.7.x + env: GOTAGS=trace GOOS=windows GOARCH=amd64 + - os: linux + go: 1.7.x + env: GOTAGS=vtable GOOS=windows GOARCH=386 + - os: linux + go: 1.7.x + env: GOTAGS=vtable GOOS=windows GOARCH=amd64 + - os: linux + go: 1.8.x + env: GOTAGS= GOOS=windows GOARCH=386 + - os: linux + go: 1.8.x + env: GOTAGS= GOOS=windows GOARCH=amd64 + - os: linux + go: 1.8.x + env: GOTAGS=libsqlite3 GOOS=windows GOARCH=386 + - os: linux + go: 1.8.x + env: GOTAGS=libsqlite3 GOOS=windows GOARCH=amd64 + - os: linux + go: 1.8.x + env: GOTAGS=trace GOOS=windows GOARCH=386 + - os: linux + go: 1.8.x + env: GOTAGS=trace GOOS=windows GOARCH=amd64 + - os: linux + go: 1.8.x + env: GOTAGS=vtable GOOS=windows GOARCH=386 + - os: linux + go: 1.8.x + env: GOTAGS=vtable GOOS=windows GOARCH=amd64 + - os: linux + go: 1.9.x + env: GOTAGS= GOOS=windows GOARCH=386 + - os: linux + go: 1.9.x + env: GOTAGS= GOOS=windows GOARCH=amd64 + - os: linux + go: 1.9.x + env: GOTAGS=libsqlite3 GOOS=windows GOARCH=386 + - os: linux + go: 1.9.x + env: GOTAGS=libsqlite3 GOOS=windows GOARCH=amd64 + - os: linux + go: 1.9.x + env: GOTAGS=trace GOOS=windows GOARCH=386 + - os: linux + go: 1.9.x + env: GOTAGS=trace GOOS=windows GOARCH=amd64 + - os: linux + go: 1.9.x + env: GOTAGS=vtable GOOS=windows GOARCH=386 + - os: linux + go: 1.9.x + env: GOTAGS=vtable GOOS=windows GOARCH=amd64 + - os: linux + go: 1.10.x + env: GOTAGS= GOOS=windows GOARCH=386 + - os: linux + go: 1.10.x + env: GOTAGS= GOOS=windows GOARCH=amd64 + - os: linux + go: 1.10.x + env: GOTAGS=libsqlite3 GOOS=windows GOARCH=386 + - os: linux + go: 1.10.x + env: GOTAGS=libsqlite3 GOOS=windows GOARCH=amd64 + - os: linux + go: 1.10.x + env: GOTAGS=trace GOOS=windows GOARCH=386 + - os: linux + go: 1.10.x + env: GOTAGS=trace GOOS=windows GOARCH=amd64 + - os: linux + go: 1.10.x + env: GOTAGS=vtable GOOS=windows GOARCH=386 + - os: linux + go: 1.10.x + env: GOTAGS=vtable GOOS=windows GOARCH=amd64 + + before_install: - - go get github.com/mattn/goveralls - - go get golang.org/x/tools/cmd/cover + - | + if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + brew update + fi + - | + if [[ "${GOOS}" != "windows" ]]; then + go get github.com/mattn/goveralls + go get golang.org/x/tools/cmd/cover + fi + script: - - $HOME/gopath/bin/goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx - - go test -race -v . -tags "$GOTAGS" + - GOOS=$(go env GOOS) GOARCH=$(go env GOARCH) go build -v -tags "${GOTAGS}" . + - | + if [[ "${GOOS}" != "windows" ]]; then + $HOME/gopath/bin/goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx + go test -race -v . -tags "${GOTAGS}" + fi \ No newline at end of file From 79bf9ba26bb0ee785eee258fa62c3c1ef9eb9068 Mon Sep 17 00:00:00 2001 From: Gert-Jan Timmer Date: Wed, 23 May 2018 22:43:42 +0200 Subject: [PATCH 2/5] ADD: SQLITE_ENABLE_UPDATE_DELETE_LIMIT Fixes #213 --- sqlite3.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sqlite3.go b/sqlite3.go index 2edeb2f..a8014cc 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -14,6 +14,7 @@ package sqlite3 #cgo CFLAGS: -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4_UNICODE61 #cgo CFLAGS: -DSQLITE_TRACE_SIZE_LIMIT=15 #cgo CFLAGS: -DSQLITE_DISABLE_INTRINSIC +#cgo CFLAGS: -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT #cgo CFLAGS: -Wno-deprecated-declarations #ifndef USE_LIBSQLITE3 #include From 46cd5985022f93f03ebb57942684cb2bd4a70741 Mon Sep 17 00:00:00 2001 From: Gert-Jan Timmer Date: Wed, 23 May 2018 23:05:26 +0200 Subject: [PATCH 3/5] ADD: SQLITE_DEFAULT_WAL_SYNCHRONOUS --- sqlite3.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sqlite3.go b/sqlite3.go index 2edeb2f..9b6be65 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -14,6 +14,7 @@ package sqlite3 #cgo CFLAGS: -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4_UNICODE61 #cgo CFLAGS: -DSQLITE_TRACE_SIZE_LIMIT=15 #cgo CFLAGS: -DSQLITE_DISABLE_INTRINSIC +#cgo CFLAGS: -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 #cgo CFLAGS: -Wno-deprecated-declarations #ifndef USE_LIBSQLITE3 #include From 347aa38e98f9d3eb9966f596d77290d7308fe79f Mon Sep 17 00:00:00 2001 From: Gert-Jan Timmer Date: Wed, 23 May 2018 23:10:05 +0200 Subject: [PATCH 4/5] ADD: SQLITE_OMIT_DEPRECATED --- sqlite3.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sqlite3.go b/sqlite3.go index 2edeb2f..312ded9 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -13,6 +13,7 @@ package sqlite3 #cgo linux,!android CFLAGS: -DHAVE_PREAD64=1 -DHAVE_PWRITE64=1 #cgo CFLAGS: -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4_UNICODE61 #cgo CFLAGS: -DSQLITE_TRACE_SIZE_LIMIT=15 +#cgo CFLAGS: -DSQLITE_OMIT_DEPRECATED #cgo CFLAGS: -DSQLITE_DISABLE_INTRINSIC #cgo CFLAGS: -Wno-deprecated-declarations #ifndef USE_LIBSQLITE3 From 6510a04266eeb1682e4555d7952d691f29a713b6 Mon Sep 17 00:00:00 2001 From: Gert-Jan Timmer Date: Thu, 24 May 2018 09:25:16 +0200 Subject: [PATCH 5/5] Add: EOL --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cc7b207..ac1d7e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -144,4 +144,4 @@ script: if [[ "${GOOS}" != "windows" ]]; then $HOME/gopath/bin/goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx go test -race -v . -tags "${GOTAGS}" - fi \ No newline at end of file + fi