@@ -29,21 +29,42 @@ jobs:
29
29
shell : bash
30
30
31
31
- run : |
32
- case ${{ matrix.os }} in
33
- macos-latest)
32
+ case ${{ matrix.os }} in
33
+ ubuntu-latest)
34
+ if [[ "${{ matrix.linux-target }}" == "musl" ]]; then
35
+ sudo apt-get update
36
+ sudo apt-get -y install musl-tools musl-dev
37
+
38
+ mkdir -p ${HOME}/.cargo
39
+ echo '[target.x86_64-unknown-linux-${{ matrix.linux-target }}]' > ${HOME}/.cargo/config.toml
40
+ echo 'linker = "musl-gcc"' >> ${HOME}/.cargo/config.toml
41
+ fi
42
+
43
+ rustup add target x86_64-unknown-linux-${{ matrix.linux-target }}
44
+ rustup toolchain install nightly-x86_64-unknown-linux-${{ matrix.linux-target }} --force-non-host
45
+ rustup toolchain install nightly-x86_64-unknown-linux-${{ matrix.linux-target }} --force-non-host --component rustfmt
46
+ ;;
47
+ *)
48
+ rustup toolchain install nightly
34
49
rustup toolchain install nightly --component rustfmt
35
50
;;
51
+ esac
52
+ shell: bash
53
+ - run : |
54
+ case ${{ matrix.os }} in
36
55
ubuntu-latest)
37
- rustup toolchain install nightly --component rustfmt --target x86_64-unknown-linux-${{ matrix.linux-target }}
56
+ cargo +nightly-x86_64-unknown-linux-${{ matrix.linux-target }} fmt --all -- --check
57
+ ;;
58
+ *)
59
+ cargo +nightly fmt --all -- --check
38
60
;;
39
61
esac
40
- - run : cargo +nightly fmt --all -- --check
41
62
42
63
# the "runc" and "containerd-shim" crates have `sync` code that is not covered by the workspace
43
64
- run : cargo check -p runc --all-targets
44
65
- run : cargo clippy -p runc --all-targets -- -D warnings
45
66
- run : cargo check -p containerd-shim --all-targets
46
- - run : cargo clippy -p containerd-shim --all-targets -- -D warnings
67
+ - run : cargo clippy -p containerd-shim --all-targets -- -D warnings
47
68
48
69
# check the workspace
49
70
- run : cargo check --examples --tests --all-targets
0 commit comments