[4/n] [daft-derive] produce ::core instead of ::std #212
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
name: CI | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | |
- name: Install just, cargo-hack, and cargo-sync-rdme | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: just,cargo-hack,cargo-sync-rdme | |
- name: Lint (clippy) | |
run: just powerset clippy --all-targets | |
- name: Lint (rustfmt) | |
run: cargo xfmt --check | |
- name: Run rustdoc | |
run: just rustdoc | |
- name: Install nightly toolchain for cargo-sync-rdme | |
uses: dtolnay/rust-toolchain@nightly | |
- name: Regenerate readmes | |
run: just generate-readmes | |
- name: Check for differences | |
run: git diff --exit-code | |
build-and-test: | |
name: Build and test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
fail-fast: false | |
env: | |
RUSTFLAGS: -D warnings | |
CARGO_TERM_COLOR: always | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4 | |
- name: Install toolchain in rust-toolchain.toml | |
# GitHub Actions has an older rustup as of 2025-03-07 which doesn't accept | |
# `rustup toolchain install` with no arguments. Update rustup first. | |
run: rustup self update && rustup toolchain install | |
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2 | |
- uses: taiki-e/install-action@cargo-hack | |
- uses: taiki-e/install-action@just | |
- uses: taiki-e/install-action@nextest | |
- name: Build | |
run: just powerset build | |
- name: Run tests | |
run: just powerset nextest run | |
- name: Doctests | |
run: just powerset test --doc | |
build-and-test-msrv: | |
name: Build and test (MSRV) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
# 1.81 is the MSRV | |
rust-version: ["1.81"] | |
fail-fast: false | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-version }} | |
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2 | |
- uses: taiki-e/install-action@cargo-hack | |
- uses: taiki-e/install-action@just | |
- uses: taiki-e/install-action@nextest | |
- name: Build | |
run: just powerset build | |
# We don't run ui_test on the MSRV since compiler output varies by version. | |
- name: Test without ui_test | |
run: just powerset nextest run -E 'not binary(ui_test)' | |
- name: Doctests | |
run: just powerset test --doc |