2019-10-06 14:07:16 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
2019-11-15 00:01:41 +00:00
|
|
|
- master
|
2019-10-06 14:07:16 +00:00
|
|
|
- staging
|
|
|
|
- trying
|
2019-09-28 12:49:16 +00:00
|
|
|
|
2019-10-26 18:28:20 +00:00
|
|
|
env:
|
|
|
|
RUSTFLAGS: -Dwarnings
|
|
|
|
|
2019-09-28 12:49:16 +00:00
|
|
|
jobs:
|
|
|
|
build_and_test:
|
2019-10-06 14:18:34 +00:00
|
|
|
name: Build and test
|
2019-09-28 12:49:16 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
2019-11-08 13:05:53 +00:00
|
|
|
rust: [nightly, beta, stable]
|
2019-09-28 12:49:16 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
|
2019-10-06 14:18:34 +00:00
|
|
|
- name: Install ${{ matrix.rust }}
|
2019-09-28 12:49:16 +00:00
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2019-10-06 14:18:34 +00:00
|
|
|
toolchain: ${{ matrix.rust }}
|
2019-09-28 12:49:16 +00:00
|
|
|
override: true
|
|
|
|
|
2020-04-26 16:23:09 +00:00
|
|
|
- name: Cache cargo registry
|
2020-06-07 16:15:43 +00:00
|
|
|
uses: actions/cache@v2
|
2020-04-26 16:23:09 +00:00
|
|
|
with:
|
|
|
|
path: ~/.cargo/registry
|
|
|
|
key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
|
|
|
|
|
|
|
|
- name: Cache cargo index
|
2020-06-07 16:15:43 +00:00
|
|
|
uses: actions/cache@v2
|
2020-04-26 16:23:09 +00:00
|
|
|
with:
|
|
|
|
path: ~/.cargo/git
|
|
|
|
key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
|
|
|
|
|
|
|
|
- name: Cache cargo build
|
2020-06-07 16:15:43 +00:00
|
|
|
uses: actions/cache@v2
|
2020-04-26 16:23:09 +00:00
|
|
|
with:
|
|
|
|
path: target
|
|
|
|
key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
|
|
|
|
|
2019-09-28 12:49:16 +00:00
|
|
|
- name: check
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
2019-11-01 15:10:37 +00:00
|
|
|
args: --all --bins --tests
|
2019-09-28 12:49:16 +00:00
|
|
|
|
|
|
|
- name: check unstable
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
2019-11-08 13:05:53 +00:00
|
|
|
args: --features unstable --all --bins --examples --tests
|
2020-06-07 16:15:43 +00:00
|
|
|
|
2020-04-26 16:00:00 +00:00
|
|
|
- name: check wasm
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
target: wasm32-unknown-unknown
|
|
|
|
override: true
|
|
|
|
args: --features unstable --all --bins --tests
|
2020-01-16 01:37:22 +00:00
|
|
|
|
2019-11-08 13:05:53 +00:00
|
|
|
- name: check bench
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
if: matrix.rust == 'nightly'
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --benches
|
2019-09-28 12:49:16 +00:00
|
|
|
|
2019-11-07 23:56:58 +00:00
|
|
|
- name: check std only
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --no-default-features --features std
|
|
|
|
|
2019-11-09 11:44:14 +00:00
|
|
|
- name: check attributes
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --features attributes
|
|
|
|
|
2020-07-24 19:03:50 +00:00
|
|
|
- name: build unstable only
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --no-default-features --features unstable
|
|
|
|
|
2019-09-28 12:49:16 +00:00
|
|
|
- name: tests
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
2019-11-28 11:53:47 +00:00
|
|
|
args: --all --features "unstable attributes"
|
2019-09-28 12:49:16 +00:00
|
|
|
|
2020-02-01 00:45:41 +00:00
|
|
|
build__with_no_std:
|
|
|
|
name: Build with no-std
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
|
|
|
|
- name: setup
|
2020-02-01 07:43:12 +00:00
|
|
|
run: |
|
|
|
|
rustup default nightly
|
|
|
|
rustup target add thumbv7m-none-eabi
|
2020-02-01 00:45:41 +00:00
|
|
|
|
|
|
|
- name: check no_std
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
2020-02-01 07:43:12 +00:00
|
|
|
args: --no-default-features --features alloc --target thumbv7m-none-eabi -Z avoid-dev-deps
|
2020-02-01 00:45:41 +00:00
|
|
|
|
2020-06-03 10:40:02 +00:00
|
|
|
check_tokio_02_feature:
|
|
|
|
name: Check tokio02 feature
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
- name: check tokio02
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --all --features tokio02
|
|
|
|
|
2020-05-07 21:20:44 +00:00
|
|
|
cross:
|
|
|
|
name: Cross compile
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target:
|
|
|
|
- i686-unknown-linux-gnu
|
|
|
|
- powerpc-unknown-linux-gnu
|
2020-07-20 07:26:22 +00:00
|
|
|
# - powerpc64-unknown-linux-gnu
|
2020-05-07 21:20:44 +00:00
|
|
|
- mips-unknown-linux-gnu
|
|
|
|
- arm-linux-androideabi
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
|
|
|
|
- name: Install nightly
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
override: true
|
|
|
|
|
|
|
|
- name: Install cross
|
|
|
|
run: cargo install cross
|
|
|
|
|
|
|
|
- name: check
|
|
|
|
run: cross check --all --target ${{ matrix.target }}
|
|
|
|
|
|
|
|
- name: check unstable
|
|
|
|
run: cross check --all --features unstable --target ${{ matrix.target }}
|
|
|
|
|
|
|
|
- name: test
|
|
|
|
run: cross test --all --features unstable --target ${{ matrix.target }}
|
|
|
|
|
2019-09-28 12:49:16 +00:00
|
|
|
check_fmt_and_docs:
|
|
|
|
name: Checking fmt and docs
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
|
2019-10-05 19:31:49 +00:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2019-10-30 00:17:12 +00:00
|
|
|
profile: minimal
|
2019-11-01 02:30:51 +00:00
|
|
|
toolchain: nightly
|
2019-10-05 19:31:49 +00:00
|
|
|
override: true
|
2019-10-30 00:17:12 +00:00
|
|
|
components: rustfmt
|
2019-10-05 19:31:49 +00:00
|
|
|
|
2019-09-28 12:49:16 +00:00
|
|
|
- name: setup
|
|
|
|
run: |
|
|
|
|
rustup component add rustfmt
|
2019-09-30 00:54:59 +00:00
|
|
|
test -x $HOME/.cargo/bin/mdbook || ./ci/install-mdbook.sh
|
2019-09-28 12:49:16 +00:00
|
|
|
rustc --version
|
2019-10-05 19:31:49 +00:00
|
|
|
|
2019-09-28 12:49:16 +00:00
|
|
|
- name: mdbook
|
|
|
|
run: |
|
|
|
|
mdbook build docs
|
|
|
|
- name: fmt
|
|
|
|
run: cargo fmt --all -- --check
|
|
|
|
|
|
|
|
- name: Docs
|
2019-10-06 14:45:29 +00:00
|
|
|
run: cargo doc --features docs
|