Skip to content

drop no-std compatibility requirement in ci test, no source code chan… #240

drop no-std compatibility requirement in ci test, no source code chan…

drop no-std compatibility requirement in ci test, no source code chan… #240

Workflow file for this run

name: CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 141, Col: 9): Job 'ci-success' depends on unknown job 'no-std'.
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: test ${{ matrix.rust }} ${{ matrix.flags }}
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
actions: write
strategy:
fail-fast: false
matrix:
rust: ["stable", "nightly", "1.88"] # MSRV
flags: ["--no-default-features", "", "--all-features"]
exclude:
# Some features have higher MSRV.
- rust: "1.88" # MSRV
flags: "--all-features"
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
# Only run tests on latest stable and above
- name: Install cargo-nextest
if: ${{ matrix.rust != '1.88' }} # MSRV
uses: taiki-e/install-action@nextest
- name: build
if: ${{ matrix.rust == '1.88' }} # MSRV
run: cargo build --workspace ${{ matrix.flags }}
- name: test
if: ${{ matrix.rust != '1.88' }} # MSRV
run: cargo nextest run --workspace ${{ matrix.flags }}
doctest:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
actions: write
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo test --workspace --doc
- run: cargo test --all-features --workspace --doc
feature-checks:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
actions: write
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: cargo hack
run: cargo hack check --feature-powerset --depth 1
clippy:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
actions: write
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo clippy --workspace --all-targets --all-features
env:
RUSTFLAGS: -Dwarnings
docs:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
actions: write
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo doc --workspace --all-features --no-deps --document-private-items
env:
RUSTDOCFLAGS: --cfg docsrs -D warnings --show-type-layout --generate-link-to-definition --enable-index-page -Zunstable-options
fmt:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --all --check
deny:
uses: ithacaxyz/ci/.github/workflows/deny.yml@main
ci-success:
runs-on: ubuntu-latest
if: always()
permissions: {}
needs:
- test
- doctest
- no-std
- feature-checks
- clippy
- docs
- fmt
- deny
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}