Skip to content

Commit b0bfba2

Browse files
committed
test features
1 parent bd703e3 commit b0bfba2

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,22 @@ jobs:
2323
# Temporary hack as long as we use the current CI script
2424
TRAVIS_OS_NAME: [linux]
2525

26+
FEATURES: []
27+
2628
include:
2729
# Test MSRV
2830
- rust: 1.40.0
2931
VENDOR: Nordic
3032
TARGET: x86_64-unknown-linux-gnu
3133
TRAVIS_OS_NAME: linux
3234

35+
# Test features
36+
- rust: 1.51.0
37+
VENDOR: RISC-V
38+
TARGET: x86_64-unknown-linux-gnu
39+
TRAVIS_OS_NAME: linux
40+
FEATURES: strict,const-generic
41+
3342
# Use nightly for architectures which don't support stable
3443
- rust: nightly
3544
experimental: true
@@ -64,4 +73,4 @@ jobs:
6473
override: true
6574
components: rustfmt
6675
- name: Run CI script for ${{ matrix.VENDOR }} under ${{ matrix.rust }}
67-
run: TARGET=${{ matrix.TARGET }} VENDOR=${{ matrix.VENDOR }} TRAVIS_OS_NAME=${{ matrix.TRAVIS_OS_NAME }} bash ci/script.sh
76+
run: TARGET=${{ matrix.TARGET }} VENDOR=${{ matrix.VENDOR }} TRAVIS_OS_NAME=${{ matrix.TRAVIS_OS_NAME }} FEATURES=${{ matrix.FEATURES }} bash ci/script.sh

ci/script.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ main() {
5555
return
5656
fi
5757

58-
cargo build --target $TARGET --release
58+
if [ -n ${FEATURES-} ]; then
59+
cargo build --target $TARGET --release --features $FEATURES
60+
else
61+
cargo build --target $TARGET --release
62+
fi
5963

6064
case $TRAVIS_OS_NAME in
6165
linux)

0 commit comments

Comments
 (0)