File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,16 +38,31 @@ jobs:
3838 else
3939 TAG="version-${VERSION}"
4040 fi
41- for attempt in 1 2 3 4 5; do
42- if wget -O sqlite.tar.gz "https://sqlite.org/src/tarball/sqlite.tar.gz?r=${TAG}"; then
43- break
44- fi
45- if [ "$attempt" -eq 5 ]; then
46- exit 1
47- fi
48- sleep $(( attempt * 10 ))
41+ SQLITE_SOURCE="https://sqlite.org/src/tarball/sqlite.tar.gz?r=${TAG}"
42+ SQLITE_MIRROR="https://github.com/sqlite/sqlite/archive/refs/tags/${TAG}.tar.gz"
43+ DOWNLOADED=0
44+ for url in "$SQLITE_SOURCE" "$SQLITE_MIRROR"; do
45+ for attempt in 1 2 3 4 5; do
46+ if wget -O sqlite.tar.gz "$url"; then
47+ DOWNLOADED=1
48+ break 2
49+ fi
50+ if [ "$attempt" -lt 5 ]; then
51+ sleep $(( attempt * 10 ))
52+ fi
53+ done
4954 done
55+ if [ "$DOWNLOADED" -ne 1 ]; then
56+ exit 1
57+ fi
5058 tar xzf sqlite.tar.gz
59+ if [ ! -d sqlite ]; then
60+ SQLITE_DIR=$(find . -maxdepth 1 -type d -name 'sqlite-*' | head -n 1)
61+ if [ -z "$SQLITE_DIR" ]; then
62+ exit 1
63+ fi
64+ mv "$SQLITE_DIR" sqlite
65+ fi
5166 cd sqlite
5267 ./configure --prefix=/usr/local CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_USE_URI -DSQLITE_ENABLE_JSON1" LDFLAGS="-lm"
5368 make -j$(nproc)
You can’t perform that action at this time.
0 commit comments