Skip to content

Commit 80d6e4a

Browse files
committed
Test all feature combos on travis, added build script.
1 parent 5238b56 commit 80d6e4a

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ before_script:
77

88
script:
99
- cargo fmt -- --write-mode=diff
10-
- cargo build --features nightly
10+
- ./scripts/build-all.sh
1111
- cargo test --features nightly
1212
- cargo bench --features nightly
1313

scripts/build-all.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
SOURCE_DIR=$(readlink -f "${BASH_SOURCE[0]}")
4+
SOURCE_DIR=$(dirname "$SOURCE_DIR")
5+
cd "${SOURCE_DIR}/.."
6+
7+
if [[ ${1:-} = "-i" ]]; then
8+
INTERACTIVE=true
9+
fi
10+
11+
ALL_FEATURES="
12+
async
13+
sync
14+
sync-ssl
15+
async-ssl
16+
async sync
17+
async sync-ssl
18+
sync async-ssl
19+
sync-ssl async-ssl"
20+
21+
while read FEATS; do
22+
if [[ ${INTERACTIVE:-} ]]; then
23+
cargo build --no-default-features --features "$FEATS" \
24+
--color always 2>&1 | less -r
25+
else
26+
set -x
27+
cargo build --no-default-features --features "$FEATS"
28+
set +x
29+
fi
30+
done < <(echo "$ALL_FEATURES")
31+
32+
## all combs of features (lol)
33+
# async
34+
# sync
35+
# sync-ssl
36+
# async-ssl
37+
# async sync
38+
# async sync-ssl
39+
# async async-ssl
40+
# sync sync-ssl
41+
# sync async-ssl
42+
# sync-ssl async-ssl
43+
# async sync sync-ssl
44+
# async sync async-ssl
45+
# async sync-ssl async-ssl
46+
# sync sync-ssl async-ssl
47+
# async sync sync-ssl async-ssl

0 commit comments

Comments
 (0)