From 8b7bcf8d76741bfa08f7322486b7830854440b57 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 31 May 2024 14:36:50 +1000 Subject: [PATCH] Put one binary in each tar --- .github/workflows/binaries.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index a8bf71775..9988f686c 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -16,8 +16,10 @@ jobs: fail-fast: false matrix: crate: - - stellar-cli - - soroban-cli + - name: stellar-cli + binary: stellar + - name: soroban-cli + binary: soroban include: - os: ubuntu-20.04 # Use 20.04 to get an older version of glibc for increased compat target: x86_64-unknown-linux-gnu @@ -41,25 +43,25 @@ jobs: run: | version="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "stellar-cli") | .version')" echo "VERSION=${version}" >> $GITHUB_ENV - echo "NAME=${{ matrix.crate }}-${version}-${{ matrix.target }}" >> $GITHUB_ENV + echo "NAME=${{ matrix.crate.name }}-${version}-${{ matrix.target }}" >> $GITHUB_ENV - name: Package (release only) if: github.event_name == 'release' - run: cargo package --no-verify --package ${{ matrix.crate }} + run: cargo package --no-verify --package ${{ matrix.crate.name }} - name: Package Extract (release only) if: github.event_name == 'release' run: | cd target/package - tar xvfz ${{ matrix.crate }}-$VERSION.crate - echo "BUILD_WORKING_DIR=target/package/${{ matrix.crate }}-$VERSION" >> $GITHUB_ENV + tar xvfz ${{ matrix.crate.name }}-$VERSION.crate + echo "BUILD_WORKING_DIR=target/package/${{ matrix.crate.name }}-$VERSION" >> $GITHUB_ENV - name: Build env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc working-directory: ${{ env.BUILD_WORKING_DIR }} - run: cargo build --target-dir="$GITHUB_WORKSPACE/target" --package ${{ matrix.crate }} --features opt --release --target ${{ matrix.target }} + run: cargo build --target-dir="$GITHUB_WORKSPACE/target" --package ${{ matrix.crate.name }} --features opt --release --target ${{ matrix.target }} - name: Compress run: | cd target/${{ matrix.target }}/release - tar czvf $NAME.tar.gz stellar${{ matrix.ext }} soroban${{ matrix.ext }} + tar czvf $NAME.tar.gz ${{ matrix.crate.binary }}${{ matrix.ext }} - name: Upload to Artifacts uses: actions/upload-artifact@v3 with: