Skip to content

Commit

Permalink
Ensure warnings cause build failures in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmonday committed Apr 8, 2022
1 parent 6031469 commit bd14da4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Expand Up @@ -10,6 +10,7 @@ env:
CARGO_TERM_COLOR: always
PNET_FEATURES: travis pcap serde
PNET_MACROS_FEATURES: travis
VERBOSE: 1

jobs:
build-ubuntu:
Expand Down
8 changes: 6 additions & 2 deletions build.sh
Expand Up @@ -23,13 +23,13 @@ MACROS_WITH_SYNTEX=0
if [[ -n "$PNET_FEATURES" ]]; then
PNET_CARGO_FLAGS="--no-default-features --features \"$PNET_FEATURES\""
else
PNET_CARGO_FLAGS=
PNET_CARGO_FLAGS=""
fi

if [[ -n "$PNET_MACROS_FEATURES" ]]; then
PNET_MACROS_CARGO_FLAGS="--no-default-features --features \"$PNET_MACROS_FEATURES\""
else
PNET_MACROS_CARGO_FLAGS=
PNET_MACROS_CARGO_FLAGS=""
fi

# FIXME Need to get interface differently on Windows
Expand All @@ -38,6 +38,8 @@ IPROUTE2=$(which ip)

echo $PNET_MACROS_FEATURES | grep -q with-syntex && MACROS_WITH_SYNTEX=1

PNET_TEST_IFACE=""

if [[ -x "$IFCONFIG" ]]; then
PNET_TEST_IFACE=$($IFCONFIG | egrep 'UP| active' | \
perl -pe '/^[A-z0-9]+:([^\n]|\n\t)*status: active/' | \
Expand All @@ -60,6 +62,8 @@ if [[ -z "$PNET_TEST_IFACE" && "$SYSTEM" = "Linux" ]]; then
done
fi

set -euo pipefail

# FIXME Need to link libraries properly on Windows
build() {
if [[ -x "$CARGO" ]]; then
Expand Down

0 comments on commit bd14da4

Please sign in to comment.