-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emit build program name and version in CI
- Loading branch information
1 parent
64649bb
commit 20e5fdc
Showing
2 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,12 @@ jobs: | |
with: | ||
targets: ${{ matrix.target }} | ||
|
||
- name: Install Cross | ||
- name: Setup native compilation | ||
if: ${{ matrix.use-cross == false }} | ||
shell: bash | ||
echo "CARGO=cargo" >> $GITHUB_ENV | ||
|
||
- name: Setup cross compilation | ||
if: ${{ matrix.use-cross == true }} | ||
shell: bash | ||
run: | | ||
|
@@ -77,12 +82,13 @@ jobs: | |
curl -LO "https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-musl.tar.gz" | ||
tar xf cross-x86_64-unknown-linux-musl.tar.gz | ||
echo "CARGO=cross" >> $GITHUB_ENV | ||
echo "RUSTFLAGS='--cfg sd_cross_compile'" | ||
echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV | ||
echo "RUSTFLAGS='--cfg sd_cross_compile'" >> $GITHUB_ENV | ||
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV | ||
- name: Build | ||
run: | | ||
cargo build --release --locked | ||
$CARGO --version | ||
$CARGO build --release --locked --target ${{ matrix.target }} | ||
- name: Upload binaries to release | ||
uses: svenstaro/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters