Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

[DRAFT] Port to vello and winit #47

[DRAFT] Port to vello and winit

[DRAFT] Port to vello and winit #47

Workflow file for this run

on:
push:
branches:
- master
pull_request:
env:
SKIP_RENDER_SNAPSHOTS: 1
jobs:
rustfmt:
runs-on: ubuntu-latest
name: cargo fmt
steps:
- uses: actions/checkout@v2
- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt
override: true
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
test-stable:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, windows-2019, ubuntu-latest]
name: cargo clippy+test
steps:
- uses: actions/checkout@v2
- name: install libx11-dev
run: |
sudo apt update
sudo apt install libx11-dev libpango1.0-dev libxkbcommon-dev libxkbcommon-x11-dev
if: contains(matrix.os, 'ubuntu')
- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
profile: minimal
override: true
- name: restore cache
uses: Swatinem/rust-cache@v2
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --features=x11 --no-default-features
# We use --all-targets to skip doc tests; we run them in a parallel task
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-targets --no-default-features --features=svg,image,x11
# we test the gtk backend as a separate job because gtk install takes
# a long time.
test-stable-gtk:
runs-on: ubuntu-latest
name: cargo test (gtk)
steps:
- uses: actions/checkout@v2
- name: install libgtk-3-dev
run: |
sudo apt update
sudo apt install libgtk-3-dev
- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: restore cache
uses: Swatinem/rust-cache@v2
# We use --all-targets to skip doc tests; there are no gtk-specific
# doctests in masonry anyway
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-targets --features=svg,image
test-stable-wasm:
runs-on: macOS-latest
name: cargo test (wasm32)
steps:
- uses: actions/checkout@v2
- name: install wasm-pack
uses: jetli/[email protected]
with:
version: latest
- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
components: clippy
profile: minimal
override: true
- name: restore cache
uses: Swatinem/rust-cache@v2
# We use --all-targets to skip doc tests; there are no wasm-specific
# doctests in masonry anyway
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
# TODO: Add svg feature when it's no longer broken with wasm
args: --all-targets --features=image --no-run --target wasm32-unknown-unknown
doctest-stable:
runs-on: macOS-latest
name: doctests
steps:
- uses: actions/checkout@v2
- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: restore cache
uses: Swatinem/rust-cache@v2
- name: cargo test --doc
uses: actions-rs/cargo@v1
with:
command: test
args: --doc --no-default-features --features=svg,image
# This tests the future rust compiler to catch errors ahead of time without
# breaking CI
# We only run on a single OS to save time; this might let some errors go
# undetected until the compiler updates and they break CI; but that should
# happen rarely, and not pose too much of a problem when it does.
test-beta:
runs-on: macOS-latest
name: cargo clippy+check beta
steps:
- uses: actions/checkout@v2
- name: install beta toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: beta
components: clippy
profile: minimal
override: true
- name: restore cache
uses: Swatinem/rust-cache@v2
- name: cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --features=x11
continue-on-error: true
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --no-default-features --features=x11,svg,image
continue-on-error: true