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}} runs-on: ${{matrix.os}}
env: env:
RUSTFLAGS: "-D warnings" RUSTFLAGS: --deny warnings --codegen=target-feature=+crt-static
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

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