Skip to content

Commit

Permalink
feat(actions): add support for debian packaging
Browse files Browse the repository at this point in the history
Signed-off-by: Boaz Sade <[email protected]>
  • Loading branch information
boazsade committed Jan 17, 2023
1 parent 9536c0a commit 11a09c2
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 7 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,28 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: true
- name: Configure
run: |
apt update && apt install -y debhelper
- name: Build artifacts
run: |
# Work around https://github.com/actions/checkout/issues/766
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git describe --always --tags ${{ github.sha }}
./tools/release.sh
# once the build is over, we want to generate a Debian package
./tools/packaging/generate_debian_package.sh build-opt/dragonfly-x86_64
- name: Save artifacts
run: |
# place all artifacts at the same location
mkdir -p results-artifacts
mv build-opt/dragonfly-*tar.gz results-artifacts
mv dragonfly_*.deb results-artifacts
- name: Upload
uses: actions/upload-artifact@v3
with:
name: dragonfly-amd64
path: build-opt/dragonfly-*tar.gz

path: results-artifacts/*
publish_release:
runs-on: ubuntu-latest
needs: [build-native, build-qemu]
Expand Down
30 changes: 30 additions & 0 deletions tools/packaging/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
dragonfly (0.1.1) unstable; urgency=low
* Add unstripped binary to allow optional profiling
* docs: Fix a variable name for bucket in Dashtable section (#80)
* Initial commit for helm chart (#57) (#79)
* More printings in rdb_test in order to catch the snapshotting bug
* Improving Readability r3 (#75)
* Fixes #66. (#70)
* Update build steps for Ubuntu (#72)
* Add basic Prometheus support and metrics (#67)
* Fix a crash in debug mode when working with huge strings.
* Improve Comment Readability (#69)
* Add a debug assertion in order to chaise a bug when serialization finishes
* CI: Use v3 of Actions "upload-artifacts", "checkout" and "cache" (#62)
* docs: Repair Markdown markup (#63)
* Add romanger's twitter handle. We will post about DragonflyDb from his personal twitter.
* Update docker-release workflow to tag image with release version (#60)
* Update dragonfly blurb (#48)
* Improve readability (#52)
* Fix a spelling error (#50)
* Fix docker pipeline
* Fix info command to use git version (#49)
* Add a DCHECK to catch a bug

-- Roman Gershman <[email protected]> Fri, 3 Jun 2022 07:41:48 +0300

dragonfly (0.1.0) unstable; urgency=low


-- Roman Gershman <[email protected]> Mon, 30 May 2022 12:30:00 +0300

5 changes: 0 additions & 5 deletions tools/packaging/generate_debian_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ set -eu
SCRIPT_ABS_PATH=$(realpath $0)
SCRIPT_PATH=$(dirname ${SCRIPT_ABS_PATH})
PACKAGES_PATH=${SCRIPT_PATH}/debian
CHANGELOG_SCRIPT=generate_changelog.sh
BUILD_DIR=build-opt
ROOT_ABS_PATH=$(cd ${SCRIPT_PATH}; while [ ! -d ${BUILD_DIR} ]; do cd ..; done ; pwd)
REPO_PATH=${ROOT_ABS_PATH}
Expand Down Expand Up @@ -50,14 +49,10 @@ mkdir -p ${BASE_PATH} || cleanup "failed to create working directory for buildin

cp -r ${PACKAGES_PATH} ${BASE_PATH} || cleanup "failed to copy required for the package build from ${PACKAGES_PATH}"

cp ${SCRIPT_PATH}/${CHANGELOG_SCRIPT} ${BASE_PATH} || cleanup "failed to copy changelog script to ${BASE_PATH}"

mkdir -p ${BINARY_TARGET_DIR} || cleanup "failed to create install directory for building the package"

cp ${VERSION_FILE} ${BINARY_TARGET_DIR}/dragonfly || cleanup "failed to copy binary to target dir"

${BASE_PATH}/${CHANGELOG_SCRIPT} ${REPO_PATH} || cleanup "failed to generate changelog for package"

MY_DIR=${PWD}
cd ${BASE_PATH} && dpkg-buildpackage --build=binary || cleanup "failed to generate the package"
TEMP_RESULT_FILE=$(ls ../*.deb)
Expand Down

0 comments on commit 11a09c2

Please sign in to comment.