| 1 |
name: CI checks |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
jobs: |
| 6 |
test: |
| 7 |
name: Test on ${{ matrix.os }} |
| 8 |
runs-on: ${{ matrix.os }} |
| 9 |
strategy: |
| 10 |
matrix: |
| 11 |
os: [ubuntu-latest, windows-latest, macOS-latest] |
| 12 |
|
| 13 |
steps: |
| 14 |
- uses: actions/checkout@v2 |
| 15 |
- uses: actions-rs/toolchain@v1 |
| 16 |
with: |
| 17 |
toolchain: 1.51.0 |
| 18 |
override: true |
| 19 |
- name: Run tests |
| 20 |
uses: actions-rs/cargo@v1 |
| 21 |
with: |
| 22 |
command: test |
| 23 |
args: --verbose --release --all --all-features |
| 24 |
|
| 25 |
build: |
| 26 |
name: Build target ${{ matrix.target }} |
| 27 |
runs-on: ubuntu-latest |
| 28 |
strategy: |
| 29 |
matrix: |
| 30 |
target: |
| 31 |
- wasm32-unknown-unknown |
| 32 |
- wasm32-wasi |
| 33 |
|
| 34 |
steps: |
| 35 |
- uses: actions/checkout@v2 |
| 36 |
- uses: actions-rs/toolchain@v1 |
| 37 |
with: |
| 38 |
toolchain: 1.51.0 |
| 39 |
override: true |
| 40 |
- name: Add target |
| 41 |
run: rustup target add ${{ matrix.target }} |
| 42 |
- name: cargo build |
| 43 |
uses: actions-rs/cargo@v1 |
| 44 |
with: |
| 45 |
command: build |
| 46 |
args: --all-features |
| 47 |
|
| 48 |
doc-links: |
| 49 |
name: Intra-doc links |
| 50 |
runs-on: ubuntu-latest |
| 51 |
|
| 52 |
steps: |
| 53 |
- uses: actions/checkout@v2 |
| 54 |
- uses: actions-rs/toolchain@v1 |
| 55 |
with: |
| 56 |
toolchain: 1.51.0 |
| 57 |
override: true |
| 58 |
- name: cargo fetch |
| 59 |
uses: actions-rs/cargo@v1 |
| 60 |
with: |
| 61 |
command: fetch |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
- name: Check intra-doc links |
| 66 |
uses: actions-rs/cargo@v1 |
| 67 |
with: |
| 68 |
command: doc |
| 69 |
args: --all --document-private-items |
| 70 |
|
| 71 |
fmt: |
| 72 |
name: Rustfmt |
| 73 |
timeout-minutes: 30 |
| 74 |
runs-on: ubuntu-latest |
| 75 |
steps: |
| 76 |
- uses: actions/checkout@v2 |
| 77 |
- uses: actions-rs/toolchain@v1 |
| 78 |
with: |
| 79 |
toolchain: 1.51.0 |
| 80 |
override: true |
| 81 |
- run: rustup component add rustfmt |
| 82 |
- uses: actions-rs/cargo@v1 |
| 83 |
with: |
| 84 |
command: fmt |
| 85 |
args: --all -- --check |