-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
135 lines (122 loc) · 6.12 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# sudo: false is faster as it is containerised instead of virtualised.
# https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system
sudo: false
dist: xenial
language: c
compiler: gcc
# $ ./configure --help
#
# Some influential environment variables:
# CC C compiler command
# CFLAGS C compiler flags
# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
# nonstandard directory <lib dir>
# LIBS libraries to pass to the linker, e.g. -l<library>
# CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
# you have headers in a nonstandard directory <include dir>
# CPP C preprocessor
# TCLLIBDIR Where to install tcl plugin
#
# Use these variables to override the choices made by `configure' or to help
# it to find libraries and programs with nonstandard names/locations.
#
# Also: https://docs.travis-ci.com/user/environment-variables/#defining-public-variables-in-travisyml
env:
global:
# https://www.sqlite.org/cli.html#_do_it_yourself_builds_
#
# The following additional compile-time options are recommended in order to
# provide a full-featured command-line shell:
#
# * -DSQLITE_THREADSAFE=0
# * -DSQLITE_ENABLE_EXPLAIN_COMMENTS
# * -DSQLITE_USE_ZLIB
# * -DSQLITE_INTROSPECTION_PRAGMAS
# * -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
# * -DSQLITE_ENABLE_STMTVTAB
# * -DSQLITE_ENABLE_DBPAGE_VTAB
# * -DSQLITE_ENABLE_DBSTAT_VTAB
# * -DSQLITE_ENABLE_OFFSET_SQL_FUNC
# * -DSQLITE_ENABLE_JSON1
# * -DSQLITE_ENABLE_RTREE
# * -DSQLITE_ENABLE_FTS4
# * -DSQLITE_ENABLE_FTS5
#
#
# https://www.sqlite.org/howtocompile.html#compiling_the_command_line_interface
#
# [...] to get command-line editing support:
#
# * -DHAVE_READLINE
# * -lreadline
# * -lncurses
#
# !! We statically link readline (and history) due to readline 6 not being
# !! present on later Ubuntu versions.
# !! See https://utcc.utoronto.ca/~cks/space/blog/linux/Ubuntu1804ReadlineMess
- CFLAGS="-O2 -march=x86-64 -I./ -I/usr/include/tcl -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_USE_ZLIB -DSQLITE_INTROSPECTION_PRAGMAS -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DHAVE_READLINE"
- LDFLAGS="-march=x86-64"
- LIBS="-ldl -lpthread -lz -lm -ltcl -l:libreadline.a -l:libhistory.a -lncurses -ltermcap"
branches:
only:
- master
install:
- "wget -i sqlite-src.url"
- "sha1sum --check sqlite-src.sha1"
- "unzip sqlite-src-*.zip"
- rm sqlite-src-*.zip
- mv sqlite-src-* sqlite-src
before_script:
- "set -o allexport; source ./env; set +o allexport"
- "cd sqlite-src"
- "./configure"
- "make sqlite3.c"
- "cc -o sqlite3.o -c sqlite3.c ${CFLAGS} ${LDFLAGS} ${LIBS}"
# sqldiff
- "cc -o sqldiff.o -c tool/sqldiff.c ${CFLAGS} ${LDFLAGS} ${LIBS}"
- "cc -o sqldiff sqlite3.o sqldiff.o ${CFLAGS} ${LDFLAGS} ${LIBS}"
- "sha1sum sqldiff | tee CHECKSUMS.sha1"
# sqlite3
- "make shell.c"
- "cc -o shell.o -c shell.c ${CFLAGS} ${LDFLAGS} ${LIBS}"
- "cc -o sqlite3 sqlite3.o shell.o ${CFLAGS} ${LDFLAGS} ${LIBS}"
- "sha1sum sqlite3 | tee -a CHECKSUMS.sha1"
# sqlite3_analyzer
- "make sqlite3_analyzer.c"
- "cc -o sqlite3_analyzer -c sqlite3_analyzer.c ${CFLAGS} ${LDFLAGS} ${LIBS}"
- "sha1sum sqlite3_analyzer | tee -a CHECKSUMS.sha1"
# zip the binaries
- "mkdir sqlite-tools-linux-x64-${S64_VERSION}"
- "echo These are UNOFFICIAL SQLite precompiled binaries for linux x64, see https://github.com/jgraeve/sqlite3-x64 for details. > sqlite-tools-linux-x64-${S64_VERSION}/NOTICE"
- "cp sqldiff sqlite3 sqlite3_analyzer CHECKSUMS.sha1 sqlite-tools-linux-x64-${S64_VERSION}/"
- "zip -r sqlite-tools-linux-x64-${S64_VERSION}.zip sqlite-tools-linux-x64-${S64_VERSION}/ -9 -v"
- "sha1sum sqlite-tools-linux-x64-${S64_VERSION}.zip | tee sqlite-tools-linux-x64-${S64_VERSION}.zip.sha1"
script:
- "echo Skipping 'script' stage in Travis CI..."
before_deploy:
# Set up git user name and tag this commit
- git config --local user.name "Johan De Graeve"
- git config --local user.email "[email protected]"
# $ git help check-ref-format
#
# 2. They must contain at least one /. This enforces the presence of a
# category like heads/, tags/ etc. but the actual names are not restricted.
# If the --allow-onelevel option is used, this rule is waived.
# 4. They cannot have ASCII control characters (i.e. bytes whose values are
# lower than \040, or \177 DEL), space, tilde ~, caret ^, or colon : anywhere.
# 5. They cannot have question-mark ?, asterisk *, or open bracket [ anywhere.
- git tag "${S64_VERSION}--$(date +'%Y-%m-%dT%H.%M.%SZ' --utc)"
deploy:
provider: releases
api_key:
secure: h95Ahky8ZuZBGRhL70Mk4Iza94ewGbwayQJPXd8D7X7nvzvOno/WYUfNy2CcXkfaHBOU54R5d2rcoU6q3PjPTgGn+8oUL0vu7QLqQgFtqLTbBc00AggC4mo/zDgEGg25vlHp2QaccW0kqcFrO7Vw8//nUHMZ/+P/nvN2w5FnuMkQe+4S6JNat9bCXAo4CM6gKh+rzxXc3nmoR9DCHvR6JLUTFTsfDk6Lyk6ZwnRKbU/HwQ9Lm3JITTd075lb3chnPx3vUVEp4uFu/er68QgNdwJs2PJrz1UidcgJOZzk52DP/lc3d8dT0ElqxPHG6/6MbUYjwWmbSppTcKheXvi+tGYaJ+oshEfbQFnVS4YCrR1PV3i6f1XK2LT0WkSgWuX7eTGdzwbgLD5iXF4WpTV/VsdCJAf80e0PnXWG3SGrckR1uAUs+LVlgZyJxjAXccrDf7ivKroOF1Im1rXoa8Y/+XVxLg57yR7JMqSLnmqLHip7KAY3ciU77wb7Rv4GQdsMJjPZL1cIQ6aJq+ElEIXJ5ANFzqCWlCCl4KI9pV2mQJ6So4El9DZGTqP8Ye0vZFxiyW1DqgPkVl2AAVzIdxnwg9r+erXb6bkVk26WLiYY3Zi9et9YbvBiIE9acUakIL0qfBlUdxbXyuOuXvkFNEGhNpRvfAKr8gFOI+N5r/lKK+k=
file:
- "/home/travis/build/jgraeve/sqlite3-x64/sqlite-src/sqldiff"
- "/home/travis/build/jgraeve/sqlite3-x64/sqlite-src/sqlite3"
- "/home/travis/build/jgraeve/sqlite3-x64/sqlite-src/sqlite3_analyzer"
- "/home/travis/build/jgraeve/sqlite3-x64/sqlite-src/CHECKSUMS.sha1"
- "/home/travis/build/jgraeve/sqlite3-x64/sqlite-src/sqlite-tools-linux-x64-${S64_VERSION}.zip"
- "/home/travis/build/jgraeve/sqlite3-x64/sqlite-src/sqlite-tools-linux-x64-${S64_VERSION}.zip.sha1"
skip_cleanup: true
on:
repo: "jgraeve/sqlite3-x64"