feat(serde): add serde_with support for serialization #207
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: Rust | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
complete: | |
if: always() | |
needs: [fmt, build-and-test, publish-dry-run] | |
runs-on: ubuntu-latest | |
steps: | |
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') | |
run: exit 1 | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: rustup update stable && rustup default stable | |
- run: find . -type f -name '*.rs' -print0 | xargs -I {} -0 rustfmt --check "{}" | |
build-and-test: | |
strategy: | |
matrix: | |
rust: [msrv, latest] | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: stellar/actions/rust-cache@main | |
- name: Use the minimum supported Rust version | |
if: matrix.rust == 'msrv' | |
run: | | |
msrv="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages | map(.rust_version) | map(values) | min')" | |
rustup override set $msrv | |
rustup component add clippy --toolchain $msrv | |
- name: Error on warnings and clippy checks | |
# Only error on warnings and checks for the msrv, because new versions of | |
# Rust will frequently add new warnings and checks. | |
if: matrix.rust == 'msrv' | |
run: echo RUSTFLAGS='-Dwarnings' >> $GITHUB_ENV | |
- run: rustup update | |
- run: cargo version | |
- uses: stellar/binaries@v30 | |
with: | |
name: cargo-hack | |
version: 0.5.28 | |
- run: cargo-hack hack build --feature-powerset --target ${{ matrix.target }} | |
- run: cargo-hack hack test --feature-powerset --target ${{ matrix.target }} | |
publish-dry-run: | |
if: startsWith(github.head_ref, 'release/') | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
uses: stellar/actions/.github/workflows/rust-publish-dry-run.yml@main | |
with: | |
runs-on: ${{ matrix.os }} | |
target: ${{ matrix.target }} |