Skip to content

Commit 3df6d9e

Browse files
committed
ci: also build unstable feature
I forget this during the refactoring. :D
1 parent 0cd0937 commit 3df6d9e

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

.github/workflows/_build-rust.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,22 @@ on:
1717
required: false
1818
default: x86_64-unknown-linux-gnu
1919
description: Rust target for the build step. Clippy and tests are still executed with the default target.
20+
features:
21+
type: string
22+
required: false
23+
# Make sure we always an empty string to "--features <FEATURES>"
24+
default: '""'
25+
description: Comma-separated String with additional Rust features relevant for a certain job.
2026
do-style-check:
2127
type: boolean
2228
required: false
2329
default: true
24-
description: Whether style checks should be done.
30+
description: Perform code and doc style checks.
2531
do-test:
2632
type: boolean
2733
required: false
2834
default: true
29-
description: Whether tests should be executed.
35+
description: Execute tests.
3036

3137
jobs:
3238
check_rust:
@@ -57,20 +63,20 @@ jobs:
5763
restore-keys: ${{ runner.os }}-cargo-${{ inputs.rust-version }}
5864
- run: cargo version
5965
- name: Build (library)
60-
run: cargo build --target ${{ inputs.rust-target }}
66+
run: cargo build --target ${{ inputs.rust-target }} --features ${{ inputs.features }}
6167
- name: Build (all targets)
62-
run: cargo build --all-targets
68+
run: cargo build --all-targets --features ${{ inputs.features }}
6369
- name: Code Formatting
6470
if: ${{ inputs.do-style-check }}
6571
run: cargo fmt --all -- --check
6672
- name: Code Style and Doc Style
6773
if: ${{ inputs.do-style-check }}
6874
run: |
69-
cargo doc --document-private-items
70-
cargo clippy --all-targets
75+
cargo doc --document-private-items --features ${{ inputs.features }}
76+
cargo clippy --all-targets --features ${{ inputs.features }}
7177
- name: Unit Test
7278
if: ${{ inputs.do-test }}
7379
run: |
7480
curl -LsSf https://get.nexte.st/latest/linux | tar zxf -
7581
chmod u+x cargo-nextest
76-
./cargo-nextest nextest run
82+
./cargo-nextest nextest run --features ${{ inputs.features }}

.github/workflows/rust.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515
CARGO_TERM_COLOR: always
1616

1717
jobs:
18+
### Regular Build #########################
1819
build_msrv:
1920
name: build (msrv)
2021
uses: ./.github/workflows/_build-rust.yml
@@ -35,7 +36,9 @@ jobs:
3536
with:
3637
rust-version: nightly
3738
do-style-check: false
39+
features: unstable
3840

41+
### no-std Build #########################
3942
build_nostd_msrv:
4043
name: build no_std (msrv)
4144
needs: build_msrv
@@ -62,7 +65,9 @@ jobs:
6265
rust-version: nightly
6366
do-style-check: false
6467
rust-target: thumbv7em-none-eabihf
68+
features: unstable
6569

70+
### Style Checks + Doc #####################
6671
style_msrv:
6772
name: style (msrv)
6873
needs: build_msrv
@@ -89,3 +94,4 @@ jobs:
8994
rust-version: nightly
9095
do-style-check: true
9196
do-test: false
97+
features: unstable

0 commit comments

Comments
 (0)