Skip to content

Commit b9d6e3b

Browse files
committed
Add CI job to do cargo check for multiple feature combination
1 parent 239e227 commit b9d6e3b

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

.github/workflows/ci.yml

+12-14
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ on:
44
push:
55
branches: [main]
66
paths:
7-
- '**.rs'
8-
- '**.toml'
7+
- "**.rs"
8+
- "**.toml"
99
pull_request:
1010
branches: [main]
1111
paths:
12-
- '**.rs'
13-
- '**.toml'
12+
- "**.rs"
13+
- "**.toml"
1414

1515
env:
1616
CARGO_TERM_COLOR: always
1717

1818
jobs:
1919
# Currently there are no unit tests in this repository, so ignore this job
2020
# While example are tested in `check-examples.yml`
21-
#
21+
#
2222
# Run cargo test
2323
# test:
2424
# name: Test Suite
@@ -34,22 +34,20 @@ jobs:
3434
# - name: Run cargo test
3535
# run: cargo test --tests --features full
3636

37-
cargo_check:
38-
name: Cargo Check
39-
strategy:
40-
matrix:
41-
feature: [full, bot, http, rich_presence]
42-
runs-on: ubuntu-latest
43-
timeout-minutes: 30
37+
cargo_combination_check:
38+
name: Cargo Combination Check
39+
runs-on: macos-latest
4440
steps:
4541
- name: Checkout sources
4642
uses: actions/checkout@v4
4743
- name: Install stable toolchain
4844
uses: rs-workspace/rust-toolchain@v0.2.0
4945
- name: Install Dependencies
5046
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
51-
- name: Run cargo test
52-
run: cargo check --features ${{ matrix.feature }}
47+
- name: Install cargo-feature-combinations
48+
run: cargo install cargo-feature-combinations
49+
- name: Run cargo fc check
50+
run: cargo fc check
5351

5452
# Run cargo clippy
5553
clippy_check:

Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ async-trait = { version = "0.1", optional = true }
4040
bevy = "0.15"
4141
serde_json = "1"
4242

43+
[package.metadata.cargo-feature-combinations]
44+
skip_feature_sets = [["bot", "docsrs"]]
45+
denylist = ["default", "full", "bot_cache", "rich_presence_local_testing"]
46+
4347
[package.metadata.docs.rs]
4448
all-features = true
4549
rustdoc-args = ["--cfg", "docsrs"]

0 commit comments

Comments
 (0)