Skip to content

Commit

Permalink
Merge #590
Browse files Browse the repository at this point in the history
590: Run CI on a regular basis r=taiki-e a=taiki-e

Refs: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#onschedule

Co-authored-by: Taiki Endo <[email protected]>
  • Loading branch information
bors[bot] and taiki-e authored Nov 3, 2020
2 parents 220e690 + 453f5c7 commit a32a675
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: CI

on:
pull_request:
push:
branches:
- master
- staging
- trying
schedule:
- cron: '0 1 * * *'

env:
RUSTFLAGS: -Dwarnings
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -112,6 +115,7 @@ jobs:
if: github.event_name == 'push' && success()
needs:
- test
- features
- dependencies
- rustfmt
- clippy
Expand All @@ -124,6 +128,7 @@ jobs:
if: github.event_name == 'push' && !success()
needs:
- test
- features
- dependencies
- rustfmt
- clippy
Expand Down
3 changes: 1 addition & 2 deletions ci/check-features.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

cd "$(dirname "$0")"/..
set -ex

if [[ ! -x "$(command -v cargo-hack)" ]]; then
Expand All @@ -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
Expand Down

0 comments on commit a32a675

Please sign in to comment.