Skip to content

feat: make the crate fully compatible with stable Rust #45

feat: make the crate fully compatible with stable Rust

feat: make the crate fully compatible with stable Rust #45

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
tags-ignore: [v*]
pull_request:
branches: [develop]
jobs:
lint:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy
rustflags: ""
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo check
run: cargo check --all-targets --all-features
- name: Run cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
build:
name: Build
needs: [lint]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- name: Run cargo build
run: cargo build --all-features
- name: Run cargo test
run: cargo test --all-features
build-target:
name: Build on ${{ matrix.os }} for ${{ matrix.target }} target
needs: [lint]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-latest
target: x86_64-apple-ios
- os: macos-latest
target: aarch64-apple-ios
- os: windows-latest
target: x86_64-pc-windows-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-latest
target: i686-pc-windows-gnu
- os: windows-latest
target: i686-pc-windows-msvc
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
- os: ubuntu-latest
target: i686-unknown-linux-gnu
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: aarch64-linux-android
- os: ubuntu-latest
target: armv7-linux-androideabi
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}
rustflags: ""
- name: Run cargo build
run: cargo build --all-features --target ${{ matrix.target }}
- name: Run cargo test
run: cargo test --all-features --target ${{ matrix.target }}
coverage:
name: Code coverage
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: 0.22.0
args: --all-features
- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./cobertura.xml
fail_ci_if_error: true
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: cobertura.xml