Skip to content

Commit

Permalink
Pass rustflags consistently
Browse files Browse the repository at this point in the history
type: fixed
  • Loading branch information
casey committed Oct 12, 2021
1 parent b82ccf1 commit 6c48058
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
runs-on: ${{matrix.os}}

env:
RUSTFLAGS: "-D warnings"
RUSTFLAGS: --deny warnings

steps:
- uses: actions/checkout@v2
Expand Down
17 changes: 7 additions & 10 deletions bin/package
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@ case $os in
;;
esac

case $os in
ubuntu-latest | macos-latest)
cargo rustc --bin $bin --target $target --release
executable=target/$target/release/$bin
;;
windows-latest)
cargo rustc --bin $bin --target $target --release -- -C target-feature="+crt-static"
executable=target/$target/release/$bin.exe
;;
esac
export RUSTFLAGS='--deny warnings --codegen target-feature=+crt-static'
cargo build --bin $bin --target $target --release
executable=target/$target/release/$bin

if [[ $os == windows-2016 ]]; then
executable=$executable.exe
fi

echo "Building completions..."
cargo run --package gen -- --bin $executable completion-scripts
Expand Down

0 comments on commit 6c48058

Please sign in to comment.