-
Notifications
You must be signed in to change notification settings - Fork 69
81 lines (70 loc) · 2.02 KB
/
rust.yaml
File metadata and controls
81 lines (70 loc) · 2.02 KB
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
72
73
74
75
76
77
78
79
80
81
name: Rust CI
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout sources
uses: actions/checkout@v5
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests
run: cargo test --verbose
- name: Install fuse3 on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y fuse3 libfuse3-dev
- name: Run tests with FUSE
if: runner.os == 'Linux'
run: cargo test --verbose -F fuse
test-freebsd:
name: Test on FreeBSD
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout sources
uses: actions/checkout@v5
- name: Cache cargo dependencies on FreeBSD
uses: actions/cache@v4
id: cargo-cache-freebsd
with:
path: .cargo-cache
key: freebsd-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests on FreeBSD
uses: vmactions/freebsd-vm@v1
with:
usesh: true
envs: 'RUST_BACKTRACE'
prepare: |
pkg install -y rust fusefs-libs3 sudo ninja pkgconf cmake llvm
if ! sudo kldstat -m fusefs > /dev/null 2>&1; then
sudo kldload fusefs
fi
mkdir -p ~/.cargo
mv ~/freebsd-home/.cargo ~/.cargo || true
run: |
cargo test --verbose
cargo test --verbose -F fuse
mv ~/.cargo ~/freebsd-home/.cargo || true