ci: build with each feature, not all

This commit is contained in:
əlemi 2024-08-17 18:38:37 +02:00
parent 3a98178919
commit 417e6928cf
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 10 additions and 3 deletions

View file

@ -15,11 +15,17 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
features:
- rust
- lua
- java
- js
- python
toolchain: toolchain:
- stable - stable
# - beta # - beta
# - nightly # - nightly
# disable other toolchains to save on github runners # TODO should re-enable future toolchains so we get warnings on breaking changes
steps: steps:
- uses: arduino/setup-protoc@v2 - uses: arduino/setup-protoc@v2
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -27,5 +33,5 @@ jobs:
with: with:
ssh-private-key: ${{ secrets.ACTIONS_SSH_DEPLOY_KEY }} ssh-private-key: ${{ secrets.ACTIONS_SSH_DEPLOY_KEY }}
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --verbose --all-features - run: cargo build --verbose --features=${{ matrix.features }}
- run: cargo test --verbose --all-features - run: cargo test --verbose --features=${{ matrix.features }}

View file

@ -51,6 +51,7 @@ pyo3-build-config = { version = "0.19", optional = true }
[features] [features]
default = [] default = []
rust = [] # used for ci matrix
lua = ["mlua", "tracing-subscriber"] lua = ["mlua", "tracing-subscriber"]
java = ["lazy_static", "jni", "tracing-subscriber"] java = ["lazy_static", "jni", "tracing-subscriber"]
js = ["napi-build", "tracing-subscriber", "napi", "napi-derive"] js = ["napi-build", "tracing-subscriber", "napi", "napi-derive"]