Skip to content

Merge pull request #298 from aegoroff/dependabot/cargo/url-eq-2.5.4 #936

Merge pull request #298 from aegoroff/dependabot/cargo/url-eq-2.5.4

Merge pull request #298 from aegoroff/dependabot/cargo/url-eq-2.5.4 #936

Workflow file for this run

name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [ linux, macos-x64, macos-arm64, windows ]
rust: [ stable ]
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-musl
- build: macos-x64
os: macos-latest
target: x86_64-apple-darwin
- build: macos-arm64
os: macos-latest
target: aarch64-apple-darwin
- build: windows
os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- name: Update rust
if: matrix.build == 'linux'
run: rustup update
- uses: actions/checkout@v4
- name: Rust version
run: rustup -V
- name: Build
uses: houseabsolute/actions-rust-cross@v0
with:
command: "build"
target: ${{ matrix.target }}
toolchain: ${{ matrix.rust }}
args: "--workspace --release"
strip: true
- name: Run cargo-tarpaulin
if: matrix.build == 'linux'
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.15.0'
args: '-- --test-threads 1'
- name: Upload to codecov.io
if: matrix.build == 'linux' && matrix.rust != 'nightly'
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run tests
if: matrix.build != 'linux'
uses: houseabsolute/actions-rust-cross@v0
with:
command: "test"
target: ${{ matrix.target }}
toolchain: ${{ matrix.rust }}
args: "--workspace --release"
- name: Setup linter
if: matrix.rust == 'nightly' || matrix.build != 'linux'
run: rustup component add clippy
- name: Run linter
if: matrix.rust == 'nightly' || matrix.build != 'linux'
run: cargo clippy -- -Dwarnings
- name: Run clippy-check
if: matrix.rust != 'nightly' && matrix.build == 'linux'
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --release -- -Dwarnings
- name: Run audit
if: matrix.rust != 'nightly' && matrix.build == 'linux'
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}