Skip to content

v1.0.10

v1.0.10 #18

Workflow file for this run

name: Tests and release
on:
push:
branches:
- "**"
tags:
- "v*"
pull_request:
env:
RUST_BACKTRACE: 1
jobs:
sanity-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Check if Cargo.lock is up-to-date
run: cargo check --locked
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
run: cargo clippy --all-targets --all-features -- --deny warnings
- name: Install cargo-msrv
run: cargo install cargo-msrv --all-features
- name: Check MSRV
run: cargo msrv verify
tests:
needs: sanity-checks
name: "${{ matrix.platform.target }} / ${{ matrix.toolchain }}"
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
- os: ubuntu-20.04
target: aarch64-unknown-linux-musl
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: macOS-latest
target: x86_64-apple-darwin
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Install musl-tools on Linux
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools
if: contains(matrix.platform.target, 'musl')
- name: Build library
uses: houseabsolute/actions-rust-cross@v0
with:
command: "build"
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.toolchain }}
args: "--locked"
- name: Run tests
uses: houseabsolute/actions-rust-cross@v0
with:
command: "test"
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.toolchain }}
args: "--locked --no-fail-fast"
if: ${{ !matrix.platform.skip_tests }}
release:
needs: tests
runs-on: ubuntu-latest
steps:
- name: Publish GitHub release
uses: softprops/action-gh-release@v1
with:
draft: true
if: startsWith( github.ref, 'refs/tags/v' )