Use cargo build
instead of cargo rustc
(#993)
This commit is contained in:
parent
9512eb403b
commit
6157436dcd
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
@ -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
|
||||
|
15
bin/package
15
bin/package
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user