WGPU 0.19 #69
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust CI | |
on: | |
push: | |
branches: [master, dev] | |
pull_request: | |
branches: [dev] | |
env: | |
RUST_BACKTRACE: 1 | |
CARGO_TERM_COLOR: always | |
jobs: | |
fmt: | |
name: Rustfmt + Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
components: rustfmt, clippy | |
- name: Check formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Check Clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --no-deps --examples --tests --all-features -- -D warnings | |
build: | |
needs: fmt | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Windows | |
- name: Windows x86_64 latest | |
os: windows-latest | |
target: x86_64-pc-windows-msvc | |
# MacOS | |
- name: MacOS x86_64 latest | |
os: macos-latest | |
target: x86_64-apple-darwin | |
# Linux | |
- name: Linux Ubuntu x86_64 latest | |
os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
name: Check ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{ matrix.target }} | |
profile: minimal | |
override: true | |
components: clippy | |
- name: Install Linux libs | |
if: ${{ startsWith(matrix.os, 'ubuntu') == 1 }} | |
run: | | |
sudo apt-get update -y -qq | |
sudo apt-get install -y libxkbcommon-dev | |
- name: Caching project | |
uses: Swatinem/rust-cache@v1 | |
with: | |
key: ${{ matrix.target }}-a | |
- name: Disable debug | |
shell: bash | |
run: | | |
mkdir .cargo | |
echo """[profile.dev] | |
debug = 1" > .cargo/config.toml | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --target ${{ matrix.target }} | |
- name: Build docs | |
uses: actions-rs/cargo@v1 | |
with: | |
command: doc | |
args: --target ${{ matrix.target }} --no-deps |