Skip to content

Upgrade rand to 0.9.0 (#96) #193

Upgrade rand to 0.9.0 (#96)

Upgrade rand to 0.9.0 (#96) #193

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: Test (${{ matrix.label }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- label: linux, x86_64
target: x86_64-unknown-linux-gnu
toolchain: stable
os: ubuntu-latest
cache: linux-x86-64
- label: macos, aarch64
target: aarch64-apple-darwin
toolchain: stable
os: macos-latest
cache: macos-aarch64
- label: macos, x86_64
target: x86_64-apple-darwin
toolchain: stable
os: macos-latest
cache: macos-x86-64
- label: windows, x86_64
target: x86_64-pc-windows-msvc
toolchain: stable
os: windows-latest
cache: windows-x86-64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: dtolnay/rust-toolchain@master
with:
targets: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
- name: Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.cache }}
- name: Test
run: cargo test --target ${{ matrix.target }}
lint:
name: Lint
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: dtolnay/rust-toolchain@master
with:
targets: x86_64-unknown-linux-gnu
toolchain: stable
components: clippy, rustfmt
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Rustfmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy -- -D warnings