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
52 changes: 52 additions & 0 deletions .github/workflows/bundle-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Quicklisp bundle build & regression test

# Runs when anything that affects the v3 bundle changes: the bundle
# machinery itself, the Makefile (which holds BUNDLEDIST), or the Lisp
# source that gets compiled into the bundle binary.
on:
pull_request:
paths:
- 'Makefile'
- 'bundle/**'
- 'src/**'
- '.github/workflows/bundle-ci.yml'
push:
branches: [main]
paths:
- 'Makefile'
- 'bundle/**'
- 'src/**'
- '.github/workflows/bundle-ci.yml'

jobs:
bundle:
name: Build and test from Quicklisp bundle
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Install postgresql-common
run: sudo apt-get install -y postgresql-common

- name: Install pgapt repository
run: sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y

- name: Install build dependencies
run: sudo apt-get build-dep -y .

- name: Build Quicklisp bundle
# Downloads the pinned Quicklisp dist (BUNDLEDIST in Makefile),
# creates the self-contained bundle tarball, extracts it, compiles
# pgloader from the bundled sources, and smoke-tests with --version.
run: make bundle

- name: Run regression suite against bundle binary
# pg_virtualenv spins up a throwaway PostgreSQL cluster whose
# superuser is the current OS user (not 'postgres'). Pass that
# name via PGSUPERUSER so the test Makefile's createdb/psql calls
# use the right role — mirroring what debian/tests/testsuite does.
run: |
pg_virtualenv -i'-Atrust' \
env PGSUPERUSER="$(id -un)" make test-bundle
11 changes: 9 additions & 2 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@ name: Smoke test — published JAR
# Runs whenever the v4-dev pre-release is updated (i.e. after every green CI
# push that publishes a new JAR), and can also be triggered manually.
on:
release:
types: [prereleased]
# Fires automatically after the integration-tests workflow publishes a new
# JAR to the v4-dev pre-release on main. Using workflow_run rather than
# release: prereleased because updating assets on an existing pre-release
# does not re-fire the release event.
workflow_run:
workflows: ["pgloader v4 Integration Tests"]
types: [completed]
branches: [main]
workflow_dispatch:

jobs:
smoke:
name: Download JAR & migrate Chinook SQLite → PostgreSQL
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}

services:
postgres:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ QLDIR = $(BUILDDIR)/quicklisp
MANIFEST = $(BUILDDIR)/manifest.ql
LATEST = $(BUILDDIR)/pgloader-latest.tgz

BUNDLEDIST = 2022-02-20
BUNDLEDIST = 2026-01-01
BUNDLENAME = pgloader-bundle-$(VERSION)
BUNDLEDIR = $(BUILDDIR)/bundle/$(BUNDLENAME)
BUNDLE = $(BUILDDIR)/$(BUNDLENAME).tgz
Expand Down Expand Up @@ -199,7 +199,7 @@ $(BUNDLE): $(BUNDLEDIR) $(BUNDLEDIR)/version.sexp
cp bundle/README.md $(BUNDLEDIR)
cp bundle/save.lisp $(BUNDLEDIR)
sed -e s/%VERSION%/$(VERSION)/ < bundle/Makefile > $(BUNDLEDIR)/Makefile
git archive --format=tar --prefix=pgloader-$(VERSION)/ main \
git archive --format=tar --prefix=pgloader-$(VERSION)/ HEAD \
| tar -C $(BUNDLEDIR)/local-projects/ -xf -
make QLDIR=$(BUNDLEDIR) clones
tar -C build/bundle \
Expand Down
2 changes: 1 addition & 1 deletion bundle/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ $(PGLOADER): $(BUILDAPP)
mv $@.tmp $@

test: $(PGLOADER)
$(MAKE) PGLOADER=$(realpath $(PGLOADER)) -C $(SRCDIR)/test regress
$(MAKE) PGLOADER=$(realpath $(PGLOADER)) -C $(SRCDIR)/test prepare regress

save:
sbcl --no-userinit --load ./save.lisp
Expand Down
3 changes: 1 addition & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ override_dh_strip override_dh_dwz:

override_dh_installman-arch:
mkdir -p debian/pgloader/usr/share/man/man1/
PATH=$(CURDIR)/debian/pgloader/usr/bin:$(PATH) \
help2man --version-string $(DEB_VERSION_UPSTREAM) \
--no-info \
--name "extract, transform and load data into PostgreSQL" \
pgloader > \
$(CURDIR)/debian/pgloader/usr/bin/pgloader > \
debian/pgloader/usr/share/man/man1/pgloader.1

override_dh_gencontrol:
Expand Down
Loading