Skip to content

Commit

Permalink
fix skip package extraction for non-release binary builds
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Apr 26, 2024
1 parent b09704b commit 9129fc0
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,26 @@ jobs:
- run: rustup target add ${{ matrix.target }}
- if: matrix.target == 'aarch64-unknown-linux-gnu'
run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Setup Version and Name
- name: Setup vars
run: |
version="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "soroban-cli") | .version')"
echo "VERSION=${version}" >> $GITHUB_ENV
echo "NAME=soroban-cli-${version}-${{ matrix.target }}" >> $GITHUB_ENV
- name: Package
if: github.event_name == 'release'
run: cargo package --no-verify
- name: Build
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
- name: Package Extract
if: github.event_name == 'release'
run: |
cd target/package
tar xvfz soroban-cli-$VERSION.crate
cd soroban-cli-$VERSION
cargo build --target-dir=../.. --features opt --release --target ${{ matrix.target }}
echo "BUILD_WORKING_DIR=target/package/soroban-cli-$VERSION" >> $GITHUB_ENV
- name: Build
if: github.event_name == 'release'
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" --features opt --release --target ${{ matrix.target }}
- name: Compress
run: |
cd target/${{ matrix.target }}/release
Expand Down

0 comments on commit 9129fc0

Please sign in to comment.