From e73069b33222c7fcb035386efefefb884e4cfe14 Mon Sep 17 00:00:00 2001 From: Christian Gorenflo Date: Wed, 18 Sep 2024 20:40:36 -0400 Subject: [PATCH] Revert "ci: remove linux-arm64 support for ampd (#629)" This reverts commit 2b2aa47d8433fadeac45f33b07bc1cdb9546caf8. --- .github/workflows/build-ampd-release.yaml | 37 +++++++++++++---------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-ampd-release.yaml b/.github/workflows/build-ampd-release.yaml index 82d95c5e5..d1de5e86c 100644 --- a/.github/workflows/build-ampd-release.yaml +++ b/.github/workflows/build-ampd-release.yaml @@ -41,9 +41,6 @@ jobs: matrix: os: [ ubuntu-22.04, macos-12 ] arch: [ amd64, arm64 ] - exclude: - - os: ubuntu-22.04 - arch: arm64 permissions: contents: write @@ -84,22 +81,21 @@ jobs: run: | OS="darwin" ARCH="${{ matrix.arch }}" - - brew install protobuf - if [ "$ARCH" == "arm64" ] then + brew install protobuf rustup target add aarch64-apple-darwin cargo build --release --target aarch64-apple-darwin mkdir ampdbin mv "/Users/runner/work/axelar-amplifier/axelar-amplifier/target/aarch64-apple-darwin/release/ampd" "./ampdbin/ampd-$OS-$ARCH-$SEMVER" + gpg --armor --detach-sign "./ampdbin/ampd-$OS-$ARCH-$SEMVER" else + brew install protobuf cargo build --release mkdir ampdbin mv "/Users/runner/work/axelar-amplifier/axelar-amplifier/target/release/ampd" "./ampdbin/ampd-$OS-$ARCH-$SEMVER" + gpg --armor --detach-sign "./ampdbin/ampd-$OS-$ARCH-$SEMVER" fi - - gpg --armor --detach-sign "./ampdbin/ampd-$OS-$ARCH-$SEMVER" - name: build and sign linux binaries env: @@ -108,14 +104,22 @@ jobs: run: | OS="linux" ARCH="${{ matrix.arch }}" - - sudo apt-get install libssl-dev protobuf-compiler - - cargo build --release - mkdir ampdbin - mv "/home/runner/work/axelar-amplifier/axelar-amplifier/target/release/ampd" "./ampdbin/ampd-$OS-$ARCH-$SEMVER" - - gpg --armor --detach-sign "./ampdbin/ampd-$OS-$ARCH-$SEMVER" + if [ "$ARCH" == "arm64" ] + then + sudo apt-get install protobuf-compiler gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + rustup target add aarch64-unknown-linux-gnu + export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc + cargo build --release --target aarch64-unknown-linux-gnu + mkdir ampdbin + mv "/home/runner/work/axelar-amplifier/axelar-amplifier/target/aarch64-unknown-linux-gnu/release/ampd" "./ampdbin/ampd-$OS-$ARCH-$SEMVER" + gpg --armor --detach-sign "./ampdbin/ampd-$OS-$ARCH-$SEMVER" + else + sudo apt-get install protobuf-compiler + cargo build --release + mkdir ampdbin + mv "/home/runner/work/axelar-amplifier/axelar-amplifier/target/release/ampd" "./ampdbin/ampd-$OS-$ARCH-$SEMVER" + gpg --armor --detach-sign "./ampdbin/ampd-$OS-$ARCH-$SEMVER" + fi - name: Test Binary Format working-directory: ./ampdbin @@ -184,6 +188,7 @@ jobs: cp -R ./ampdbin/. "./${version}/" echo "release-dir=./${version}" >> $GITHUB_OUTPUT echo "r2-destination-dir=./releases/ampd/" >> $GITHUB_OUTPUT + - uses: ryand56/r2-upload-action@latest with: