Skip to content

provide for cargo afl, but it is not complete. #2457

provide for cargo afl, but it is not complete.

provide for cargo afl, but it is not complete. #2457

Workflow file for this run

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
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:
# TODO: nightly-2023-04-27 (https://github.com/rust-lang/rust/pull/97368)
# and nightly-2023-05-03 (https://github.com/rust-lang/rust/pull/111042)
# fixed bugs in report generation, so the latest report is not the
# same as the old report.
# - rust: '1.60'
- rust: stable
- rust: beta
- rust: nightly
- rust: nightly
os: macos-11
- rust: nightly
os: windows-2019
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
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
- uses: taiki-e/install-action@nextest
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >>"${GITHUB_ENV}"
if: startsWith(matrix.os, 'windows')
- run: cargo test --workspace --all-features
# TODO: move this test to tests/test.rs
- run: cargo install --path . --debug
- run: |
set -eEuxo pipefail
cargo llvm-cov nextest --text --fail-under-lines 50
cargo llvm-cov nextest --text --fail-under-lines 50 --profile default --cargo-profile dev
cargo llvm-cov nextest --text --fail-under-lines 50 --profile ci
cargo llvm-cov nextest --text --fail-under-lines 50 --profile ci --cargo-profile dev
cd ../real1
cargo llvm-cov nextest-archive --archive-file a.tar.zst
cargo llvm-cov nextest --archive-file a.tar.zst --text --fail-under-lines 70
rm a.tar.zst
cargo clean
cargo llvm-cov nextest-archive --archive-file a.tar.zst --release
cargo llvm-cov nextest --archive-file a.tar.zst --text --fail-under-lines 70
rm a.tar.zst
cargo clean
cargo llvm-cov nextest-archive --archive-file a.tar.zst --cargo-profile custom
cargo llvm-cov nextest --archive-file a.tar.zst --text --fail-under-lines 70
rm a.tar.zst
cargo clean
host=$(rustc -Vv | grep host | sed 's/host: //')
cargo llvm-cov nextest-archive --archive-file a.tar.zst --target "${host}"
cargo llvm-cov nextest --archive-file a.tar.zst --text --fail-under-lines 70
working-directory: tests/fixtures/crates/bin_crate
- run: |
set -eEuxo pipefail
git clone https://github.com/taiki-e/easytime.git
cd easytime
git checkout 7ecb6e6
cargo llvm-cov test --doctests --text --fail-under-lines 30
# Test minimum runnable Cargo version.
rustup toolchain add 1.60 --no-self-update
cargo +1.60 llvm-cov test --text --fail-under-lines 30
cd ..
# Test trybuild compatibility.
git clone --depth 1 https://github.com/taiki-e/easy-ext.git
cd easy-ext
cargo llvm-cov --text --test compiletest --fail-under-lines 70
if: startsWith(matrix.rust, 'nightly')
- 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