forked from quinn-rs/quinn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is mostly copied from upstream, with a bit of changes inspired by our own usual CI setup.
- Loading branch information
Showing
1 changed file
with
15 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,34 +2,10 @@ name: CI | |
|
||
on: | ||
push: | ||
branches: ['main', '0.8.x'] | ||
branches: ['0.10.x'] | ||
pull_request: | ||
schedule: | ||
- cron: "21 3 * * 5" | ||
|
||
jobs: | ||
test-freebsd: | ||
# see https://github.com/actions/runner/issues/385 | ||
# use https://github.com/vmactions/freebsd-vm for now | ||
name: test on freebsd | ||
runs-on: macos-12 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: test on freebsd | ||
uses: vmactions/freebsd-vm@v0 | ||
with: | ||
usesh: true | ||
mem: 4096 | ||
copyback: false | ||
prepare: | | ||
pkg install -y curl | ||
curl https://sh.rustup.rs -sSf --output rustup.sh | ||
sh rustup.sh -y --profile minimal --default-toolchain stable | ||
echo "~~~~ rustc --version ~~~~" | ||
$HOME/.cargo/bin/rustc --version | ||
echo "~~~~ freebsd-version ~~~~" | ||
freebsd-version | ||
run: $HOME/.cargo/bin/cargo build --all-targets && $HOME/.cargo/bin/cargo test && $HOME/.cargo/bin/cargo test --manifest-path fuzz/Cargo.toml | ||
test: | ||
strategy: | ||
matrix: | ||
|
@@ -43,38 +19,45 @@ jobs: | |
|
||
runs-on: ${{ matrix.os }} | ||
|
||
env: | ||
RUSTC_WRAPPER: "sccache" | ||
SCCACHE_GHA_ENABLED: "on" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: mozilla-actions/[email protected] | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
- uses: Swatinem/rust-cache@v1 | ||
- run: cargo build --all-targets | ||
- run: cargo test | ||
- run: cargo test --manifest-path fuzz/Cargo.toml | ||
if: ${{ matrix.rust }} == "stable" | ||
|
||
msrv: | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTC_WRAPPER: "sccache" | ||
SCCACHE_GHA_ENABLED: "on" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: mozilla-actions/[email protected] | ||
- uses: dtolnay/[email protected] | ||
- uses: Swatinem/rust-cache@v1 | ||
- run: cargo check --lib --all-features -p quinn-udp -p quinn-proto -p quinn | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTC_WRAPPER: "sccache" | ||
SCCACHE_GHA_ENABLED: "on" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: mozilla-actions/[email protected] | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt, clippy | ||
- uses: Swatinem/rust-cache@v1 | ||
- run: cargo fmt --all -- --check | ||
- run: cargo clippy --all-targets -- -D warnings | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
- name: doc | ||
run: cargo doc --no-deps --document-private-items | ||
env: | ||
|