wgpu/.github/workflows/ci.yml
2020-04-18 01:04:28 -02:30

54 lines
1.7 KiB
YAML

name: CI
on:
push:
branches-ignore: [ staging.tmp ]
pull_request:
branches-ignore: [ staging.tmp ]
jobs:
build:
runs-on: ${{ matrix.os }}
env:
RUSTFLAGS: ${{ matrix.RUSTFLAGS }}
strategy:
matrix:
os: [macos-10.15, ubuntu-18.04, windows-2019]
wasm: [true, false]
include:
- os: macos-10.15
wasm: false
CHECK_COMMAND: cargo check --all-targets
TEST_COMMAND: cargo test --all-targets --no-run
- os: ubuntu-18.04
wasm: false
CHECK_COMMAND: cargo check --all-targets
TEST_COMMAND: cargo test --all-targets --no-run
- os: windows-2019
wasm: false
CHECK_COMMAND: rustup default stable-msvc && cargo check --all-targets
TEST_COMMAND: rustup default stable-msvc && cargo test --all-targets --no-run
- wasm: true
CHECK_COMMAND: rustup target add wasm32-unknown-unknown && cargo check --all-targets --target=wasm32-unknown-unknown
TEST_COMMAND: rustup target add wasm32-unknown-unknown && cargo test --all-targets --no-run --target=wasm32-unknown-unknown
RUSTFLAGS: --cfg=web_sys_unstable_apis
steps:
- uses: actions/checkout@v2
- name: cargo check
run: ${{ matrix.CHECK_COMMAND }}
- name: cargo test
run: ${{ matrix.TEST_COMMAND }}
docs:
runs-on: [ubuntu-18.04]
steps:
- uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
continue-on-error: true
- name: cargo doc
run: cargo --version; cargo doc --lib --no-deps
continue-on-error: true