diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b5532391..e9ddd0b69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,5 @@ name: CI + on: pull_request: push: @@ -6,6 +7,8 @@ on: - master - staging - trying + schedule: + - cron: '0 1 * * *' env: RUSTFLAGS: -Dwarnings @@ -46,8 +49,8 @@ jobs: run: ./ci/${{ matrix.crates }}.sh # Check all feature combinations works properly. - check-features: - name: check-features + features: + name: features env: RUST_VERSION: ${{ matrix.rust }} strategy: @@ -66,7 +69,7 @@ jobs: rustup target add thumbv7m-none-eabi rustup target add thumbv6m-none-eabi - name: Check features - run: . ./ci/check-features.sh + run: ./ci/check-features.sh # Check for duplicate dependencies. dependencies: @@ -112,6 +115,7 @@ jobs: if: github.event_name == 'push' && success() needs: - test + - features - dependencies - rustfmt - clippy @@ -124,6 +128,7 @@ jobs: if: github.event_name == 'push' && !success() needs: - test + - features - dependencies - rustfmt - clippy diff --git a/ci/check-features.sh b/ci/check-features.sh index cf3ef5a50..fa19a1d0e 100755 --- a/ci/check-features.sh +++ b/ci/check-features.sh @@ -1,5 +1,6 @@ #!/bin/bash +cd "$(dirname "$0")"/.. set -ex if [[ ! -x "$(command -v cargo-hack)" ]]; then @@ -16,8 +17,6 @@ if [[ "$RUST_VERSION" != "nightly"* ]]; then else # On nightly, all feature combinations should work. cargo hack check --all --feature-powerset --no-dev-deps --exclude benchmarks - # TODO(taiki-e): if https://github.com/taiki-e/cargo-hack/issues/42 merged, remove this. - cargo hack check --all --all-features --no-dev-deps --exclude benchmarks # Check for no_std environment. cargo hack check --all --feature-powerset --no-dev-deps --exclude benchmarks --target thumbv7m-none-eabi --skip std,default