summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2021-07-19 13:30:40 +0200
committerSam Thursfield <sam.thursfield@codethink.co.uk>2021-07-19 13:30:51 +0200
commit1662c6d8e381ccdcc021949ef9566bbd2955befc (patch)
tree4bae5015f74325ad1468fca952a5664fbb6468bf
parent7b1b09b7baaa565c0d9f478e3bf63e5529459b9b (diff)
downloadtracker-wip/sam/test-sqlite.tar.gz
ci: Add sqlite-compatibility jobwip/sam/test-sqlite
-rw-r--r--.gitlab-ci.yml25
-rw-r--r--utils/sqlite/fetch_build_install_sqlite.sh32
2 files changed, 57 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2bfc455a9..4fd19c6da 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -316,6 +316,7 @@ test-alpine@x86_64:
- build-alpine-edge@x86_64
<<: *test
+
coverage-analysis:
extends:
- .fdo.distribution-image@fedora
@@ -400,3 +401,27 @@ pages:
only:
- master
- /^sam\/website.*$/
+
+sqlite-compatibility:
+ stage: weekly-tasks
+ cache: { key: $CI_JOB_NAME, paths: [ ./sqlite-downloads/ ] }
+ script:
+ - |
+ mkdir -p sqlite-downloads
+ for version in $(grep -v '^#' ./sqlite3_versions_tested); do
+ echo "Installing SQLite ${version} into /usr" # This is a CI container so we can break it :)
+ mkdir ./sqlite-build
+ bash ./utils/sqlite/fetch_build_install_sqlite.sh $version ./sqlite-downloads ./sqlite-builds /usr
+ echo "Building Tracker SPARQL against SQLite ${version}"
+ rm -Rf ./build; meson . build -Db_lto=true -Db_coverage=true -Dsystemd_user_services=false -Dtests_tap_protocol=true --prefix /usr
+ ninja -C build
+ echo "Running Tracker SPARQL test suite"
+ (cd build; env LANG=C.UTF-8 LC_ALL=C.UTF-8 dbus-run-session meson test --print-errorlogs ${MESON_TEST_EXTRA_ARGS} )
+ echo "Cleaning up"
+ rm -Rf ./sqlite-build ./build
+ done
+ extends:
+ - .fdo.distribution-image@ubuntu
+ - .tracker.ubuntu:rolling@x86_64
+ needs:
+ - build-ubuntu-container@x86_64
diff --git a/utils/sqlite/fetch_build_install_sqlite.sh b/utils/sqlite/fetch_build_install_sqlite.sh
new file mode 100644
index 000000000..28b6d200e
--- /dev/null
+++ b/utils/sqlite/fetch_build_install_sqlite.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Fetch, build SQLite from source and install it into given prefix.
+#
+# Used for sqlite-compatibility CI job.
+
+set -eu
+
+RELEASE=$1
+DOWNLOAD_PATH=$(readlink -f $2)
+BUILD_PATH=$(readlink -f $3)
+PREFIX=$4
+
+tag=version-${RELEASE}
+filename=sqlite-${RELEASE}.tar.gz
+
+(
+ cd $DOWNLOAD_PATH
+ echo "Download $filename"
+ wget "https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=${tag}" --continue -O $filename
+)
+
+(
+ cd $BUILD_PATH
+ echo "Extract $filename"
+ tar xf $DOWNLOAD_PATH/$filename
+
+ cd sqlite
+ ./configure --prefix=$PREFIX
+ make -j
+ make install
+)