chore: build static binaries for Linux/Windows

Signed-off-by: Chris Gianelloni <cgianelloni@applause.com>
This commit is contained in:
Chris Gianelloni 2023-08-28 15:40:35 -04:00 committed by Kasey
parent 1715496d5b
commit 67986d9416
1 changed files with 11 additions and 0 deletions

View File

@ -90,12 +90,23 @@ jobs:
echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV
- name: Linux AMD setup
if: ${{ matrix.job.target == 'x86_64-unknown-linux-gnu' }}
run: |
echo "RUSTFLAGS='-C target-feature=+crt-static'" >> $GITHUB_ENV
- name: Linux ARM setup
if: ${{ matrix.job.target == 'aarch64-unknown-linux-gnu' }}
run: |
sudo apt-get update -y
sudo apt-get install -y gcc-aarch64-linux-gnu libssl-dev:armhf
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "RUSTFLAGS='-C target-feature=+crt-static'" >> $GITHUB_ENV
- name: Windows setup
if: ${{ matrix.job.os == 'windows-latest' }}
run: |
echo "RUSTFLAGS='-C target-feature=+crt-static'" >> $GITHUB_ENV
- name: Build binaries
uses: actions-rs/cargo@v1