-
Notifications
You must be signed in to change notification settings - Fork 33
70 lines (64 loc) · 2.02 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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build-linux:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Install latest stable Rust
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: sudo apt-get update -y && sudo apt-get install libhwloc-dev -y
- name: Setup Rust dependency caching
uses: Swatinem/rust-cache@v2
- name: Build
run: |
cargo build --verbose -p aquatic_udp --features "cpu-pinning"
cargo build --verbose -p aquatic_http
cargo build --verbose -p aquatic_ws --features "prometheus"
build-macos:
runs-on: macos-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Install latest stable Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Rust dependency caching
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose -p aquatic_udp
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Install latest stable Rust
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: sudo apt-get update -y && sudo apt-get install libhwloc-dev -y
- name: Setup Rust dependency caching
uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --verbose --profile "test-fast" --workspace
- name: Run tests (aquatic_udp with io_uring)
run: cargo test --verbose --profile "test-fast" -p aquatic_udp --features "io-uring"
test-file-transfers:
runs-on: ubuntu-latest
name: "Test BitTorrent file transfers (UDP, HTTP, WebTorrent)"
timeout-minutes: 20
container:
image: rust:1-bookworm
options: --ulimit memlock=524288:524288
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Test file transfers
uses: ./.github/actions/test-file-transfers
id: test_file_transfers