Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: upstream
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
- cron: "0 8 * * 1,3,5" # At 08:00 on Monday, Wednesday, and Friday # https://crontab.guru/#0_8_*_*_1,3,5

jobs:
sqlite-head:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
git clone --depth=1 https://github.com/sqlite/sqlite
git -C sqlite log -n1
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true
- run: bundle exec rake compile -- --with-sqlite-source-dir=${GITHUB_WORKSPACE}/sqlite
- run: bundle exec rake test
17 changes: 14 additions & 3 deletions ext/sqlite3/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,13 @@ def configure_extension

def minimal_recipe
MiniPortile.new(libname, sqlite3_config[:version]).tap do |recipe|
recipe.files = sqlite3_config[:files]
recipe.target = File.join(package_root_dir, "ports")
recipe.patch_files = Dir[File.join(package_root_dir, "patches", "*.patch")].sort
if sqlite_source_dir
recipe.source_directory = sqlite_source_dir
else
recipe.files = sqlite3_config[:files]
recipe.target = File.join(package_root_dir, "ports")
recipe.patch_files = Dir[File.join(package_root_dir, "patches", "*.patch")].sort
end
end
end

Expand Down Expand Up @@ -157,6 +161,10 @@ def cross_build?
enable_config("cross-build")
end

def sqlite_source_dir
arg_config("--with-sqlite-source-dir")
end

def download
minimal_recipe.download
end
Expand All @@ -178,6 +186,9 @@ def print_help
Use libsqlcipher instead of libsqlite3.
(Implies `--enable-system-libraries`.)
--with-sqlite-source-dir=DIRECTORY
(dev only) Build sqlite from the source code in DIRECTORY
--help
Display this message.
Expand Down