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