Skip to content

Alpha.1

Alpha.1 #38

Workflow file for this run

name: ci
on:
pull_request:
paths-ignore:
- '.github/**'
- 'README.md'
push:
branches: ['master']
paths-ignore:
- '.github/**'
- 'README.md'
schedule:
- cron: "25 1 * * 6"
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: 1G
SCCACHE_GHA_ENABLED: "true"
concurrency:
# Support push/pr as event types with different behaviors each:
# 1. push: queue up builds
# 2. pr: only allow one run per PR
group: ${{ github.workflow }}-${{ github.event.type }}${{ github.event.pull_request.number }}
# If there is already a workflow running for the same pull request, cancel it
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
os-and-rust-matrix:
name: "[${{ matrix.os }} ${{ matrix.toolchain }}] ${{ matrix.cargo.name }}"
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
toolchain:
- stable
cargo:
- name: "Clippy (all features)"
cmd: clippy
args: --all-features -- -D clippy::all
cache: {}
components: "clippy"
- name: "Clippy (openssl feature)"
cmd: clippy
args: --no-default-features --features openssl -- -D clippy::all
cache: {}
components: "clippy"
- name: "Formatting"
cmd: fmt
args: -- --check
cache: {}
components: "rustfmt"
- name: "Unit Tests (all features)"
cmd: test
args: --all-features
cache: { shared-key: "tests" }
components: ''
- name: "Unit Tests (openssl feature)"
cmd: test
args: --no-default-features --features openssl
cache: { shared-key: "tests-openssl" }
components: ''
steps:
# Checkout code
- name: "Git checkout"
uses: actions/checkout@v6
# Install Rust toolchain
- name: "Install Rust ${{ matrix.toolchain }}"
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
components: ${{ matrix.cargo.components }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with: ${{ matrix.cargo.cache }}
continue-on-error: false
- name: Run sccache-cache
if: matrix.os == 'ubuntu-latest'
uses: mozilla-actions/sccache-action@v0.0.9
- name: "Task ${{ matrix.cargo.name }}"
shell: bash
run: cargo ${{ matrix.cargo.cmd }} ${{ matrix.cargo.args }}
- name: Run sccache stats for check
shell: bash
run: ${SCCACHE_PATH} --show-stats
command-matrix:
name: Run ${{ matrix.cargo.command }}
runs-on: 'ubuntu-latest'
strategy:
fail-fast: true
matrix:
cargo:
- command: cargo msrv verify --ignore-lockfile
package: cargo-msrv
package-version: '~0.18'
- command: cargo audit --deny warnings
package: cargo-audit
package-version: '~0.22'
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
- name: Rust Cache
uses: Swatinem/rust-cache@v2
continue-on-error: false
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Install cargo-msrv from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: ${{ matrix.cargo.package }}
version: ${{ matrix.cargo.package-version }}
- name: Run command
shell: bash
run: ${{ matrix.cargo.command }}