name: CI
on:
pull_request:
branches:
- main
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: "Run integrated test: conn-it"
run: |
cargo run -p conn-it
- name: "Run integrated test: tls-fail-it"
run: |
cargo run -p tls-fail-it
- name: "Run integrated test: tls-done-it"
run: |
cargo run -p tls-done-it
- name: "Run integrated test: disconnect-it"
run: |
cargo run -p disconnect-it
- name: Run tests
run: cargo test --verbose --features "client,server,rt_smol,sd_bincode"
- name: "Check example: async-executor-simple"
run: |
cargo check -p async-executor-simple-client
cargo check -p async-executor-simple-server
- name: "Check example: async-std-simple"
run: |
cargo check -p async-std-simple-client
cargo check -p async-std-simple-server
- name: "Check example: async-std-tcp"
run: |
cargo check -p async-std-tcp-client
cargo check -p async-std-tcp-server
- name: "Check example: async-std-tls"
run: |
cargo check -p async-std-tls-client
cargo check -p async-std-tls-server
- name: "Check example: bevy-pong"
run: |
cargo check -p bevy-pong-client
cargo check -p bevy-pong-server
- name: "Check example: bevy-simple"
run: |
cargo check -p bevy-simple-client
cargo check -p bevy-simple-server
- name: "Check example: smol-sd-none"
run: |
cargo check -p smol-sd-none-client
cargo check -p smol-sd-none-server
- name: "Check example: smol-simple"
run: |
cargo check -p smol-simple-client
cargo check -p smol-simple-server
- name: "Check example: tokio-chat"
run: |
cargo check -p tokio-chat-client
cargo check -p tokio-chat-server
- name: "Check example: tokio-simple"
run: |
cargo check -p tokio-simple-client
cargo check -p tokio-simple-server