1
+
2
+ name : Tests
3
+
4
+ on :
5
+ push :
6
+ branches : 0.1
7
+ pull_request :
8
+ branches : 0.1
9
+ schedule :
10
+ - cron : " 0 12 * * 1"
11
+
12
+ env :
13
+ CARGO_INCREMENTAL : 0
14
+ RUSTFLAGS : " -Dwarnings"
15
+
16
+ jobs :
17
+ # check-doc:
18
+ # name: Doc deadlinks
19
+ # runs-on: ubuntu-latest
20
+ # steps:
21
+ # - uses: actions/checkout@v2
22
+ # - name: Install toolchain
23
+ # uses: actions-rs/toolchain@v1
24
+ # with:
25
+ # profile: minimal
26
+ # toolchain: nightly
27
+ # override: true
28
+ # - run: cargo install cargo-deadlinks
29
+ # - run: cargo deadlinks -- --features custom
30
+
31
+ # main-tests:
32
+ # name: Main tests
33
+ # runs-on: ${{ matrix.os }}
34
+ # strategy:
35
+ # matrix:
36
+ # os: [ubuntu-latest, macos-latest, windows-latest]
37
+ # toolchain: [nightly, beta, stable, 1.34]
38
+ # steps:
39
+ # - uses: actions/checkout@v2
40
+ # - name: Install toolchain
41
+ # uses: actions-rs/toolchain@v1
42
+ # with:
43
+ # profile: minimal
44
+ # toolchain: ${{ matrix.toolchain }}
45
+ # override: true
46
+ # - run: cargo test
47
+ # - run: cargo test --features std
48
+ # - if: ${{ matrix.toolchain == 'nightly' }}
49
+ # run: cargo build --benches
50
+
51
+ # linux-tests:
52
+ # name: Additional Linux targets
53
+ # runs-on: ubuntu-latest
54
+ # strategy:
55
+ # matrix:
56
+ # target: [
57
+ # x86_64-unknown-linux-musl,
58
+ # i686-unknown-linux-gnu,
59
+ # i686-unknown-linux-musl,
60
+ # ]
61
+ # steps:
62
+ # - uses: actions/checkout@v2
63
+ # - name: Install toolchain
64
+ # uses: actions-rs/toolchain@v1
65
+ # with:
66
+ # profile: minimal
67
+ # target: ${{ matrix.target }}
68
+ # toolchain: stable
69
+ # override: true
70
+ # # update is needed to fix the 404 error on install, see:
71
+ # # https://github.com/actions/virtual-environments/issues/675
72
+ # - run: sudo apt-get update
73
+ # - run: sudo apt-get install gcc-multilib
74
+ # - run: cargo test --target ${{ matrix.target }}
75
+
76
+ # windows-tests:
77
+ # name: Additional Windows targets
78
+ # runs-on: windows-latest
79
+ # strategy:
80
+ # matrix:
81
+ # toolchain: [
82
+ # stable-x86_64-gnu,
83
+ # stable-i686-gnu,
84
+ # stable-i686-msvc,
85
+ # ]
86
+ # steps:
87
+ # - uses: actions/checkout@v2
88
+ # - name: Install toolchain
89
+ # uses: actions-rs/toolchain@v1
90
+ # with:
91
+ # profile: minimal
92
+ # toolchain: ${{ matrix.toolchain }}
93
+ # override: true
94
+ # - run: cargo test
95
+
96
+ # cross-tests:
97
+ # name: Cross tests
98
+ # runs-on: ${{ matrix.os }}
99
+ # strategy:
100
+ # matrix:
101
+ # include:
102
+ # - os: ubuntu-latest
103
+ # target: mips-unknown-linux-gnu
104
+ # toolchain: stable
105
+ # steps:
106
+ # - uses: actions/checkout@v2
107
+ # - name: Install toolchain
108
+ # uses: actions-rs/toolchain@v1
109
+ # with:
110
+ # profile: minimal
111
+ # target: ${{ matrix.target }}
112
+ # toolchain: ${{ matrix.toolchain }}
113
+ # override: true
114
+ # - name: Cache cargo plugins
115
+ # uses: actions/cache@v1
116
+ # with:
117
+ # path: ~/.cargo/bin/
118
+ # key: ${{ runner.os }}-cargo-plugins
119
+ # - name: Install cross
120
+ # run: cargo install cross || true
121
+ # - name: Test
122
+ # run: cross test --no-fail-fast --target ${{ matrix.target }}
123
+
124
+ # build:
125
+ # name: Build-only
126
+ # runs-on: ubuntu-latest
127
+ # strategy:
128
+ # matrix:
129
+ # target: [
130
+ # x86_64-sun-solaris,
131
+ # x86_64-unknown-freebsd,
132
+ # x86_64-fuchsia,
133
+ # x86_64-unknown-netbsd,
134
+ # x86_64-unknown-redox,
135
+ # x86_64-fortanix-unknown-sgx,
136
+ # ]
137
+ # steps:
138
+ # - uses: actions/checkout@v2
139
+ # - name: Install toolchain
140
+ # uses: actions-rs/toolchain@v1
141
+ # with:
142
+ # profile: minimal
143
+ # target: ${{ matrix.target }}
144
+ # toolchain: nightly
145
+ # override: true
146
+ # - name: Build
147
+ # run: cargo build --target ${{ matrix.target }}
148
+
149
+ # build-rdrand:
150
+ # name: Build-only RDRAND
151
+ # runs-on: ubuntu-latest
152
+ # steps:
153
+ # - uses: actions/checkout@v2
154
+ # - name: Install toolchain
155
+ # uses: actions-rs/toolchain@v1
156
+ # with:
157
+ # profile: minimal
158
+ # toolchain: nightly
159
+ # components: rust-src
160
+ # override: true
161
+ # - name: Cache cargo plugins
162
+ # uses: actions/cache@v1
163
+ # with:
164
+ # path: ~/.cargo/bin/
165
+ # key: ${{ runner.os }}-cargo-plugins
166
+ # - name: Install xbuild
167
+ # run: cargo install cargo-xbuild || true
168
+ # - name: UEFI
169
+ # run: cargo xbuild --features=rdrand --target x86_64-unknown-uefi
170
+ # - name: Hermit
171
+ # run: cargo xbuild --features=rdrand --target x86_64-unknown-hermit
172
+ # - name: L4Re
173
+ # run: cargo xbuild --features=rdrand --target x86_64-unknown-l4re-uclibc
174
+ # - name: VxWorks
175
+ # run: cargo xbuild --features=rdrand --target x86_64-wrs-vxworks
176
+
177
+ clippy-fmt :
178
+ name : Clippy + rustfmt
179
+ runs-on : ubuntu-latest
180
+ steps :
181
+ - uses : actions/checkout@v1
182
+ - uses : actions-rs/toolchain@v1
183
+ with :
184
+ profile : minimal
185
+ toolchain : nightly
186
+ components : rustfmt, clippy
187
+ - name : clippy
188
+ run : cargo clippy --all
189
+ - name : fmt
190
+ run : cargo fmt --all -- --check
0 commit comments