CI #708
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
name: CI | |
permissions: | |
contents: read | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- dev | |
schedule: | |
- cron: '0 2 * * *' | |
workflow_dispatch: | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
CARGO_NET_RETRY: 10 | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
RUSTFLAGS: -D warnings | |
RUSTUP_MAX_RETRIES: 10 | |
CARGO_NO_DEV_DEPS_DENY_WARNINGS: 1 | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
deny: | |
uses: taiki-e/github-actions/.github/workflows/deny.yml@main | |
miri: | |
uses: taiki-e/github-actions/.github/workflows/miri.yml@main | |
msrv: | |
uses: taiki-e/github-actions/.github/workflows/msrv.yml@main | |
with: | |
event_name: ${{ github.event_name }} | |
release-dry-run: | |
uses: taiki-e/github-actions/.github/workflows/release-dry-run.yml@main | |
tidy: | |
uses: taiki-e/github-actions/.github/workflows/tidy.yml@main | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- rust: stable | |
- rust: beta | |
- rust: nightly | |
- rust: nightly | |
os: macos-latest | |
- rust: nightly | |
os: windows-latest | |
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | |
timeout-minutes: 60 | |
steps: | |
- uses: taiki-e/checkout-action@v1 | |
- name: Install Rust | |
run: rustup toolchain add ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} | |
- run: rustup toolchain add nightly --no-self-update | |
- uses: taiki-e/install-action@cargo-hack | |
- uses: taiki-e/install-action@cargo-minimal-versions | |
- run: cargo test --workspace --all-features | |
- run: cargo hack build --workspace --no-private --feature-powerset --no-dev-deps | |
- run: cargo minimal-versions build --workspace --no-private --detach-path-deps=skip-exact --all-features | |
- run: cargo minimal-versions build --workspace --no-private --detach-path-deps=skip-exact --all-features --direct | |
- run: cargo install -f --path . --debug | |
- run: cargo no-dev-deps check --workspace --all-features -v | |
- run: cargo no-dev-deps build --workspace --all-features -v | |
- run: | | |
set -eEuxo pipefail | |
git clone --depth 1 https://github.com/taiki-e/portable-atomic.git | |
cd portable-atomic | |
toolchain=1.34 | |
if [[ "${{ matrix.os }}" == "macos"* ]]; then | |
toolchain=1.54 # https://github.com/rust-lang/rust/issues/105167 | |
fi | |
rustup toolchain add "${toolchain}" --no-self-update | |
cargo +"${toolchain}" no-dev-deps build --all --no-private -v | |
if: startsWith(matrix.rust, 'nightly') | |
test-no-rustup: | |
name: test (no rustup) | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
container: alpine | |
steps: | |
- name: Install Rust | |
run: apk --no-cache add bash cargo | |
shell: sh | |
- uses: taiki-e/checkout-action@v1 | |
- run: cargo test --workspace --all-features | |
- run: cargo install -f --path . --debug | |
- run: cargo no-dev-deps check --workspace --all-features -v | |
- run: cargo no-dev-deps build --workspace --all-features -v |