2020-05-05 13:33:56 -05:00
|
|
|
name: CI
|
2020-05-03 03:46:11 -05:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
2023-06-24 00:50:52 -05:00
|
|
|
workflow_dispatch:
|
2020-05-03 03:46:11 -05:00
|
|
|
schedule: [cron: "40 1 * * *"]
|
|
|
|
|
2022-09-02 10:43:23 -05:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-01-01 13:52:55 -06:00
|
|
|
env:
|
|
|
|
RUSTFLAGS: -Dwarnings
|
|
|
|
|
2020-05-03 03:46:11 -05:00
|
|
|
jobs:
|
2020-05-05 18:39:32 -05:00
|
|
|
test:
|
|
|
|
name: Test suite
|
|
|
|
runs-on: ubuntu-latest
|
2022-11-25 20:56:19 -06:00
|
|
|
timeout-minutes: 45
|
2020-05-05 18:39:32 -05:00
|
|
|
steps:
|
2022-04-24 21:06:18 -05:00
|
|
|
- uses: actions/checkout@v3
|
2020-05-05 18:39:32 -05:00
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
|
|
- run: cd test_suite && cargo test --features unstable
|
|
|
|
|
2020-05-05 18:51:54 -05:00
|
|
|
windows:
|
|
|
|
name: Test suite (windows)
|
|
|
|
runs-on: windows-latest
|
2022-11-25 20:56:19 -06:00
|
|
|
timeout-minutes: 45
|
2020-05-05 18:51:54 -05:00
|
|
|
steps:
|
2022-04-24 21:06:18 -05:00
|
|
|
- uses: actions/checkout@v3
|
2020-05-05 18:51:54 -05:00
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
|
|
- run: cd test_suite && cargo test --features unstable -- --skip ui --exact
|
|
|
|
|
2020-05-03 03:46:11 -05:00
|
|
|
stable:
|
2021-04-19 21:54:56 -05:00
|
|
|
name: Rust ${{matrix.rust}}
|
2020-05-03 03:46:11 -05:00
|
|
|
runs-on: ubuntu-latest
|
2021-04-19 21:54:56 -05:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
rust: [stable, beta]
|
2022-11-25 20:56:19 -06:00
|
|
|
timeout-minutes: 45
|
2020-05-03 03:46:11 -05:00
|
|
|
steps:
|
2022-04-24 21:06:18 -05:00
|
|
|
- uses: actions/checkout@v3
|
2021-04-19 21:54:56 -05:00
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
|
|
with:
|
|
|
|
toolchain: ${{matrix.rust}}
|
2020-05-03 03:46:11 -05:00
|
|
|
- run: cd serde && cargo build --features rc
|
|
|
|
- run: cd serde && cargo build --no-default-features
|
|
|
|
|
|
|
|
nightly:
|
2020-05-05 18:51:54 -05:00
|
|
|
name: Rust nightly ${{matrix.os == 'windows' && '(windows)' || ''}}
|
|
|
|
runs-on: ${{matrix.os}}-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu, windows]
|
2022-11-25 20:56:19 -06:00
|
|
|
timeout-minutes: 45
|
2020-05-03 03:46:11 -05:00
|
|
|
steps:
|
2022-04-24 21:06:18 -05:00
|
|
|
- uses: actions/checkout@v3
|
2020-05-03 03:46:11 -05:00
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
|
|
- run: cd serde && cargo build
|
|
|
|
- run: cd serde && cargo build --no-default-features
|
|
|
|
- run: cd serde && cargo build --no-default-features --features alloc
|
|
|
|
- run: cd serde && cargo build --no-default-features --features rc,alloc
|
2023-07-28 18:00:07 -05:00
|
|
|
- run: cd serde && cargo build --no-default-features --features unstable
|
2020-05-03 03:46:11 -05:00
|
|
|
- run: cd serde && cargo test --features derive,rc,unstable
|
|
|
|
- run: cd test_suite/no_std && cargo build
|
2020-05-05 18:51:54 -05:00
|
|
|
if: matrix.os != 'windows'
|
2022-03-28 12:07:23 -05:00
|
|
|
- run: cd serde_derive && cargo check --tests
|
|
|
|
env:
|
|
|
|
RUSTFLAGS: --cfg exhaustive ${{env.RUSTFLAGS}}
|
|
|
|
if: matrix.os != 'windows'
|
2020-05-03 03:46:11 -05:00
|
|
|
|
|
|
|
build:
|
2023-07-30 22:59:38 -05:00
|
|
|
name: Rust 1.34.0
|
2020-05-03 03:46:11 -05:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-25 20:56:19 -06:00
|
|
|
timeout-minutes: 45
|
2020-05-03 03:46:11 -05:00
|
|
|
steps:
|
2022-04-24 21:06:18 -05:00
|
|
|
- uses: actions/checkout@v3
|
2023-07-30 22:59:38 -05:00
|
|
|
- uses: dtolnay/rust-toolchain@1.34.0
|
2023-01-12 23:13:14 -06:00
|
|
|
- run: cd serde && cargo build --features rc
|
2020-05-03 03:46:11 -05:00
|
|
|
- run: cd serde && cargo build --no-default-features
|
|
|
|
- run: cd serde && cargo build
|
|
|
|
|
|
|
|
more:
|
2023-07-30 23:05:06 -05:00
|
|
|
name: Rust 1.28.0
|
2020-05-03 03:46:11 -05:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-25 20:56:19 -06:00
|
|
|
timeout-minutes: 45
|
2020-05-03 03:46:11 -05:00
|
|
|
steps:
|
2022-04-24 21:06:18 -05:00
|
|
|
- uses: actions/checkout@v3
|
2023-07-30 23:05:06 -05:00
|
|
|
- uses: dtolnay/rust-toolchain@1.28.0
|
2020-05-03 03:46:11 -05:00
|
|
|
# Work around failing to parse manifest because editions are unstable.
|
|
|
|
- run: sed -i /test_suite/d Cargo.toml
|
|
|
|
- run: cd serde && cargo build --no-default-features
|
|
|
|
- run: cd serde && cargo build
|
|
|
|
|
2020-05-10 00:35:08 -05:00
|
|
|
derive:
|
2023-03-16 01:44:08 -05:00
|
|
|
name: Rust 1.56.0
|
2020-05-10 00:35:08 -05:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-25 20:56:19 -06:00
|
|
|
timeout-minutes: 45
|
2020-05-10 00:35:08 -05:00
|
|
|
steps:
|
2022-04-24 21:06:18 -05:00
|
|
|
- uses: actions/checkout@v3
|
2023-03-16 01:44:08 -05:00
|
|
|
- uses: dtolnay/rust-toolchain@1.56.0
|
2021-01-24 22:42:20 -06:00
|
|
|
- run: cd serde && cargo check --no-default-features
|
|
|
|
- run: cd serde && cargo check
|
2020-05-10 00:35:08 -05:00
|
|
|
- run: cd serde_derive && cargo check
|
2023-07-26 03:03:17 -05:00
|
|
|
- run: cd precompiled/serde_derive && cargo check
|
2020-05-10 00:35:08 -05:00
|
|
|
|
2020-05-03 03:46:11 -05:00
|
|
|
alloc:
|
|
|
|
name: Rust 1.36.0
|
|
|
|
runs-on: ubuntu-latest
|
2022-11-25 20:56:19 -06:00
|
|
|
timeout-minutes: 45
|
2020-05-03 03:46:11 -05:00
|
|
|
steps:
|
2022-04-24 21:06:18 -05:00
|
|
|
- uses: actions/checkout@v3
|
2020-05-03 03:46:11 -05:00
|
|
|
- uses: dtolnay/rust-toolchain@1.36.0
|
|
|
|
- run: cd serde && cargo build --no-default-features --features alloc
|
|
|
|
|
2023-07-30 19:45:24 -05:00
|
|
|
precompiled:
|
|
|
|
name: Precompiled
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 45
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
|
|
with:
|
|
|
|
components: rust-src
|
|
|
|
targets: x86_64-unknown-linux-musl
|
|
|
|
- run: precompiled/build.sh
|
|
|
|
- name: replace serde_derive dependency with precompiled
|
|
|
|
run: |
|
|
|
|
# FIXME: consider using `cargo rm serde_derive` but it's currently broken
|
|
|
|
# https://github.com/rust-lang/cargo/issues/12419
|
|
|
|
sed -i '/serde_derive =/d' serde/Cargo.toml
|
|
|
|
sed -i '/derive = \["serde_derive"\]/d' serde/Cargo.toml
|
|
|
|
sed -i '/"serde_derive"/d' Cargo.toml
|
|
|
|
sed -i '/\[workspace\]/d' precompiled/serde_derive/Cargo.toml
|
|
|
|
cargo add --dev serde_derive --path precompiled/serde_derive --manifest-path test_suite/Cargo.toml
|
|
|
|
git diff
|
|
|
|
- run: cd test_suite && cargo test --features unstable -- --skip ui --exact
|
|
|
|
|
2023-07-26 03:03:17 -05:00
|
|
|
macos:
|
|
|
|
name: macOS
|
|
|
|
runs-on: macos-latest
|
|
|
|
timeout-minutes: 45
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- run: cd precompiled/serde_derive && cargo check
|
|
|
|
|
2023-07-05 12:01:33 -05:00
|
|
|
minimal:
|
|
|
|
name: Minimal versions
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 45
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
|
|
- run: cargo generate-lockfile -Z minimal-versions
|
|
|
|
- run: cargo check --locked --workspace
|
|
|
|
|
2020-05-06 00:09:29 -05:00
|
|
|
clippy:
|
2020-05-06 03:53:58 -05:00
|
|
|
name: Clippy
|
2020-05-06 00:09:29 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.event_name != 'pull_request'
|
2022-11-25 20:56:19 -06:00
|
|
|
timeout-minutes: 45
|
2020-05-06 00:09:29 -05:00
|
|
|
steps:
|
2022-04-24 21:06:18 -05:00
|
|
|
- uses: actions/checkout@v3
|
2020-05-06 00:09:29 -05:00
|
|
|
- uses: dtolnay/rust-toolchain@clippy
|
2022-11-22 21:04:23 -06:00
|
|
|
- run: cd serde && cargo clippy --features rc,unstable -- -Dclippy::all -Dclippy::pedantic
|
2021-11-04 22:08:43 -05:00
|
|
|
- run: cd serde_derive && cargo clippy -- -Dclippy::all -Dclippy::pedantic
|
|
|
|
- run: cd serde_derive_internals && cargo clippy -- -Dclippy::all -Dclippy::pedantic
|
2022-11-22 21:04:23 -06:00
|
|
|
- run: cd test_suite && cargo clippy --tests --features unstable -- -Dclippy::all -Dclippy::pedantic
|
2021-11-04 22:23:25 -05:00
|
|
|
- run: cd test_suite/no_std && cargo clippy -- -Dclippy::all -Dclippy::pedantic
|
2022-04-28 22:43:03 -05:00
|
|
|
|
|
|
|
miri:
|
|
|
|
name: Miri
|
|
|
|
runs-on: ubuntu-latest
|
2022-11-25 20:56:19 -06:00
|
|
|
timeout-minutes: 45
|
2022-04-28 22:43:03 -05:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@miri
|
2023-05-23 10:29:47 -05:00
|
|
|
- run: cargo miri setup
|
2022-04-28 22:43:03 -05:00
|
|
|
- run: cd serde && cargo miri test --features derive,rc,unstable
|
|
|
|
env:
|
2022-05-06 06:01:35 -05:00
|
|
|
MIRIFLAGS: -Zmiri-strict-provenance
|
2022-04-28 22:43:03 -05:00
|
|
|
- run: cd test_suite && cargo miri test --features unstable
|
|
|
|
env:
|
2022-05-06 06:01:35 -05:00
|
|
|
MIRIFLAGS: -Zmiri-strict-provenance
|
2022-06-06 17:59:23 -05:00
|
|
|
|
|
|
|
outdated:
|
|
|
|
name: Outdated
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.event_name != 'pull_request'
|
2022-11-25 20:56:19 -06:00
|
|
|
timeout-minutes: 45
|
2022-06-06 17:59:23 -05:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/install@cargo-outdated
|
2023-01-14 14:08:12 -06:00
|
|
|
- run: cargo outdated --workspace --exit-code 1
|