Skip to content

Commit c1eb06d

Browse files
authored
Merge pull request #361 from sparklemotion/flavorjones-allow-experimental-builds
ci: build against edge sqlite
2 parents 72836be + 1c60661 commit c1eb06d

File tree

2 files changed

+37
-3
lines changed

2 files changed

+37
-3
lines changed

.github/workflows/upstream.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: upstream
2+
concurrency:
3+
group: "${{github.workflow}}-${{github.ref}}"
4+
cancel-in-progress: true
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: "0 8 * * 1,3,5" # At 08:00 on Monday, Wednesday, and Friday # https://crontab.guru/#0_8_*_*_1,3,5
9+
10+
jobs:
11+
sqlite-head:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- run: |
16+
git clone --depth=1 https://github.com/sqlite/sqlite
17+
git -C sqlite log -n1
18+
- uses: ruby/setup-ruby@v1
19+
with:
20+
ruby-version: "3.1"
21+
bundler-cache: true
22+
- run: bundle exec rake compile -- --with-sqlite-source-dir=${GITHUB_WORKSPACE}/sqlite
23+
- run: bundle exec rake test

ext/sqlite3/extconf.rb

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,13 @@ def configure_extension
126126

127127
def minimal_recipe
128128
MiniPortile.new(libname, sqlite3_config[:version]).tap do |recipe|
129-
recipe.files = sqlite3_config[:files]
130-
recipe.target = File.join(package_root_dir, "ports")
131-
recipe.patch_files = Dir[File.join(package_root_dir, "patches", "*.patch")].sort
129+
if sqlite_source_dir
130+
recipe.source_directory = sqlite_source_dir
131+
else
132+
recipe.files = sqlite3_config[:files]
133+
recipe.target = File.join(package_root_dir, "ports")
134+
recipe.patch_files = Dir[File.join(package_root_dir, "patches", "*.patch")].sort
135+
end
132136
end
133137
end
134138

@@ -157,6 +161,10 @@ def cross_build?
157161
enable_config("cross-build")
158162
end
159163

164+
def sqlite_source_dir
165+
arg_config("--with-sqlite-source-dir")
166+
end
167+
160168
def download
161169
minimal_recipe.download
162170
end
@@ -178,6 +186,9 @@ def print_help
178186
Use libsqlcipher instead of libsqlite3.
179187
(Implies `--enable-system-libraries`.)
180188
189+
--with-sqlite-source-dir=DIRECTORY
190+
(dev only) Build sqlite from the source code in DIRECTORY
191+
181192
--help
182193
Display this message.
183194

0 commit comments

Comments
 (0)