Skip to content

Standardize copyright headers. #1536

Standardize copyright headers.

Standardize copyright headers. #1536

Workflow file for this run

on:
push:
branches:
- master
pull_request:
jobs:
rustfmt:
runs-on: ubuntu-latest
name: cargo fmt
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt
override: true
- name: install rustfmt
run: rustup component add rustfmt
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
test-stable:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-11, windows-2019, ubuntu-latest]
name: cargo clippy+test
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: install libgtk-dev
run: |
sudo apt update
sudo apt install libgtk-3-dev
if: contains(matrix.os, 'ubuntu')
- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
profile: minimal
override: true
# Clippy packages in deeper-to-higher dependency order
- name: cargo clippy piet
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=piet/Cargo.toml --all-targets --all-features -- -D warnings
- name: cargo clippy piet-cairo
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=piet-cairo/Cargo.toml --all-targets --all-features -- -D warnings
if: contains(matrix.os, 'ubuntu')
- name: cargo clippy piet-coregraphics
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=piet-coregraphics/Cargo.toml --all-targets --all-features -- -D warnings
if: contains(matrix.os, 'macOS')
- name: cargo clippy piet-direct2d
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=piet-direct2d/Cargo.toml --all-targets --all-features -- -D warnings
if: contains(matrix.os, 'windows')
- name: cargo clippy piet-svg
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=piet-svg/Cargo.toml --all-targets --all-features -- -D warnings
- name: cargo clippy piet-common
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=piet-common/Cargo.toml --all-targets --features=png -- -D warnings
# Test packages in deeper-to-higher dependency order
- name: cargo test piet
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet/Cargo.toml --all-features
- name: cargo test piet-cairo
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet-cairo/Cargo.toml --all-features
if: contains(matrix.os, 'ubuntu')
- name: cargo test piet-coregraphics
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet-coregraphics/Cargo.toml --all-features
if: contains(matrix.os, 'macOS')
- name: cargo test piet-direct2d
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet-direct2d/Cargo.toml --all-features
if: contains(matrix.os, 'windows')
- name: cargo test piet-svg
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet-svg/Cargo.toml --all-features
- name: cargo test piet-common
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet-common/Cargo.toml --features=png
test-stable-wasm:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-11, windows-2019, ubuntu-latest]
name: cargo clippy+test (wasm32)
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
components: clippy
profile: minimal
override: true
# Clippy packages in deeper-to-higher dependency order
- name: cargo clippy piet
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=piet/Cargo.toml --all-targets --all-features --target wasm32-unknown-unknown -- -D warnings
- name: cargo clippy piet-web
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=piet-web/Cargo.toml --all-targets --all-features --target wasm32-unknown-unknown -- -D warnings
- name: cargo clippy piet-common
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=piet-common/Cargo.toml --all-targets --features=png --target wasm32-unknown-unknown -- -D warnings
# Test packages in deeper-to-higher dependency order
# TODO: Find a way to make tests work. Until then the tests are merely compiled.
- name: cargo test piet
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet/Cargo.toml --all-features --no-run --target wasm32-unknown-unknown
- name: cargo test piet-web
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet-web/Cargo.toml --all-features --no-run --target wasm32-unknown-unknown
- name: cargo test piet-common
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet-common/Cargo.toml --features=png --no-run --target wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: test chrome
run: wasm-pack test --headless --chrome piet-common
- name: test firefox
run: wasm-pack test --headless --firefox piet-common
test-nightly:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-11, windows-2019, ubuntu-latest]
name: cargo test nightly
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: install libgtk-dev
run: |
sudo apt update
sudo apt install libgtk-3-dev
if: contains(matrix.os, 'ubuntu')
- name: install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
# Test packages in deeper-to-higher dependency order
- name: cargo test piet
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet/Cargo.toml --all-features
- name: cargo test piet-cairo
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet-cairo/Cargo.toml --all-features
if: contains(matrix.os, 'ubuntu')
- name: cargo test piet-coregraphics
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet-coregraphics/Cargo.toml --all-features
if: contains(matrix.os, 'macOS')
- name: cargo test piet-direct2d
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet-direct2d/Cargo.toml --all-features
if: contains(matrix.os, 'windows')
- name: cargo test piet-svg
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet-svg/Cargo.toml --all-features
- name: cargo test piet-common
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=piet-common/Cargo.toml --features=png
check-docs:
name: Docs
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-11, windows-2019, ubuntu-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: install libgtk-dev
run: |
sudo apt update
sudo apt install libgtk-3-dev
if: contains(matrix.os, 'ubuntu')
- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
profile: minimal
override: true
# Doc packages in deeper-to-higher dependency order
- name: cargo doc piet
uses: actions-rs/cargo@v1
with:
command: doc
args: --manifest-path=piet/Cargo.toml --all-features --document-private-items
- name: cargo doc piet-cairo
uses: actions-rs/cargo@v1
with:
command: doc
args: --manifest-path=piet-cairo/Cargo.toml --all-features --document-private-items
if: contains(matrix.os, 'ubuntu')
- name: cargo doc piet-coregraphics
uses: actions-rs/cargo@v1
with:
command: doc
args: --manifest-path=piet-coregraphics/Cargo.toml --all-features --document-private-items
if: contains(matrix.os, 'macOS')
- name: cargo doc piet-direct2d
uses: actions-rs/cargo@v1
with:
command: doc
args: --manifest-path=piet-direct2d/Cargo.toml --all-features --document-private-items
if: contains(matrix.os, 'windows')
- name: cargo doc piet-svg
uses: actions-rs/cargo@v1
with:
command: doc
args: --manifest-path=piet-svg/Cargo.toml --all-features --document-private-items
- name: cargo doc piet-common
uses: actions-rs/cargo@v1
with:
command: doc
args: --manifest-path=piet-common/Cargo.toml --features=png --document-private-items
- name: cargo doc piet-web
uses: actions-rs/cargo@v1
with:
command: doc
args: --manifest-path=piet-web/Cargo.toml --all-features --document-private-items --target wasm32-unknown-unknown