From 4c4524e7c6d9ab956e9225ce3fe2402093c27bd9 Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Tue, 16 Jan 2024 21:29:43 +0530 Subject: [PATCH 01/10] feat(release): Also bundle dragonfly-debug builds --- .github/workflows/release.yml | 168 +++++++++++++++------------------- Makefile | 1 + 2 files changed, 73 insertions(+), 96 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d2491745395..b5ecdc35a58f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,12 +1,7 @@ name: Version Release on: - push: - tags: - - 'v*' - -permissions: - contents: write + workflow_dispatch: env: RELEASE_DIR: build-release @@ -29,45 +24,45 @@ jobs: name: Build aarch64 on ubuntu20.04 needs: create-release steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Cache build deps - id: cache-deps - uses: actions/cache@v3 - with: - path: | - ${{github.workspace}}/${{ env.RELEASE_DIR }}/ - !${{github.workspace}}/${{ env.RELEASE_DIR }}/CMakeCache.txt - key: ${{ runner.os }}-release-deps-${{ github.sha }} - #restore-keys: | - # ${{ runner.os }}-release-deps- + - uses: actions/checkout@v3 + with: + submodules: true + - name: Cache build deps + id: cache-deps + uses: actions/cache@v3 + with: + path: | + ${{github.workspace}}/${{ env.RELEASE_DIR }}/ + !${{github.workspace}}/${{ env.RELEASE_DIR }}/CMakeCache.txt + key: ${{ runner.os }}-release-deps-${{ github.sha }} + #restore-keys: | + # ${{ runner.os }}-release-deps- - - uses: uraimo/run-on-arch-action@v2 - name: Run commands - id: runcmd - with: - arch: aarch64 - distro: ubuntu20.04 - githubToken: ${{ github.token }} - # Create an artifacts directory - setup: | - mkdir -p "${PWD}/artifacts" + - uses: uraimo/run-on-arch-action@v2 + name: Run commands + id: runcmd + with: + arch: aarch64 + distro: ubuntu20.04 + githubToken: ${{ github.token }} + # Create an artifacts directory + setup: | + mkdir -p "${PWD}/artifacts" - # Mount the artifacts directory as /artifacts in the container - dockerRunArgs: | - --volume "${{ github.workspace }}:/src" + # Mount the artifacts directory as /artifacts in the container + dockerRunArgs: | + --volume "${{ github.workspace }}:/src" - # The shell to run commands with in the container - shell: /bin/bash - install: | - export DEBIAN_FRONTEND=noninteractive - apt update && apt install -q -y autoconf-archive cmake curl git libssl-dev \ - libunwind-dev ninja-build libtool gcc-9 g++-9 libboost-context-dev \ - zip libzstd-dev debhelper moreutils bison zlib1g-dev - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 40 \ - --slave /usr/bin/g++ g++ /usr/bin/g++-9 - run: | + # The shell to run commands with in the container + shell: /bin/bash + install: | + export DEBIAN_FRONTEND=noninteractive + apt update && apt install -q -y autoconf-archive cmake curl git libssl-dev \ + libunwind-dev ninja-build libtool gcc-9 g++-9 libboost-context-dev \ + zip libzstd-dev debhelper moreutils bison zlib1g-dev + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 40 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-9 + run: | # Work around https://github.com/actions/checkout/issues/766 git config --global --add safe.directory /src cd /src @@ -83,19 +78,19 @@ jobs: ./tools/release.sh ./tools/packaging/generate_debian_package.sh ${{ env.RELEASE_DIR }}/dragonfly-aarch64 mv dragonfly_*.deb ${{ env.RELEASE_DIR }}/ - - name: Show the artifact - # Items placed in /src/${{ env.RELEASE_DIR }} in the container will be in - # ${PWD}/${{ env.RELEASE_DIR }} on the host. - run: | - echo finished - ls -al - - name: Upload - uses: actions/upload-artifact@v3 - with: - name: dragonfly-aarch64 - path: | - ${{ env.RELEASE_DIR }}/dragonfly-*tar.gz - ${{ env.RELEASE_DIR }}/dragonfly_*.deb + - name: Show the artifact + # Items placed in /src/${{ env.RELEASE_DIR }} in the container will be in + # ${PWD}/${{ env.RELEASE_DIR }} on the host. + run: | + echo finished + ls -al + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: dragonfly-aarch64 + path: | + ${{ env.RELEASE_DIR }}/dragonfly-*tar.gz + ${{ env.RELEASE_DIR }}/dragonfly_*.deb build-native: runs-on: ubuntu-latest @@ -111,16 +106,16 @@ jobs: container: image: ghcr.io/romange/${{ matrix.container }} steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Configure - run: | + - uses: actions/checkout@v3 + with: + submodules: true + - name: Configure + run: | if [ -f /etc/redhat-release ]; then dnf install -y rpm-build libstdc++-static fi - - name: Build artifacts - run: | + - 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 }} @@ -133,17 +128,17 @@ jobs: ./tools/packaging/rpm/build_rpm.sh ${{ env.RELEASE_DIR }}/dragonfly-x86_64.tar.gz ${{github.ref_name}} fi - - name: Run regression tests - # Fedora 30 has older python packages, so this fails during requirements installation. - if : matrix.container != 'fedora:30' - uses: ./.github/actions/regression-tests - with: - dfly-executable: dragonfly-x86_64 - gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }} - run-only-on-ubuntu-latest: true - build-folder-name: ${{ env.RELEASE_DIR }} - - name: Save artifacts - run: | + - name: Run regression tests + # Fedora 30 has older python packages, so this fails during requirements installation. + if: matrix.container != 'fedora:30' + uses: ./.github/actions/regression-tests + with: + dfly-executable: dragonfly-x86_64 + gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }} + run-only-on-ubuntu-latest: true + build-folder-name: ${{ env.RELEASE_DIR }} + - name: Save artifacts + run: | # place all artifacts at the same location mkdir -p results-artifacts if [ -f /etc/debian_version ]; then @@ -153,27 +148,8 @@ jobs: ls -l *.rpm mv ./*.rpm ./results-artifacts/ fi - - name: Upload - uses: actions/upload-artifact@v3 - with: - name: dragonfly-amd64 - path: results-artifacts/* - publish_release: - runs-on: ubuntu-latest - needs: [build-native, build-qemu] - steps: - - uses: actions/download-artifact@v3 - name: Download files - with: - path: artifacts - - name: See all the artifacts - run: | - ls -lR artifacts/ - - uses: ncipollo/release-action@v1 + - name: Upload + uses: actions/upload-artifact@v3 with: - artifacts: "artifacts/dragonfly-*/*" - allowUpdates: true - draft: true - prerelease: true - omitNameDuringUpdate: true - token: ${{ secrets.GITHUB_TOKEN }} + name: dragonfly-amd64 + path: results-artifacts/* diff --git a/Makefile b/Makefile index d03926cc6e06..fa6b22c079a3 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,7 @@ build: package: cd build-release; \ + tar cvfz $(RELEASE_NAME)-debug.tar.gz dragonfly ../LICENSE.md objcopy \ --remove-section=".debug_*" \ --remove-section="!.debug_line" \ From 5c1dc2031907d05919aea8ff44299cad3d9f990f Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Tue, 16 Jan 2024 21:39:21 +0530 Subject: [PATCH 02/10] remove create release to test --- .github/workflows/release.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b5ecdc35a58f..507756df7cb3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,14 +10,8 @@ jobs: create-release: runs-on: ubuntu-latest steps: - - name: Create Release - uses: ncipollo/release-action@v1 - with: - allowUpdates: true - omitBody: true - prerelease: true - draft: true - token: ${{ secrets.GITHUB_TOKEN }} + - name: Print Message + run: echo "Release created successfully!" build-qemu: runs-on: ubuntu-latest From f098f6b29f1ff2420b71445580dcbd19918cb6bb Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Wed, 17 Jan 2024 12:05:54 +0530 Subject: [PATCH 03/10] fix APP_PATH --- tools/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release.sh b/tools/release.sh index 5fd0ca1065a6..7a4fe0f63820 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh -APP_PATH=build-opt/dragonfly +APP_PATH=build-release/dragonfly set -e From 3d727cff20af76916d244e73b833dca16ecc94ca Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Wed, 17 Jan 2024 13:52:30 +0530 Subject: [PATCH 04/10] continue command --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fa6b22c079a3..1610d5adaa8e 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ build: package: cd build-release; \ - tar cvfz $(RELEASE_NAME)-debug.tar.gz dragonfly ../LICENSE.md + tar cvfz $(RELEASE_NAME)-debug.tar.gz dragonfly ../LICENSE.md; \ objcopy \ --remove-section=".debug_*" \ --remove-section="!.debug_line" \ From 8e58eac46460e5af824e047d274f73795a34b9d0 Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Sun, 11 Feb 2024 22:53:26 +0530 Subject: [PATCH 05/10] use ubuntu dev --- .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 2c75a8f7efb1..82b889e86610 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,7 +90,7 @@ jobs: runs-on: ubuntu-latest needs: create-release container: - image: ghcr.io/romange/${{ matrix.container }} + image: ghcr.io/romange/ubuntu-dev:20 steps: - uses: actions/checkout@v3 with: From d9fe2f4d002e89f63309b2be6905eab12c384edc Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Sun, 11 Feb 2024 23:15:46 +0530 Subject: [PATCH 06/10] don't run regression tests --- .github/workflows/release.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 82b889e86610..7bbc282dec32 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -115,14 +115,6 @@ jobs: ./tools/packaging/rpm/build_rpm.sh ${{ env.RELEASE_DIR }}/dragonfly-x86_64.tar.gz ${{github.ref_name}} fi - - name: Run regression tests - # Fedora 30 has older python packages, so this fails during requirements installation. - uses: ./.github/actions/regression-tests - with: - dfly-executable: dragonfly-x86_64 - gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }} - run-only-on-ubuntu-latest: true - build-folder-name: ${{ env.RELEASE_DIR }} - name: Save artifacts run: | # place all artifacts at the same location From 0f002a79e0d6198eb483f45c8a4726f659481f31 Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Mon, 12 Feb 2024 12:25:13 +0530 Subject: [PATCH 07/10] readd all the unnecessary changes --- .github/workflows/release.yml | 57 ++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7bbc282dec32..0474ba77e1fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,12 @@ name: Version Release on: - workflow_dispatch: + push: + tags: + - "v*" + +permissions: + contents: write env: RELEASE_DIR: build-release @@ -10,8 +15,14 @@ jobs: create-release: runs-on: ubuntu-latest steps: - - name: Print Message - run: echo "Release created successfully!" + - name: Create Release + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + omitBody: true + prerelease: true + draft: true + token: ${{ secrets.GITHUB_TOKEN }} build-qemu: runs-on: ubuntu-latest @@ -89,8 +100,16 @@ jobs: build-native: runs-on: ubuntu-latest needs: create-release + strategy: + matrix: + include: + # Build with these flags + - name: debian + container: ubuntu-dev:20 + - name: rpm + container: fedora:30 container: - image: ghcr.io/romange/ubuntu-dev:20 + image: ghcr.io/romange/${{ matrix.container }} steps: - uses: actions/checkout@v3 with: @@ -115,6 +134,16 @@ jobs: ./tools/packaging/rpm/build_rpm.sh ${{ env.RELEASE_DIR }}/dragonfly-x86_64.tar.gz ${{github.ref_name}} fi + - name: Run regression tests + # Fedora 30 has older python packages, so this fails during requirements installation. + if: matrix.container != 'fedora:30' + uses: ./.github/actions/regression-tests + with: + dfly-executable: dragonfly-x86_64 + gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }} + run-only-on-ubuntu-latest: true + build-folder-name: ${{ env.RELEASE_DIR }} + - name: Save artifacts run: | # place all artifacts at the same location @@ -131,3 +160,23 @@ jobs: with: name: dragonfly-amd64 path: results-artifacts/* + + publish_release: + runs-on: ubuntu-latest + needs: [build-native, build-qemu] + steps: + - uses: actions/download-artifact@v3 + name: Download files + with: + path: artifacts + - name: See all the artifacts + run: | + ls -lR artifacts/ + - uses: ncipollo/release-action@v1 + with: + artifacts: "artifacts/dragonfly-*/*" + allowUpdates: true + draft: true + prerelease: true + omitNameDuringUpdate: true + token: ${{ secrets.GITHUB_TOKEN }} From 098ebd973a13c28b02264b80d9b7ca15164a3e18 Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Mon, 12 Feb 2024 13:36:42 +0530 Subject: [PATCH 08/10] remove whitespace changes --- .github/workflows/release.yml | 152 +++++++++++++++++----------------- 1 file changed, 75 insertions(+), 77 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0474ba77e1fa..63c89facfadd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Version Release on: push: tags: - - "v*" + - 'v*' permissions: contents: write @@ -29,45 +29,45 @@ jobs: name: Build aarch64 on ubuntu20.04 needs: create-release steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Cache build deps - id: cache-deps - uses: actions/cache@v3 - with: - path: | - ${{github.workspace}}/${{ env.RELEASE_DIR }}/ - !${{github.workspace}}/${{ env.RELEASE_DIR }}/CMakeCache.txt - key: ${{ runner.os }}-release-deps-${{ github.sha }} - #restore-keys: | - # ${{ runner.os }}-release-deps- + - uses: actions/checkout@v3 + with: + submodules: true + - name: Cache build deps + id: cache-deps + uses: actions/cache@v3 + with: + path: | + ${{github.workspace}}/${{ env.RELEASE_DIR }}/ + !${{github.workspace}}/${{ env.RELEASE_DIR }}/CMakeCache.txt + key: ${{ runner.os }}-release-deps-${{ github.sha }} + #restore-keys: | + # ${{ runner.os }}-release-deps- - - uses: uraimo/run-on-arch-action@v2 - name: Run commands - id: runcmd - with: - arch: aarch64 - distro: ubuntu20.04 - githubToken: ${{ github.token }} - # Create an artifacts directory - setup: | - mkdir -p "${PWD}/artifacts" + - uses: uraimo/run-on-arch-action@v2 + name: Run commands + id: runcmd + with: + arch: aarch64 + distro: ubuntu20.04 + githubToken: ${{ github.token }} + # Create an artifacts directory + setup: | + mkdir -p "${PWD}/artifacts" - # Mount the artifacts directory as /artifacts in the container - dockerRunArgs: | - --volume "${{ github.workspace }}:/src" + # Mount the artifacts directory as /artifacts in the container + dockerRunArgs: | + --volume "${{ github.workspace }}:/src" - # The shell to run commands with in the container - shell: /bin/bash - install: | - export DEBIAN_FRONTEND=noninteractive - apt update && apt install -q -y autoconf-archive cmake curl git libssl-dev \ - libunwind-dev ninja-build libtool gcc-9 g++-9 libboost-context-dev \ - zip libzstd-dev debhelper moreutils bison zlib1g-dev - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 40 \ - --slave /usr/bin/g++ g++ /usr/bin/g++-9 - run: | + # The shell to run commands with in the container + shell: /bin/bash + install: | + export DEBIAN_FRONTEND=noninteractive + apt update && apt install -q -y autoconf-archive cmake curl git libssl-dev \ + libunwind-dev ninja-build libtool gcc-9 g++-9 libboost-context-dev \ + zip libzstd-dev debhelper moreutils bison zlib1g-dev + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 40 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-9 + run: | # Work around https://github.com/actions/checkout/issues/766 git config --global --add safe.directory /src cd /src @@ -83,19 +83,19 @@ jobs: ./tools/release.sh ./tools/packaging/generate_debian_package.sh ${{ env.RELEASE_DIR }}/dragonfly-aarch64 mv dragonfly_*.deb ${{ env.RELEASE_DIR }}/ - - name: Show the artifact - # Items placed in /src/${{ env.RELEASE_DIR }} in the container will be in - # ${PWD}/${{ env.RELEASE_DIR }} on the host. - run: | - echo finished - ls -al - - name: Upload - uses: actions/upload-artifact@v3 - with: - name: dragonfly-aarch64 - path: | - ${{ env.RELEASE_DIR }}/dragonfly-*tar.gz - ${{ env.RELEASE_DIR }}/dragonfly_*.deb + - name: Show the artifact + # Items placed in /src/${{ env.RELEASE_DIR }} in the container will be in + # ${PWD}/${{ env.RELEASE_DIR }} on the host. + run: | + echo finished + ls -al + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: dragonfly-aarch64 + path: | + ${{ env.RELEASE_DIR }}/dragonfly-*tar.gz + ${{ env.RELEASE_DIR }}/dragonfly_*.deb build-native: runs-on: ubuntu-latest @@ -111,17 +111,17 @@ jobs: container: image: ghcr.io/romange/${{ matrix.container }} steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Configure - run: | + - uses: actions/checkout@v3 + 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: | + - 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 }} @@ -134,18 +134,17 @@ jobs: ./tools/packaging/rpm/build_rpm.sh ${{ env.RELEASE_DIR }}/dragonfly-x86_64.tar.gz ${{github.ref_name}} fi - - name: Run regression tests - # Fedora 30 has older python packages, so this fails during requirements installation. - if: matrix.container != 'fedora:30' - uses: ./.github/actions/regression-tests - with: - dfly-executable: dragonfly-x86_64 - gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }} - run-only-on-ubuntu-latest: true - build-folder-name: ${{ env.RELEASE_DIR }} - - - name: Save artifacts - run: | + - name: Run regression tests + # Fedora 30 has older python packages, so this fails during requirements installation. + if : matrix.container != 'fedora:30' + uses: ./.github/actions/regression-tests + with: + dfly-executable: dragonfly-x86_64 + gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }} + run-only-on-ubuntu-latest: true + build-folder-name: ${{ env.RELEASE_DIR }} + - name: Save artifacts + run: | # place all artifacts at the same location mkdir -p results-artifacts if [ -f /etc/debian_version ]; then @@ -155,12 +154,11 @@ jobs: ls -l *.rpm mv ./*.rpm ./results-artifacts/ fi - - name: Upload - uses: actions/upload-artifact@v3 - with: - name: dragonfly-amd64 - path: results-artifacts/* - + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: dragonfly-amd64 + path: results-artifacts/* publish_release: runs-on: ubuntu-latest needs: [build-native, build-qemu] @@ -179,4 +177,4 @@ jobs: draft: true prerelease: true omitNameDuringUpdate: true - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 59a47da649f23eeb4d114528db8e8ab284806603 Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Mon, 12 Feb 2024 13:37:07 +0530 Subject: [PATCH 09/10] whitespace --- .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 63c89facfadd..3cf69afc95a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -177,4 +177,4 @@ jobs: draft: true prerelease: true omitNameDuringUpdate: true - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} From dcf827eab547af173af10b2017c9378b230a3b6b Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Mon, 12 Feb 2024 18:20:58 +0530 Subject: [PATCH 10/10] -debug to -dbgsym --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ecb7dbf24331..5cf62d2bb6da 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ build: package: cd $(RELEASE_DIR); \ - tar cvfz $(RELEASE_NAME)-debug.tar.gz dragonfly ../LICENSE.md; \ + tar cvfz $(RELEASE_NAME)-dbgsym.tar.gz dragonfly ../LICENSE.md; \ objcopy \ --remove-section=".debug_*" \ --remove-section="!.debug_line" \