fix: restore static binary builds

Signed-off-by: Chris Gianelloni <cgianelloni@applause.com>
This commit is contained in:
Chris Gianelloni 2023-09-20 15:16:42 -04:00 committed by Lucas
parent 5b018b7c07
commit ecc5769c64
2 changed files with 14 additions and 1 deletions

View File

@ -90,12 +90,23 @@ jobs:
echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $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 - name: Linux ARM setup
if: ${{ matrix.job.target == 'aarch64-unknown-linux-gnu' }} if: ${{ matrix.job.target == 'aarch64-unknown-linux-gnu' }}
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y gcc-aarch64-linux-gnu libssl-dev:armhf 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 "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 - name: Build binaries
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1

View File

@ -15,7 +15,9 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Build - name: Build
run: cargo build --verbose --workspace run: cargo build --verbose --workspace --target x86_64-unknown-linux-gnu
env:
RUSTFLAGS: -C target-feature=+crt-static
- name: Run unit tests - name: Run unit tests
run: cargo test --verbose --workspace run: cargo test --verbose --workspace
- name: Run examples - name: Run examples