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}}
|
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
|
||||||
|
15
bin/package
15
bin/package
@ -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
|
||||||
case $os in
|
|
||||||
ubuntu-latest | macos-latest)
|
|
||||||
cargo rustc --bin $bin --target $target --release
|
|
||||||
executable=target/$target/release/$bin
|
executable=target/$target/release/$bin
|
||||||
;;
|
|
||||||
windows-2016)
|
if [[ $os == windows-2016 ]]; then
|
||||||
cargo rustc --bin $bin --target $target --release -- -C target-feature="+crt-static"
|
executable=$executable.exe
|
||||||
executable=target/$target/release/$bin.exe
|
fi
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo "Copying release files..."
|
echo "Copying release files..."
|
||||||
mkdir dist
|
mkdir dist
|
||||||
|
Loading…
Reference in New Issue
Block a user