Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2224f02
feat: Add DEB and RPM packaging for SQLPage
cursoragent Oct 2, 2025
9b74ea0
Checkpoint before follow-up message
cursoragent Oct 2, 2025
2408ef6
Fix: Adjust packaging for CI and local builds
cursoragent Oct 2, 2025
d3601b4
Fix: Configure git safe directory in CI
cursoragent Oct 2, 2025
e850038
Fix RPM packaging: use tilde for pre-releases
cursoragent Oct 2, 2025
3e82167
Checkpoint before follow-up message
cursoragent Oct 2, 2025
4880aa5
Fix: Use ubuntu-20.04 for wider glibc compatibility
cursoragent Oct 2, 2025
f418d32
Disable shebang mangling for Rust source files
cursoragent Oct 2, 2025
c75096f
feat: Create /var/log/sqlpage directory
cursoragent Oct 3, 2025
74d549c
Fix: Use wildcard for RPM installation in CI
cursoragent Oct 3, 2025
16a5885
Fix: Install RPMs from correct x86_64 subdirectory
cursoragent Oct 3, 2025
89a3717
Fix: Improve package install and verification steps
cursoragent Oct 3, 2025
1ce4258
build: Use Rocky Linux 8 for RPM builds
cursoragent Oct 3, 2025
092fad5
Refactor: Use manylinux2014 for RPM builds and update dependencies
cursoragent Oct 3, 2025
3d047cf
build: Skip rpm build dependencies in CI
cursoragent Oct 3, 2025
e90e592
Disable debug packages for Rust binaries
cursoragent Oct 4, 2025
b9d36c5
ci
lovasoa Oct 5, 2025
b049a8f
Add manpage for sqlpage binary to DEB and RPM packages
lovasoa Oct 5, 2025
383e526
Refactor CI workflow to use testable scripts
lovasoa Oct 5, 2025
a495345
Simplify CI workflow and remove unnecessary freetds dependency
lovasoa Oct 5, 2025
9e09075
Drastically simplify CI workflow by moving all logic to scripts
lovasoa Oct 5, 2025
6ad5346
Merge branch 'main' into cursor/automate-deb-and-rpm-package-generati…
lovasoa Oct 6, 2025
5ea15b9
Update .gitignore, CI scripts, and changelog for improved package han…
lovasoa Oct 6, 2025
1c9f81b
Merge remote-tracking branch 'refs/remotes/origin/cursor/automate-deb…
lovasoa Oct 6, 2025
5fb79aa
ubuntu action runs on ubuntu 22
lovasoa Oct 6, 2025
63448dc
update mail
lovasoa Oct 6, 2025
a6308ac
Update CI workflow to use Debian container for building DEB packages …
lovasoa Oct 6, 2025
e1ee6ca
avoid uploadig dbgsym as artefact
lovasoa Oct 6, 2025
5df461a
cleanup scripts
lovasoa Oct 6, 2025
aa33dba
Refactor systemd service files for SQLPage
lovasoa Oct 6, 2025
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
127 changes: 127 additions & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Build and Test Packages

on:
push:
tags: ["v*"]
branches: ["main", "release-test"]
pull_request:
branches: ["main"]
paths: ["debian/**", "rpm/**", "scripts/build-*.sh", ".github/workflows/packages.yml"]
workflow_dispatch:
workflow_call:

permissions:
contents: write
actions: read

jobs:
build-deb:
name: Build DEB
runs-on: ubuntu-22.04
container: debian:bullseye
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install dependencies
run: apt-get update && apt-get install -y debhelper dpkg-dev build-essential libssl-dev pkg-config unixodbc-dev lintian

- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu

- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6

- name: Build
run: bash scripts/ci-build-deb.sh

- uses: actions/upload-artifact@v4
with:
name: debian-package
path: build-output/sqlpage_*.deb

build-rpm:
name: Build RPM
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux_2_28_x86_64
steps:
- name: Setup
run: |
yum install -y git
git config --global --add safe.directory /__w/SQLPage/SQLPage

- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install dependencies
run: yum install -y rpm-build rpmdevtools openssl-devel systemd unixODBC-devel

- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu

- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6

- name: Build
run: bash scripts/ci-build-rpm.sh

- uses: actions/upload-artifact@v4
with:
name: rpm-package
path: ~/rpmbuild/RPMS/*/sqlpage*.rpm

- uses: actions/upload-artifact@v4
with:
name: srpm-package
path: ~/rpmbuild/SRPMS/sqlpage*.rpm

test:
name: Test ${{ matrix.pkg }} on ${{ matrix.distro }}
needs: [build-deb, build-rpm]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- pkg: deb
distro: debian:bookworm
- pkg: deb
distro: debian:bullseye
- pkg: deb
distro: ubuntu:24.04
- pkg: deb
distro: ubuntu:22.04
- pkg: deb
distro: ubuntu:20.04
- pkg: rpm
distro: fedora:latest
- pkg: rpm
distro: rockylinux:8
container: ${{ matrix.distro }}
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: ${{ matrix.pkg == 'deb' && 'debian-package' || 'rpm-package' }}

- name: Test
run: bash scripts/ci-test-package.sh ${{ matrix.pkg == 'deb' && './sqlpage*.deb' || './x86_64/*.rpm' }}

publish:
name: Publish
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4

- name: Prepare
run: bash scripts/ci-publish.sh

- uses: softprops/action-gh-release@v2
with:
files: release-assets/*
fail_on_unmatched_files: true
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,14 @@ jobs:
name: sqlpage aws lambda serverless image
path: sqlpage-aws-lambda.zip

build-packages:
name: Build DEB and RPM packages
uses: ./.github/workflows/packages.yml
secrets: inherit

create_release:
name: Create Github Release
needs: [build-macos-windows, build-linux, build-aws]
needs: [build-macos-windows, build-linux, build-aws, build-packages]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
Expand Down Expand Up @@ -141,6 +146,9 @@ jobs:
sqlpage-linux.tgz
sqlpage-macos.tgz
sqlpage aws lambda serverless image/sqlpage-aws-lambda.zip
debian-package/*.deb
rpm-package/*.rpm
srpm-package/*.rpm

cargo_publish:
name: Publish to crates.io
Expand Down
53 changes: 42 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,43 @@
/target
sqlpage.db
.idea/
*.mm_profdata
docs/presentation-pgconf.html
examples/inrap_badass/
sqlpage/https/*
x.sql
xbed.sql
**/sqlpage.bin
# Build artifacts and outputs
/target/
/build-output/
/sqlpage.bin
*.deb
*.rpm
*.tar.gz
*.zip
*.buildinfo
*.changes

# Rust/Cargo
Cargo.lock

# Debian packaging build artifacts
debian/.debhelper/
debian/sqlpage/
debian/cargo_home/
debian/files
debian/*.substvars
debian/*.log
debian/*.debhelper
debian/debhelper-build-stamp

# RPM packaging build artifacts
rpmbuild/
*.src.rpm

# Editor and system files
*.swp
*.swo
*~
.DS_Store
*.tmp
*.temp

# Node modules (if any)
node_modules/
sqlpage/sqlpage.db

# IDE and development files
.vscode/
.idea/
*.code-workspace
Loading
Loading