mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
add test
Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
parent
b415f5d8d5
commit
63f40f4a22
2 changed files with 95 additions and 2 deletions
93
.github/workflows/test_release.yml
vendored
Normal file
93
.github/workflows/test_release.yml
vendored
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
name: Test Version Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
# push:
|
||||||
|
# branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
RELEASE_DIR: build-release
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-arm:
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
|
name: Build arm64 on ubuntu-24.04-arm
|
||||||
|
container:
|
||||||
|
image: ghcr.io/romange/ubuntu-dev:20
|
||||||
|
options: --security-opt seccomp=unconfined --sysctl "net.ipv6.conf.all.disable_ipv6=0"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- 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
|
||||||
|
./tools/packaging/generate_debian_package.sh ${{ env.RELEASE_DIR }}/dragonfly-aarch64
|
||||||
|
mv dragonfly_*.deb ${{ env.RELEASE_DIR }}/
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: dragonfly-aarch64
|
||||||
|
path: |
|
||||||
|
${{ env.RELEASE_DIR }}/dragonfly-*tar.gz
|
||||||
|
${{ env.RELEASE_DIR }}/dragonfly_*.deb
|
||||||
|
${{ env.RELEASE_DIR }}/dfly_bench-*tar.gz
|
||||||
|
build-native:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
# Build with these flags
|
||||||
|
- name: debian
|
||||||
|
container: ubuntu-dev:20
|
||||||
|
- name: rpm
|
||||||
|
container: fedora:30
|
||||||
|
container:
|
||||||
|
image: ghcr.io/romange/${{ matrix.container }}
|
||||||
|
options: --security-opt seccomp=unconfined --sysctl "net.ipv6.conf.all.disable_ipv6=0"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Configure
|
||||||
|
run: |
|
||||||
|
if [ -f /etc/redhat-release ]; then
|
||||||
|
dnf install -y rpm-build libstdc++-static
|
||||||
|
fi
|
||||||
|
- name: Build artifacts
|
||||||
|
timeout-minutes: 25
|
||||||
|
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
|
||||||
|
if [ -f /etc/debian_version ]; then
|
||||||
|
./tools/packaging/generate_debian_package.sh ${{ env.RELEASE_DIR }}/dragonfly-x86_64
|
||||||
|
else
|
||||||
|
echo "Creating package for ${{github.ref_name}}"
|
||||||
|
#./tools/packaging/rpm/build_rpm.sh ${{ env.RELEASE_DIR }}/dragonfly-x86_64.tar.gz ${{github.ref_name}}
|
||||||
|
fi
|
||||||
|
- name: Save artifacts
|
||||||
|
run: |
|
||||||
|
# place all artifacts at the same location
|
||||||
|
mkdir -p results-artifacts
|
||||||
|
if [ -f /etc/debian_version ]; then
|
||||||
|
mv ${{ env.RELEASE_DIR }}/dragonfly-*tar.gz results-artifacts
|
||||||
|
mv dragonfly_*.deb results-artifacts
|
||||||
|
else
|
||||||
|
#ls -l *.rpm
|
||||||
|
ls -lah
|
||||||
|
#mv ./*.rpm ./results-artifacts/
|
||||||
|
fi
|
||||||
|
mv ${{ env.RELEASE_DIR }}/dfly_bench-*tar.gz results-artifacts
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: dragonfly-amd64-${{ matrix.name }}
|
||||||
|
path: results-artifacts/*
|
4
Makefile
4
Makefile
|
@ -45,8 +45,8 @@ package:
|
||||||
--compress-debug-sections \
|
--compress-debug-sections \
|
||||||
dragonfly \
|
dragonfly \
|
||||||
$(RELEASE_NAME); \
|
$(RELEASE_NAME); \
|
||||||
tar cvfz $(RELEASE_NAME).tar.gz $(RELEASE_NAME) ../LICENSE.md \
|
tar cvfz $(RELEASE_NAME).tar.gz $(RELEASE_NAME) ../LICENSE.md; \
|
||||||
mv dfly_bench dfly_bench-$(BUILD_ARCH) \
|
mv dfly_bench dfly_bench-$(BUILD_ARCH); \
|
||||||
tar cvfz dfly_bench-$(BUILD_ARCH).tar.gz dfly_bench-$(BUILD_ARCH)
|
tar cvfz dfly_bench-$(BUILD_ARCH).tar.gz dfly_bench-$(BUILD_ARCH)
|
||||||
|
|
||||||
release: configure build
|
release: configure build
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue