forked from cberner/fuser
-
Notifications
You must be signed in to change notification settings - Fork 0
173 lines (147 loc) · 4.86 KB
/
Copy pathci.yml
File metadata and controls
173 lines (147 loc) · 4.86 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: CI
on:
pull_request:
push: # required for actions/cache to work
branches:
- master
jobs:
compile:
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
matrix:
libfuse: [libfuse-dev, libfuse3-dev]
features: [ '' ]
env:
RUSTFLAGS: --deny warnings
RUSTDOCFLAGS: --deny warnings
steps:
- uses: actions/checkout@v4
- name: Cache
id: rust-cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.rustup/toolchains/
target/
key: ${{ runner.os }}-cargo-compile-v1-${{ matrix.libfuse }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }}
- name: Install packages
run: |
sudo apt update
sudo apt install -y ${{ matrix.libfuse }} build-essential
- name: Install Rust
if: steps.rust-cache.outputs.cache-hit != 'true'
run: |
rustup target add x86_64-unknown-linux-musl
- name: Run tests
run: |
cargo build --all --all-targets --features=libfuse,${{ matrix.features }}
cargo build --all --all-targets --features=${{ matrix.features }}
cargo build --target=x86_64-unknown-linux-musl
cargo test --all --features=libfuse,${{ matrix.features }}
cargo test --all --features=${{ matrix.features }}
cargo doc --all --no-deps --features=${{ matrix.features }}
make test_passthrough
ci:
runs-on: ubuntu-22.04
timeout-minutes: 10
env:
RUSTFLAGS: --deny warnings
RUSTDOCFLAGS: --deny warnings
steps:
- uses: actions/checkout@v4
- name: Cache
id: rust-cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.rustup/toolchains/
target/
key: ${{ runner.os }}-cargo-ci-v1-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }}
- name: Install packages
run: |
sudo apt update
sudo apt install -y libfuse-dev libfuse3-dev build-essential
- name: Install Rust
run: |
rustup component add --toolchain nightly rustfmt
rustup component add clippy
rustc --version
cargo --version
- name: Install cargo-deny
if: steps.rust-cache.outputs.cache-hit != 'true'
run: cargo install --force --version 0.16.2 cargo-deny --locked
- name: Run tests
run: INTERACTIVE="" make pre
mac-ci:
runs-on: macos-26
env:
RUSTFLAGS: --deny warnings
RUSTDOCFLAGS: --deny warnings
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
steps:
- uses: actions/checkout@v4
- name: Cache
id: rust-cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.rustup/toolchains/
target/
key: ${{ runner.os }}-${{ runner.arch }}-cargo-compile-v1-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }}
- name: Install packages
run: |
brew update > /dev/null && brew install autoconf automake
brew install --cask macfuse
- name: Install Rust
run: |
rustup component add --toolchain nightly rustfmt
rustup component add clippy
rustc --version
cargo --version
- name: Install cargo-deny
if: steps.rust-cache.outputs.cache-hit != 'true'
run: cargo install --force --version 0.16.2 cargo-deny --locked
- name: Build
run: |
cargo check --features=macos-no-mount
cargo build --all --all-targets
cargo build --all --all-targets --all-features
- name: Docs
run: cargo doc --all --no-deps --all-features
- name: Lint
run: INTERACTIVE="" make pre
test:
runs-on: ubuntu-22.04
timeout-minutes: 120
strategy:
matrix:
test_group: [mount_tests, pjdfs_tests, xfstests]
steps:
# https://github.com/marketplace/actions/maximize-build-disk-space-only-remove-unwanted-software
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@v5
with:
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
# remove-docker-images: 'true'
remove-large-packages: 'true'
remove-cached-tools: 'true'
# verbose: 'true'
- uses: actions/checkout@v4
- name: Run tests
run: INTERACTIVE="" make ${{ matrix.test_group }}