Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(release): Also bundle dragonfly-debug builds #2424

Merged
merged 15 commits into from
Feb 12, 2024
Merged
150 changes: 76 additions & 74 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Version Release
on:
push:
tags:
- 'v*'
- "v*"

permissions:
contents: write
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -134,17 +134,18 @@ 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
Expand All @@ -154,11 +155,12 @@ 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]
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ build:

package:
cd $(RELEASE_DIR); \
tar cvfz $(RELEASE_NAME)-debug.tar.gz dragonfly ../LICENSE.md; \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual change. Essentially we are storing a -debug.tar.gz wih the dragonfly binary before its stripped of symbols and then expect the release pipeline to also publish these files.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why there is a whitespace change? Can you please remove unnecessary changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Linter did its thing!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, just to make sure the naming is not misleading, I suggest that we call it $(RELEASE_NAME)-dbgsym.tgz

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

objcopy \
--remove-section=".debug_*" \
--remove-section="!.debug_line" \
Expand Down
Loading