Debian Codegraph @

.cargo/vendor/smallvec/.github/workflows/main.yml

raw
1 name: CI
2
3 on:
4 push:
5 branches: [v1]
6 pull_request:
7 workflow_dispatch:
8 merge_group:
9 types: [checks_requested]
10
11 jobs:
12 ci:
13 name: Build/Test
14 strategy:
15 matrix:
16 toolchain: ["stable", "beta", "nightly", "1.36.0"]
17 os: [ubuntu-latest]
18 include:
19 - toolchain: stable
20 fuzz: 1
21 - toolchain: beta
22 fuzz: 1
23 - os: windows-latest
24 toolchain: nightly
25
26 runs-on: ${{ matrix.os }}
27
28 steps:
29 - uses: actions/checkout@v4
30
31 - name: Install packages for fuzzing
32 if: runner.os == 'Linux' && matrix.fuzz == 1
33 run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev
34
35 - name: Install toolchain
36 uses: dtolnay/rust-toolchain@master
37 with:
38 toolchain: ${{ matrix.toolchain }}
39
40 - name: Cargo build
41 run: cargo build --verbose
42
43 - name: Cargo test
44 if: matrix.toolchain != '1.36.0'
45 run: cargo test --verbose
46
47 - name: Cargo test w/ serde
48 if: matrix.toolchain != '1.36.0'
49 run: cargo test --verbose --features serde
50
51 - name: Cargo check w/o default features
52 if: matrix.toolchain == 'nightly'
53 run: cargo check --verbose --no-default-features
54
55 - name: Cargo test w/ union
56 if: matrix.toolchain == 'beta'
57 run: cargo test --verbose --features union
58
59 - name: Cargo test w/ debugger_visualizer
60 if: matrix.toolchain == 'nightly'
61 run: cargo test --test debugger_visualizer --verbose --features debugger_visualizer -- --test-threads=1
62
63 - name: Cargo test w/ debugger_visualizer and union
64 if: matrix.toolchain == 'nightly'
65 run: cargo test --test debugger_visualizer --verbose --features 'debugger_visualizer,union' -- --test-threads=1
66
67 - name: Cargo test all features
68 if: matrix.toolchain == 'nightly'
69 run: cargo test --verbose --all-features
70
71 - name: Cargo bench
72 if: matrix.toolchain == 'nightly'
73 run: cargo bench --verbose bench
74
75 - name: miri
76 if: matrix.toolchain == 'nightly' && matrix.os == 'ubuntu-latest'
77 run: bash ./scripts/run_miri.sh
78
79 - name: fuzz
80 if: matrix.fuzz == 1
81 working-directory: fuzz
82 run: ./travis-fuzz.sh
83
84 no-std:
85 name: no_std
86 runs-on: ubuntu-latest
87 steps:
88 - uses: actions/checkout@v4
89 - name: Install toolchain
90 uses: dtolnay/rust-toolchain@master
91 with:
92 toolchain: stable
93 target: thumbv7m-none-eabi
94 - name: Cargo build
95 run: cargo build --verbose
96
97 build_result:
98 name: Result
99 runs-on: ubuntu-latest
100 needs:
101 - "ci"
102 - "no-std"
103
104 steps:
105 - name: Mark the job as successful
106 run: exit 0
107 if: success()
108 - name: Mark the job as unsuccessful
109 run: exit 1
110 if: "!success()"