aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml75
1 files changed, 40 insertions, 35 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6cd7fae..8a7da1d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,7 +8,7 @@ on:
- staging
- trying
schedule:
- - cron: '00 01 * * *'
+ - cron: '0 1 * * *'
env:
RUSTFLAGS: -Dwarnings
@@ -26,25 +26,22 @@ jobs:
rust:
# This is the minimum supported Rust version of this crate.
# When updating this, the reminder to update the minimum supported Rust version in README.md.
- - 1.34.0
- - 1.36.0
- 1.37.0
- stable
- beta
include:
- - os: ubuntu
+ - os: ubuntu-latest
rust: nightly
# pin-project itself has no platform-dependent implementation.
# macOS is only used to check that pin-project can interoperate
# correctly with `#[cfg()]`.
- - os: macos
+ - os: macos-latest
rust: nightly
- runs-on: ${{ matrix.os || 'ubuntu' }}-latest
+ runs-on: ${{ matrix.os || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v2
- name: Install Rust
- run: |
- . ./ci/install-rust.sh ${{ matrix.rust }}
+ run: ci/install-rust.sh ${{ matrix.rust }}
- name: Install cargo-hack
if: matrix.rust == 'nightly'
run: |
@@ -53,12 +50,7 @@ jobs:
if: matrix.rust == 'nightly'
run: |
rustup target add thumbv7m-none-eabi
- - name: cargo test --tests
- if: matrix.rust == '1.34.0' || matrix.rust == '1.36.0'
- run: |
- cargo test --all --all-features --exclude expandtest --tests
- name: cargo test
- if: matrix.rust != '1.34.0' && matrix.rust != '1.36.0'
run: |
cargo test --all --all-features --exclude expandtest
- name: cargo check (no-std)
@@ -69,37 +61,42 @@ jobs:
- name: cargo check (minimal versions)
if: matrix.rust == 'nightly'
run: |
- . ./ci/check-minimal-versions.sh
+ bash scripts/check-minimal-versions.sh
expandtest:
name: expandtest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - name: Install Rust
- run: |
- . ./ci/install-rust.sh
- - name: Install rustfmt
- run: |
- . ./ci/install-component.sh rustfmt
+ - name: Install Rust and Rustfmt
+ run: ci/install-component.sh rustfmt
- name: Install cargo-expand
run: |
cargo install cargo-expand
- name: cargo test (expandtest)
run: |
- cargo test --all-features --manifest-path tests/expand/Cargo.toml
+ bash scripts/expandtest.sh
- clippy:
- name: clippy
+ miri:
+ name: miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - name: Install Rust
+ - name: Install Rust and Miri
run: |
- . ./ci/install-rust.sh
- - name: Install clippy
+ ci/install-component.sh miri
+ cargo miri setup
+ - name: cargo miri test
run: |
- . ./ci/install-component.sh clippy
+ cargo miri test
+
+ clippy:
+ name: clippy
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install Rust and Clippy
+ run: ci/install-component.sh clippy
- name: cargo clippy
run: |
cargo clippy --all --all-features --all-targets
@@ -109,12 +106,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - name: Install Rust
- run: |
- . ./ci/install-rust.sh
- - name: Install rustfmt
- run: |
- . ./ci/install-component.sh rustfmt
+ - name: Install Rust and Rustfmt
+ run: ci/install-component.sh rustfmt
- name: cargo fmt --check
run: |
cargo fmt --all -- --check
@@ -127,12 +120,20 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install Rust
- run: |
- . ./ci/install-rust.sh
+ run: ci/install-rust.sh
- name: cargo doc
run: |
cargo doc --no-deps --all --all-features
+ shellcheck:
+ name: shellcheck
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: shellcheck
+ run: |
+ shellcheck ci/*.sh scripts/*.sh
+
# These jobs don't actually test anything, but they're used to tell bors the
# build completed, as there is no practical way to detect when a workflow is
# successful listening to webhooks only.
@@ -148,6 +149,8 @@ jobs:
- rustfmt
- rustdoc
- expandtest
+ - miri
+ - shellcheck
runs-on: ubuntu-latest
steps:
- name: Mark the job as a success
@@ -161,6 +164,8 @@ jobs:
- rustfmt
- rustdoc
- expandtest
+ - miri
+ - shellcheck
runs-on: ubuntu-latest
steps:
- name: Mark the job as a failure