mirror of
https://github.com/Noratrieb/icefun.git
synced 2026-01-14 21:05:00 +01:00
private
This commit is contained in:
parent
25adea4103
commit
7af1274587
160 changed files with 38999 additions and 4 deletions
262
hyper/.github/workflows/CI.yml
vendored
Normal file
262
hyper/.github/workflows/CI.yml
vendored
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
name: CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
ci-pass:
|
||||
name: CI is green
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- style
|
||||
- test
|
||||
- msrv
|
||||
- miri
|
||||
- features
|
||||
- ffi
|
||||
- ffi-header
|
||||
- doc
|
||||
steps:
|
||||
- run: exit 0
|
||||
|
||||
style:
|
||||
name: Check Style
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
components: rustfmt
|
||||
|
||||
- name: cargo fmt --check
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
|
||||
test:
|
||||
name: Test ${{ matrix.rust }} on ${{ matrix.os }}
|
||||
needs: [style]
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
- stable
|
||||
- beta
|
||||
- nightly
|
||||
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macOS-latest
|
||||
|
||||
include:
|
||||
- rust: stable
|
||||
features: "--features full"
|
||||
- rust: beta
|
||||
features: "--features full"
|
||||
- rust: nightly
|
||||
features: "--features full,nightly"
|
||||
benches: true
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Rust (${{ matrix.rust }})
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
|
||||
- name: Test
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: ${{ matrix.features }}
|
||||
|
||||
- name: Test all benches
|
||||
if: matrix.benches
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --benches ${{ matrix.features }}
|
||||
|
||||
msrv:
|
||||
name: Check MSRV (${{ matrix.rust }})
|
||||
needs: [style]
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
- 1.56 # keep in sync with MSRV.md dev doc
|
||||
|
||||
os:
|
||||
- ubuntu-latest
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Rust (${{ matrix.rust }})
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
|
||||
- name: Check
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: check
|
||||
args: --features full
|
||||
|
||||
miri:
|
||||
name: Test with Miri
|
||||
needs: [style]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
components: miri
|
||||
override: true
|
||||
|
||||
- name: Test
|
||||
# Can't enable tcp feature since Miri does not support the tokio runtime
|
||||
run: MIRIFLAGS="-Zmiri-disable-isolation" cargo miri test --features http1,http2,client,server,stream,nightly
|
||||
|
||||
features:
|
||||
name: features
|
||||
needs: [style]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
override: true
|
||||
|
||||
- name: Install cargo-hack
|
||||
run: cargo install cargo-hack
|
||||
|
||||
- name: check --feature-powerset
|
||||
run: cargo hack check --feature-powerset --depth 2 --skip ffi -Z avoid-dev-deps
|
||||
|
||||
ffi:
|
||||
name: Test C API (FFI)
|
||||
needs: [style]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
override: true
|
||||
|
||||
- name: Install cbindgen
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: install
|
||||
args: cbindgen
|
||||
|
||||
- name: Build FFI
|
||||
uses: actions-rs/cargo@v1
|
||||
env:
|
||||
RUSTFLAGS: --cfg hyper_unstable_ffi
|
||||
with:
|
||||
command: rustc
|
||||
args: --features client,http1,http2,ffi -Z unstable-options --crate-type cdylib
|
||||
|
||||
- name: Make Examples
|
||||
run: cd capi/examples && make client
|
||||
|
||||
- name: Run FFI unit tests
|
||||
uses: actions-rs/cargo@v1
|
||||
env:
|
||||
RUSTFLAGS: --cfg hyper_unstable_ffi
|
||||
with:
|
||||
command: test
|
||||
args: --features full,ffi --lib
|
||||
|
||||
ffi-header:
|
||||
name: Verify hyper.h is up to date
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
default: true
|
||||
override: true
|
||||
components: cargo
|
||||
|
||||
- name: Install cbindgen
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: install
|
||||
args: cbindgen
|
||||
|
||||
- name: Build FFI
|
||||
uses: actions-rs/cargo@v1
|
||||
env:
|
||||
RUSTFLAGS: --cfg hyper_unstable_ffi
|
||||
with:
|
||||
command: build
|
||||
args: --features client,http1,http2,ffi
|
||||
|
||||
- name: Ensure that hyper.h is up to date
|
||||
run: ./capi/gen_header.sh --verify
|
||||
|
||||
doc:
|
||||
name: Build docs
|
||||
needs: [style, test]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
override: true
|
||||
|
||||
- name: cargo doc
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: rustdoc
|
||||
args: --features full,ffi -- --cfg docsrs --cfg hyper_unstable_ffi -D broken-intra-doc-links
|
||||
Loading…
Add table
Add a link
Reference in a new issue