d9a481baef
* chore: Reorganize examples and interop crates * fix interop tests
101 lines
2.5 KiB
YAML
101 lines
2.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request: {}
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
rust: [stable]
|
|
|
|
env:
|
|
RUSTFLAGS: "-D warnings"
|
|
|
|
steps:
|
|
- uses: hecrj/setup-rust-action@master
|
|
with:
|
|
rust-version: ${{ matrix.rust }}
|
|
- uses: actions/checkout@master
|
|
- name: Install rustfmt
|
|
run: rustup component add rustfmt
|
|
- name: Install cargo-hack
|
|
run: cargo install cargo-hack
|
|
- name: Check fmt
|
|
run: cargo fmt -- --check
|
|
- name: Check features
|
|
run: cargo hack check --all --ignore-private --each-feature --no-dev-deps
|
|
- name: Check all targets
|
|
run: cargo check --all --all-targets --all-features
|
|
|
|
deny-check:
|
|
name: cargo-deny check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: download cargo-deny
|
|
shell: bash
|
|
env:
|
|
DVS: "0.4.0"
|
|
DREPO: EmbarkStudios/cargo-deny
|
|
TARGET: x86_64-unknown-linux-musl
|
|
run: |
|
|
temp_archive=$(mktemp --suffix=.tar.gz)
|
|
curl -L --output "$temp_archive" https://github.com/$DREPO/releases/download/$DVS/cargo-deny-$DVS-$TARGET.tar.gz
|
|
|
|
tar -xzvf "$temp_archive" -C . --strip-components=1 --wildcards "*/cargo-deny"
|
|
- name: cargo-deny check licenses
|
|
run: ./cargo-deny -L debug check license
|
|
- name: cargo-deny check bans
|
|
run: ./cargo-deny -L debug check ban
|
|
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
rust: [stable]
|
|
|
|
env:
|
|
RUSTFLAGS: "-D warnings"
|
|
|
|
steps:
|
|
- uses: hecrj/setup-rust-action@master
|
|
with:
|
|
rust-version: ${{ matrix.rust }}
|
|
- name: Install rustfmt
|
|
run: rustup component add rustfmt
|
|
- uses: actions/checkout@master
|
|
- name: Run tests
|
|
run: cargo test --all --all-features
|
|
|
|
interop:
|
|
name: Interop Tests
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
|
rust: [stable]
|
|
|
|
env:
|
|
RUSTFLAGS: "-D warnings"
|
|
|
|
steps:
|
|
- uses: hecrj/setup-rust-action@master
|
|
with:
|
|
rust-version: ${{ matrix.rust }}
|
|
- name: Install rustfmt
|
|
run: rustup component add rustfmt
|
|
- uses: actions/checkout@master
|
|
- name: Run interop tests
|
|
run: ./interop/test.sh
|
|
shell: bash
|
|
- name: Run interop tests with Rustls
|
|
run: ./interop/test.sh --use_tls tls_rustls
|
|
shell: bash
|