Move GitHub workflows into single file, split build-and-test

This commit is contained in:
Joakim Frostegård 2022-10-09 22:36:12 +02:00
parent df85a29c58
commit 6854351fb5
6 changed files with 38 additions and 31 deletions

View file

@ -1,51 +0,0 @@
name: 'cargo: build and test'
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build-test-linux:
runs-on: ubuntu-latest
timeout-minutes: 25
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
- name: Run tests
run: cargo test --verbose --workspace --profile "test-fast"
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