wip #560
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
name: CI | |
permissions: | |
contents: read | |
on: | |
pull_request: | |
push: | |
branches: | |
- taiki-e/ci | |
schedule: | |
- cron: '0 2 * * 0' | |
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 | |
RUSTDOCFLAGS: -D warnings | |
RUSTUP_MAX_RETRIES: 10 | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [''] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
rust: [nightly, beta, stable] | |
include: | |
- os: windows-latest | |
rust: nightly-x86_64-pc-windows-gnu | |
- os: windows-latest | |
rust: nightly-i686-pc-windows-msvc | |
- os: windows-latest | |
rust: nightly-i686-pc-windows-gnu | |
- os: ubuntu-latest | |
rust: nightly | |
target: arm-linux-androideabi@21 # epoll_create1 requires API level 21+ | |
- os: ubuntu-latest | |
rust: nightly | |
target: x86_64-pc-windows-gnu # Wine | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe. | |
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- uses: taiki-e/setup-cross-toolchain-action@more | |
with: | |
target: ${{ matrix.target }} | |
if: matrix.target != '' | |
- run: cargo build --all --all-features --all-targets | |
- run: cargo test | |
- run: cargo hack build --feature-powerset --no-dev-deps | |
# Android and Windows are tested in test job. | |
# BSDs are tested in Cirrus CI. | |
cross: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
run: rustup update stable | |
- name: Install Targets | |
run: rustup target add aarch64-apple-ios x86_64-unknown-linux-gnux32 x86_64-unknown-fuchsia x86_64-unknown-illumos | |
- name: iOS | |
run: cargo build --target aarch64-apple-ios | |
- name: Linux x32 | |
run: cargo build --target x86_64-unknown-linux-gnux32 | |
- name: Fuchsia | |
run: cargo build --target x86_64-unknown-fuchsia | |
- name: illumos | |
run: cargo build --target x86_64-unknown-illumos | |
msrv: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
# When updating this, the reminder to update the minimum supported | |
# Rust version in Cargo.toml. | |
rust: ['1.63'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe. | |
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} | |
- run: cargo build | |
- name: Install Other Targets | |
if: startsWith(matrix.os, 'ubuntu') | |
run: rustup target add x86_64-unknown-freebsd x86_64-unknown-netbsd | |
- run: cargo build --target x86_64-unknown-freebsd | |
if: startsWith(matrix.os, 'ubuntu') | |
- run: cargo build --target x86_64-unknown-netbsd | |
if: startsWith(matrix.os, 'ubuntu') | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
run: rustup update stable | |
- run: cargo clippy --all-features --all-targets | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
run: rustup update stable | |
- run: cargo fmt --all --check | |
security_audit: | |
permissions: | |
checks: write | |
contents: read | |
issues: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# https://github.com/rustsec/audit-check/issues/2 | |
- uses: rustsec/audit-check@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} |