File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,15 @@ matrix:
15
15
- env : TARGET=powerpc64-unknown-linux-gnu
16
16
- env : TARGET=powerpc64le-unknown-linux-gnu
17
17
- env : TARGET=x86_64-unknown-linux-gnu
18
+ - env : TARGET=cargo-fmt
19
+ rust : beta
18
20
19
21
before_install : set -e
20
22
21
23
install :
22
24
- bash ci/install.sh
23
25
24
26
script :
25
- # code must be already formatted
26
- - cargo fmt -- --check
27
27
- bash ci/script.sh
28
28
29
29
after_script : set +e
Original file line number Diff line number Diff line change 1
1
set -euxo pipefail
2
2
3
3
main () {
4
+ if [ $TARGET = cargo-fmt ]; then
5
+ rustup component add rustfmt-preview
6
+ return
7
+ fi
8
+
4
9
if ! hash cross > /dev/null 2>&1 ; then
5
10
cargo install cross
6
11
fi
7
12
8
- rustup component add rustfmt-preview
9
-
10
13
rustup target add x86_64-unknown-linux-musl
11
14
12
15
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
Original file line number Diff line number Diff line change 1
1
set -euxo pipefail
2
2
3
3
main () {
4
+ if [ $TARGET = cargo-fmt ]; then
5
+ cargo fmt -- --check
6
+ return
7
+ fi
8
+
4
9
# quick check
5
10
cargo check
6
11
You can’t perform that action at this time.
0 commit comments