| 1 |
name: CI |
| 2 |
on: [push, pull_request] |
| 3 |
jobs: |
| 4 |
|
| 5 |
lint: |
| 6 |
name: Lint |
| 7 |
runs-on: ubuntu-latest |
| 8 |
steps: |
| 9 |
- uses: actions/checkout@v2 |
| 10 |
|
| 11 |
- uses: actions-rs/toolchain@v1 |
| 12 |
with: |
| 13 |
toolchain: stable |
| 14 |
components: rustfmt, clippy |
| 15 |
|
| 16 |
|
| 17 |
- name: rustfmt |
| 18 |
run: cargo fmt -- --check --color always |
| 19 |
|
| 20 |
|
| 21 |
- run: cargo fetch |
| 22 |
- name: cargo clippy |
| 23 |
run: cargo clippy --all-features -- -D warnings |
| 24 |
|
| 25 |
test: |
| 26 |
name: Test |
| 27 |
strategy: |
| 28 |
matrix: |
| 29 |
os: [ubuntu-latest, macos-latest, windows-latest] |
| 30 |
toolchain: [1.52.1, stable, beta, nightly] |
| 31 |
runs-on: ${{ matrix.os }} |
| 32 |
steps: |
| 33 |
- uses: actions/checkout@v2 |
| 34 |
- run: rustup update --no-self-update ${{ matrix.toolchain }} |
| 35 |
- run: rustup default ${{ matrix.toolchain }} |
| 36 |
- run: ./build_and_test_features.sh |
| 37 |
shell: bash |
| 38 |
|
| 39 |
test-wasm: |
| 40 |
strategy: |
| 41 |
matrix: |
| 42 |
toolchain: [stable] |
| 43 |
os: [ubuntu-latest] |
| 44 |
runs-on: ${{ matrix.os }} |
| 45 |
steps: |
| 46 |
- uses: actions/checkout@v2 |
| 47 |
|
| 48 |
- name: Install |
| 49 |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh |
| 50 |
|
| 51 |
- run: ./build_and_test_wasm32_firefox.sh |
| 52 |
- run: ./build_and_test_wasm32_chrome.sh |