From 7b751d4e0c0352b954b767eded3b9758fe2cbde1 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 3 Nov 2020 21:54:41 +0900 Subject: [PATCH 1/2] Run CI on a regular basis --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b5532391..502b5ffb3 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 From 453f5c7c5a1682aa3ee449a6d946dfe86fc4222d Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 3 Nov 2020 22:01:39 +0900 Subject: [PATCH 2/2] Fix features check --- .github/workflows/ci.yml | 8 +++++--- ci/check-features.sh | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 502b5ffb3..e9ddd0b69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,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: @@ -69,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: @@ -115,6 +115,7 @@ jobs: if: github.event_name == 'push' && success() needs: - test + - features - dependencies - rustfmt - clippy @@ -127,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