mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Move GitHub workflows into single file, split build-and-test
This commit is contained in:
parent
df85a29c58
commit
6854351fb5
6 changed files with 38 additions and 31 deletions
80
.github/workflows/ci.yml
vendored
Normal file
80
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
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: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- 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
|
||||
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install latest stable Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- 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: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install latest stable Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- 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 --workspace --profile "test-fast"
|
||||
|
||||
test-file-transfers:
|
||||
runs-on: ubuntu-latest
|
||||
name: "Test BitTorrent file transfers over UDP, TLS and WSS"
|
||||
timeout-minutes: 20
|
||||
container:
|
||||
image: rust:1-bullseye
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue