Skip to content

Commit

Permalink
Put one binary in each tar
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed May 31, 2024
1 parent 16eab54 commit 8b7bcf8
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 8b7bcf8

Please sign in to comment.