-
-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (68 loc) · 1.95 KB
/
ci.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
72
73
74
75
76
77
78
79
80
81
name: Cargo Build & Test
on:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: Rust project - latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
toolchain:
- stable
- beta
- nightly
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Install dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get install -y libfuse-dev
- name: Install dependencies
if: ${{ matrix.os == 'macos-latest'}}
run: |
brew install macfuse
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt
- name: Check format
run: cargo fmt --all --check
- name: Build
run: cargo build --workspace
- name: Test code
run: cargo test --workspace --verbose --features in_ci
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.os }}-${{ matrix.toolchain }}
path: |
target/debug/arx
target/debug/arx.exe
target/debug/tar2arx
target/debug/tar2arx.exe
target/debug/zip2arx
target/debug/zip2arx.exe
target/debug/auto_mount
compression-level: 0
compilation_32bits:
name: Test 32 bits compilation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install cross
run: cargo install cross
- name: Test code
env:
CROSS_CONTAINER_OPTS: "--device /dev/fuse --cap-add SYS_ADMIN"
run: |
cross test --workspace --verbose --target=i686-unknown-linux-gnu --features in_ci --exclude python-libarx