Serializer mutable adapter #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate code and build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
validate-code: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
id: cache | |
with: | |
path: | | |
~/.cargo | |
~/.rustup | |
key: toolchain-x86_64-unknown-linux-gnu-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: rustfmt, clippy | |
override: true | |
- name: Run cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Annotate commit with clippy warnings | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-targets --all-features -- -D warnings | |
- name: Security audit | |
uses: actions-rs/audit-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
build: | |
needs: validate-code | |
name: Cargo build & test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
use-cross: false | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
use-cross: false | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
cross: false | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo | |
~/.rustup | |
key: toolchain-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
target: ${{ matrix.target }} | |
override: true | |
- name: Run cargo build | |
uses: actions-rs/cargo@v1 | |
with: | |
use-cross: ${{ matrix.use-cross }} | |
command: build | |
args: --target=${{ matrix.target }} --all-features | |
- name: Run cargo test | |
uses: actions-rs/cargo@v1 | |
with: | |
use-cross: ${{ matrix.use-cross }} | |
command: test | |
args: --target=${{ matrix.target }} --all-features -- --test-threads=1 |