Use cargo build instead of cargo rustc (#993)

This commit is contained in:
Casey Rodarmor 2021-10-11 17:16:30 -07:00 committed by GitHub
parent 9512eb403b
commit 6157436dcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 11 deletions

View File

@ -42,7 +42,7 @@ jobs:
runs-on: ${{matrix.os}}
env:
RUSTFLAGS: "-D warnings"
RUSTFLAGS: --deny warnings --codegen=target-feature=+crt-static
steps:
- uses: actions/checkout@v2

View File

@ -14,17 +14,12 @@ echo "Packaging $bin $version for $target..."
test -f Cargo.lock || cargo generate-lockfile
echo "Building $bin..."
cargo build --bin $bin --target $target --release
executable=target/$target/release/$bin
case $os in
ubuntu-latest | macos-latest)
cargo rustc --bin $bin --target $target --release
executable=target/$target/release/$bin
;;
windows-2016)
cargo rustc --bin $bin --target $target --release -- -C target-feature="+crt-static"
executable=target/$target/release/$bin.exe
;;
esac
if [[ $os == windows-2016 ]]; then
executable=$executable.exe
fi
echo "Copying release files..."
mkdir dist