-
Notifications
You must be signed in to change notification settings - Fork 68
71 lines (64 loc) · 2.03 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Rust
on:
push:
branches: '*'
pull_request:
branches: [ master ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
CI:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64, ppc64le, riscv64, s390x]
steps:
- uses: actions/checkout@v3
- name: Cache cargo
uses: Swatinem/[email protected]
with:
cache-on-failure: true
key: ${{ runner.os }}-cargo-${{ matrix.arch }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: build and check
run: |
declare -A rust_target_map=( ["amd64"]="x86_64-unknown-linux-musl" ["arm64"]="aarch64-unknown-linux-musl" ["ppc64le"]="powerpc64le-unknown-linux-gnu" ["riscv64"]="riscv64gc-unknown-linux-gnu" ["s390x"]="s390x-unknown-linux-gnu")
RUST_TARGET=${rust_target_map[${{ matrix.arch }}]}
cargo install --version 0.2.4 cross
rustup component add rustfmt clippy
make -e RUST_TARGET=$RUST_TARGET -e CARGO=cross check
- name: smoke
if: ${{ matrix.arch == 'amd64' }}
run: |
echo user_allow_other | sudo tee --append /etc/fuse.conf
CARGO_HOME=${HOME}/.cargo
CARGO_BIN=$(which cargo)
sudo -E CARGO=${CARGO_BIN} make test
sudo -E CARGO=${CARGO_BIN} make smoke-all
sudo chown -R $(id -u):$(id -g) "${HOME}/.cargo"
Macos-CI:
runs-on: macos-latest
steps:
- name: Install macfuse
run: |
brew install --cask macfuse
wget https://github.com/macos-fuse-t/fuse-t/releases/download/1.0.24/fuse-t-macos-installer-1.0.24.pkg
sudo installer -pkg fuse-t-macos-installer-1.0.24.pkg -target /
- uses: actions/checkout@v3
- name: build and check
run: |
make smoke-macos
deny:
name: Cargo Deny
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1