From b415f5d8d54a37ad59a7065444e96d4264d600e7 Mon Sep 17 00:00:00 2001 From: kostas Date: Fri, 9 May 2025 15:20:40 +0300 Subject: [PATCH 1/5] chore: add arch type to dfly bench release binary --- .github/workflows/release.yml | 4 ++-- Makefile | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index efc03fff1..c8a113862 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,7 +51,7 @@ jobs: path: | ${{ env.RELEASE_DIR }}/dragonfly-*tar.gz ${{ env.RELEASE_DIR }}/dragonfly_*.deb - ${{ env.RELEASE_DIR }}/dfly_bench + ${{ env.RELEASE_DIR }}/dfly_bench-*tar.gz build-native: runs-on: ubuntu-latest @@ -111,7 +111,7 @@ jobs: ls -l *.rpm mv ./*.rpm ./results-artifacts/ fi - mv ${{ env.RELEASE_DIR }}/dfly_bench results-artifacts + mv ${{ env.RELEASE_DIR }}/dfly_bench-*tar.gz results-artifacts - name: Upload uses: actions/upload-artifact@v4 diff --git a/Makefile b/Makefile index 908806873..0887dfb36 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,9 @@ package: --compress-debug-sections \ dragonfly \ $(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) \ + tar cvfz dfly_bench-$(BUILD_ARCH).tar.gz dfly_bench-$(BUILD_ARCH) release: configure build From 63f40f4a2299e3f4169f1bb20d90455b8c82e2c1 Mon Sep 17 00:00:00 2001 From: kostas Date: Fri, 9 May 2025 15:22:28 +0300 Subject: [PATCH 2/5] add test Signed-off-by: kostas --- .github/workflows/test_release.yml | 93 ++++++++++++++++++++++++++++++ Makefile | 4 +- 2 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test_release.yml diff --git a/.github/workflows/test_release.yml b/.github/workflows/test_release.yml new file mode 100644 index 000000000..b2b2cdf02 --- /dev/null +++ b/.github/workflows/test_release.yml @@ -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/* diff --git a/Makefile b/Makefile index 0887dfb36..68740e24f 100644 --- a/Makefile +++ b/Makefile @@ -45,8 +45,8 @@ package: --compress-debug-sections \ dragonfly \ $(RELEASE_NAME); \ - tar cvfz $(RELEASE_NAME).tar.gz $(RELEASE_NAME) ../LICENSE.md \ - mv dfly_bench dfly_bench-$(BUILD_ARCH) \ + tar cvfz $(RELEASE_NAME).tar.gz $(RELEASE_NAME) ../LICENSE.md; \ + mv dfly_bench dfly_bench-$(BUILD_ARCH); \ tar cvfz dfly_bench-$(BUILD_ARCH).tar.gz dfly_bench-$(BUILD_ARCH) release: configure build From 9fe5880ea686bef4b157eae13f3f8b085628aa3b Mon Sep 17 00:00:00 2001 From: kostas Date: Fri, 9 May 2025 15:59:02 +0300 Subject: [PATCH 3/5] remove test --- .github/workflows/test_release.yml | 93 ------------------------------ 1 file changed, 93 deletions(-) delete mode 100644 .github/workflows/test_release.yml diff --git a/.github/workflows/test_release.yml b/.github/workflows/test_release.yml deleted file mode 100644 index b2b2cdf02..000000000 --- a/.github/workflows/test_release.yml +++ /dev/null @@ -1,93 +0,0 @@ -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/* From 285b16fabb0cf49ccbbe57aeb392719fc6307109 Mon Sep 17 00:00:00 2001 From: kostas Date: Fri, 9 May 2025 17:43:39 +0300 Subject: [PATCH 4/5] fix rpm --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c8a113862..646a8560a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -107,11 +107,11 @@ jobs: if [ -f /etc/debian_version ]; then mv ${{ env.RELEASE_DIR }}/dragonfly-*tar.gz results-artifacts mv dragonfly_*.deb results-artifacts + mv ${{ env.RELEASE_DIR }}/dfly_bench-*tar.gz results-artifacts else ls -l *.rpm mv ./*.rpm ./results-artifacts/ fi - mv ${{ env.RELEASE_DIR }}/dfly_bench-*tar.gz results-artifacts - name: Upload uses: actions/upload-artifact@v4 From b59942b3ed0fef0e9af1115d3d7e4b35fde5081a Mon Sep 17 00:00:00 2001 From: kostas Date: Fri, 9 May 2025 18:43:41 +0300 Subject: [PATCH 5/5] remove symbols --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 68740e24f..844a8811d 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,12 @@ package: dragonfly \ $(RELEASE_NAME); \ tar cvfz $(RELEASE_NAME).tar.gz $(RELEASE_NAME) ../LICENSE.md; \ - mv dfly_bench dfly_bench-$(BUILD_ARCH); \ + objcopy \ + --remove-section=".debug_*" \ + --remove-section="!.debug_line" \ + --compress-debug-sections \ + dfly_bench \ + dfly_bench-$(BUILD_ARCH); \ tar cvfz dfly_bench-$(BUILD_ARCH).tar.gz dfly_bench-$(BUILD_ARCH) release: configure build