Skip to content
Open
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
38 changes: 33 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,42 @@ jobs:
with:
fetch-depth: 0

- name: Build
# Built on EL8 (glibc 2.28) so the same binaries, .deb and .rpm run on
# Debian 11+, Ubuntu 22.04+, RHEL/Rocky/Alma 8+ and Fedora.
- name: Build (EL8, glibc 2.28 baseline)
run: |
docker run --rm -v "$PWD:/src" -w /src rockylinux:8 bash -c '
dnf install -y -q gcc make zlib-devel libgcrypt-devel && make all'
sudo chown -R "$(id -u):$(id -g)" .

- name: Check glibc baseline
run: |
for bin in ldb libldb.so; do
max=$(objdump -T "$bin" | grep -o 'GLIBC_[0-9.]*' | sed 's/GLIBC_//' | sort -uV | tail -1)
echo "$bin requires glibc $max"
[ "$(printf '%s\n' "$max" 2.28 | sort -V | tail -1)" = "2.28" ] || { echo "$bin requires glibc > 2.28"; exit 1; }
done

- name: Collect artifacts
run: |
make all
mkdir -p ./artifacts/
cp ldb ./artifacts/ldb
cp libldb.so ./artifacts/libldb.so
echo "Produced artifact at ${PWD}/artifacts/ldb"

- name: 'Tar files'
run: tar czvf ldb-${{ github.ref_name }}-linux-amd64.tar.gz -C artifacts/ .
run: tar czvf "ldb-${GITHUB_REF_NAME//\//-}-linux-amd64.tar.gz" -C artifacts/ .

- name: Prepare deb package
id: build_deb
# package.sh directly: make prepare_*_package would rebuild on the runner
run: |
make prepare_deb_package
./package.sh deb "$(./version.sh)"
echo "debpkg_file_name=$(ls *.deb)" >> $GITHUB_OUTPUT

- name: Prepare rpm package
run: |
make prepare_rpm_package
./package.sh rpm "$(./version.sh)"
echo "rpmpkg_file_name=$(ls dist/rpm/RPMS/x86_64/*.rpm)" >> $GITHUB_OUTPUT

- name: Show the artifacts
Expand All @@ -54,6 +70,18 @@ jobs:
ls -al "${PWD}"
ls -al "${PWD}/dist/rpm/RPMS/x86_64/"

# Manual runs (workflow_dispatch) don't create a release: keep the packages
# as workflow artifacts so they can be tested
- name: Upload packages
if: github.ref_type != 'tag'
uses: actions/upload-artifact@v4
with:
name: packages
path: |
./*.tar.gz
./*.deb
./dist/rpm/RPMS/x86_64/*.rpm

- name: Create Draft Release ${{ github.ref_type }} - ${{ github.ref_name }}
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v1
Expand Down
2 changes: 1 addition & 1 deletion scripts/debpkg/DEBIAN/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: ldb
Version: LDB_VERSION
Maintainer: SCANOSS <support@scanoss.com>
Architecture: amd64
Depends: libgcrypt20 (>= 1.9.0), libc6 (>= 2.4), zlib1g (>= 1:1.1.4)
Depends: libgcrypt20 (>= 1.8.0), libc6 (>= 2.4), zlib1g (>= 1:1.1.4)
Description: SCANOSS LDB
The LDB (Linked-list database) is a headless database management system focused in single-key, read-only application on vast amounts of data, while maintaining a minimal footprint and keeping system calls to a bare minimum. Information is structured using linked lists.
License: GPL-2+
Loading