Debian Codegraph @

.cargo/vendor/serde_json/.github/workflows/ci.yml

raw
1 name: CI
2
3 on:
4 push:
5 pull_request:
6 workflow_dispatch:
7 schedule: [cron: "40 1 * * *"]
8
9 permissions:
10 contents: read
11
12 env:
13 RUSTFLAGS: -Dwarnings
14
15 jobs:
16 test:
17 name: Rust nightly ${{matrix.os == 'windows' && '(windows)' || ''}}
18 runs-on: ${{matrix.os}}-latest
19 strategy:
20 fail-fast: false
21 matrix:
22 os: [ubuntu, windows]
23 timeout-minutes: 45
24 steps:
25 - uses: actions/checkout@v4
26 - uses: dtolnay/rust-toolchain@nightly
27 - run: cargo test
28 - run: cargo test --features preserve_order --tests -- --skip ui --exact
29 - run: cargo test --features float_roundtrip --tests -- --skip ui --exact
30 - run: cargo test --features arbitrary_precision --tests -- --skip ui --exact
31 - run: cargo test --features float_roundtrip,arbitrary_precision --tests -- --skip ui --exact
32 - run: cargo test --features raw_value --tests -- --skip ui --exact
33 - run: cargo test --features unbounded_depth --tests -- --skip ui --exact
34
35 build:
36 name: Rust ${{matrix.rust}} ${{matrix.os == 'windows' && '(windows)' || ''}}
37 runs-on: ${{matrix.os}}-latest
38 strategy:
39 fail-fast: false
40 matrix:
41 rust: [beta, 1.64.0, 1.56.1]
42 os: [ubuntu]
43 include:
44 - rust: stable
45 os: ubuntu
46 target: aarch64-unknown-none
47 - rust: stable
48 os: windows
49 timeout-minutes: 45
50 steps:
51 - uses: actions/checkout@v4
52 - uses: dtolnay/rust-toolchain@master
53 with:
54 toolchain: ${{matrix.rust}}
55 targets: ${{matrix.target}}
56 - run: cargo check --manifest-path tests/crate/Cargo.toml
57 - run: cargo check --manifest-path tests/crate/Cargo.toml --features float_roundtrip
58 - run: cargo check --manifest-path tests/crate/Cargo.toml --features arbitrary_precision
59 - run: cargo check --manifest-path tests/crate/Cargo.toml --features raw_value
60 - run: cargo check --manifest-path tests/crate/Cargo.toml --features unbounded_depth
61 - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc
62 - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,arbitrary_precision
63 - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,raw_value
64 - run: cargo check --manifest-path tests/crate/Cargo.toml --features serde_json/preserve_order
65 if: matrix.rust != '1.56.1'
66 - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,serde_json/preserve_order
67 if: matrix.rust != '1.56.1'
68 - name: Build without std
69 run: cargo check --manifest-path tests/crate/Cargo.toml --target ${{matrix.target}} --no-default-features --features alloc
70 if: matrix.target
71
72 minimal:
73 name: Minimal versions
74 runs-on: ubuntu-latest
75 timeout-minutes: 45
76 steps:
77 - uses: actions/checkout@v4
78 - uses: dtolnay/rust-toolchain@nightly
79 - run: cargo generate-lockfile -Z minimal-versions
80 - run: cargo check --locked
81
82 miri:
83 name: Miri
84 runs-on: ubuntu-latest
85 env:
86 MIRIFLAGS: -Zmiri-strict-provenance
87 timeout-minutes: 45
88 steps:
89 - uses: actions/checkout@v4
90 - uses: dtolnay/rust-toolchain@miri
91 - run: cargo miri setup
92 - run: cargo miri test
93 - run: cargo miri test --features preserve_order,float_roundtrip,arbitrary_precision,raw_value
94
95 clippy:
96 name: Clippy
97 runs-on: ubuntu-latest
98 if: github.event_name != 'pull_request'
99 timeout-minutes: 45
100 steps:
101 - uses: actions/checkout@v4
102 - uses: dtolnay/rust-toolchain@clippy
103 - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
104 - run: cargo clippy --all-features --tests -- -Dclippy::all -Dclippy::pedantic
105
106 doc:
107 name: Documentation
108 runs-on: ubuntu-latest
109 timeout-minutes: 45
110 env:
111 RUSTDOCFLAGS: -Dwarnings
112 steps:
113 - uses: actions/checkout@v4
114 - uses: dtolnay/rust-toolchain@nightly
115 - uses: dtolnay/install@cargo-docs-rs
116 - run: cargo docs-rs
117
118 fuzz:
119 name: Fuzz
120 runs-on: ubuntu-latest
121 timeout-minutes: 45
122 steps:
123 - uses: actions/checkout@v4
124 - uses: dtolnay/rust-toolchain@nightly
125 - uses: dtolnay/install@cargo-fuzz
126 - run: cargo fuzz check
127
128 outdated:
129 name: Outdated
130 runs-on: ubuntu-latest
131 if: github.event_name != 'pull_request'
132 timeout-minutes: 45
133 steps:
134 - uses: actions/checkout@v4
135 - uses: dtolnay/rust-toolchain@stable
136 - uses: dtolnay/install@cargo-outdated
137 - run: cargo outdated --exit-code 1
138 - run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1