check individual features in CI
This commit is contained in:
12
.github/workflows/check_features.sh
vendored
Executable file
12
.github/workflows/check_features.sh
vendored
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Checking all feature at once"
|
||||||
|
cargo check -q --all-targets --all-features "$@"
|
||||||
|
|
||||||
|
features=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name = "scryer-prolog") | .features | keys | join(" ")')
|
||||||
|
|
||||||
|
for feature in ${features} ; do
|
||||||
|
echo "Checking feature ${feature} in isolation"
|
||||||
|
cargo check -q --all-targets --no-default-features --features=${feature} "$@"
|
||||||
|
done
|
||||||
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@@ -53,10 +53,10 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# operating systems
|
# operating systems
|
||||||
- { os: windows-latest, rust-version: stable, target: 'x86_64-pc-windows-msvc', publish: true }
|
- { os: windows-latest, rust-version: stable, target: 'x86_64-pc-windows-msvc', publish: true, check-features: true }
|
||||||
- { os: macos-latest, rust-version: stable, target: 'x86_64-apple-darwin', publish: true }
|
- { os: macos-latest, rust-version: stable, target: 'x86_64-apple-darwin', publish: true, check-features: true }
|
||||||
# architectures
|
# architectures
|
||||||
- { os: ubuntu-22.04, rust-version: stable, target: 'x86_64-unknown-linux-gnu', publish: true }
|
- { os: ubuntu-22.04, rust-version: stable, target: 'x86_64-unknown-linux-gnu', publish: true, check-features: true }
|
||||||
- { os: ubuntu-22.04, rust-version: stable, target: 'i686-unknown-linux-gnu', publish: true }
|
- { os: ubuntu-22.04, rust-version: stable, target: 'i686-unknown-linux-gnu', publish: true }
|
||||||
# FIXME(issue #2138): run wasm tests, failing to run since https://github.com/mthom/scryer-prolog/pull/2137 removed wasm-pack
|
# FIXME(issue #2138): run wasm tests, failing to run since https://github.com/mthom/scryer-prolog/pull/2137 removed wasm-pack
|
||||||
- { os: ubuntu-22.04, rust-version: nightly, target: 'wasm32-unknown-unknown', publish: true, args: '--no-default-features' , test-args: '--no-run --no-default-features', use_swap: true }
|
- { os: ubuntu-22.04, rust-version: nightly, target: 'wasm32-unknown-unknown', publish: true, args: '--no-default-features' , test-args: '--no-run --no-default-features', use_swap: true }
|
||||||
@@ -88,9 +88,14 @@ jobs:
|
|||||||
# Build and test.
|
# Build and test.
|
||||||
- name: Build library
|
- name: Build library
|
||||||
run: cargo build --all-targets --target ${{ matrix.target }} ${{ matrix.args }} --verbose
|
run: cargo build --all-targets --target ${{ matrix.target }} ${{ matrix.args }} --verbose
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cargo test --target ${{ matrix.target }} ${{ matrix.test-args }} --all
|
run: cargo test --target ${{ matrix.target }} ${{ matrix.test-args }} --all
|
||||||
|
|
||||||
|
- name: Check features
|
||||||
|
if: matrix.check-features
|
||||||
|
run: bash ./.github/workflows/check_features.sh --target ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Check miri
|
- name: Check miri
|
||||||
if: matrix.miri
|
if: matrix.miri
|
||||||
run: cargo miri test --target ${{ matrix.target }} ${{ matrix.args }}
|
run: cargo miri test --target ${{ matrix.target }} ${{ matrix.args }}
|
||||||
|
|||||||
Reference in New Issue
Block a user