rustfmt #197
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
on: | |
# Trigger the workflow on push to master or any pull request | |
# Ignore all tags | |
push: | |
branches: | |
- master | |
tags-ignore: '*' | |
pull_request: | |
branches: | |
- '*' | |
tags-ignore: '*' | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '13 3 * * *' | |
name: CI | |
jobs: | |
rustfmt: | |
name: ☢️ Formatting ☢️ | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
lints: | |
name: 🕳️ Lints 🕳️ | |
needs: rustfmt | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
rust: "1.62.0" | |
- os: ubuntu-latest | |
rust: stable | |
- os: ubuntu-latest | |
rust: beta | |
- os: ubuntu-latest | |
rust: nightly | |
- os: macos-latest | |
rust: stable | |
- os: windows-latest | |
rust: stable | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
components: clippy | |
- run: cargo clippy --all -- -D warnings | |
test-linux: | |
name: 🧪 Linux 🧪 | |
needs: lints | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
rust: "1.62.0" | |
target: i686-unknown-linux-gnu | |
- os: ubuntu-latest | |
rust: stable | |
target: i686-unknown-linux-gnu | |
- os: ubuntu-latest | |
rust: "1.62.0" | |
target: x86_64-unknown-linux-gnu | |
- os: ubuntu-latest | |
rust: stable | |
target: x86_64-unknown-linux-gnu | |
- os: ubuntu-latest | |
rust: beta | |
target: i686-unknown-linux-gnu | |
- os: ubuntu-latest | |
rust: beta | |
target: x86_64-unknown-linux-gnu | |
- os: ubuntu-latest | |
rust: nightly | |
target: i686-unknown-linux-gnu | |
- os: ubuntu-latest | |
rust: nightly | |
target: x86_64-unknown-linux-gnu | |
steps: | |
- name: ✔️ Checkout ✔️ | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: 💵 Cache 💵 | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/cargo-tarpaulin* | |
~/.cargo/bin/cargo-*-all-features* | |
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }} | |
- uses: actions-rs/toolchain@v1 | |
name: 🧰 Toolchain 🧰 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
target: ${{ matrix.target }} | |
override: true | |
- name: 💾 Install (cargo-tarpaulin) 💾 | |
uses: actions-rs/[email protected] | |
with: | |
crate: cargo-tarpaulin | |
version: latest | |
use-tool-cache: true | |
continue-on-error: true | |
- name: 💾 Install (cargo-all-features) 💾 | |
uses: actions-rs/[email protected] | |
with: | |
crate: cargo-all-features | |
version: latest | |
use-tool-cache: true | |
continue-on-error: true | |
- name: 🧪 Test 🧪 | |
run: cargo test-all-features | |
- name: 🙊 Code Coverage 🙊 | |
run: cargo tarpaulin --out Xml | |
- name: 🙊 Upload Code Coverage 🙊 | |
uses: codecov/codecov-action@v1 | |
with: | |
files: ./cobertura.xml | |
test-macos: | |
name: 🧪 MacOS 🧪 | |
needs: lints | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
rust: "1.62.0" | |
target: x86_64-apple-darwin | |
- os: macos-latest | |
rust: stable | |
target: x86_64-apple-darwin | |
- os: macos-latest | |
rust: "1.62.0" | |
target: x86_64-apple-ios | |
- os: macos-latest | |
rust: stable | |
target: x86_64-apple-ios | |
- os: macos-latest | |
rust: beta | |
target: x86_64-apple-darwin | |
- os: macos-latest | |
rust: beta | |
target: x86_64-apple-ios | |
- os: macos-latest | |
rust: nightly | |
target: x86_64-apple-darwin | |
- os: macos-latest | |
rust: nightly | |
target: x86_64-apple-ios | |
steps: | |
- name: ✔️ Checkout ✔️ | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: 💵 Cache 💵 | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/cargo-*-all-features* | |
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }} | |
- uses: actions-rs/toolchain@v1 | |
name: 🧰 Toolchain 🧰 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
target: ${{ matrix.target }} | |
override: true | |
- name: 💾 Install (cargo-all-features) 💾 | |
uses: actions-rs/[email protected] | |
with: | |
crate: cargo-all-features | |
version: latest | |
use-tool-cache: true | |
continue-on-error: true | |
- name: 🧪 Test 🧪 | |
run: cargo test-all-features | |
test-windows: | |
name: 🧪 Windows 🧪 | |
needs: lints | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
rust: 1.62.0-msvc | |
target: i686-pc-windows-msvc | |
- os: windows-latest | |
rust: stable-msvc | |
target: i686-pc-windows-msvc | |
- os: windows-latest | |
rust: 1.62.0-msvc | |
target: x86_64-pc-windows-msvc | |
- os: windows-latest | |
rust: stable-msvc | |
target: x86_64-pc-windows-msvc | |
- os: windows-latest | |
rust: beta-msvc | |
target: i686-pc-windows-msvc | |
- os: windows-latest | |
rust: beta-msvc | |
target: x86_64-pc-windows-msvc | |
- os: windows-latest | |
rust: nightly-msvc | |
target: i686-pc-windows-msvc | |
- os: windows-latest | |
rust: nightly-msvc | |
target: x86_64-pc-windows-msvc | |
- os: windows-latest | |
rust: 1.62.0-gnu | |
target: i686-pc-windows-gnu | |
- os: windows-latest | |
rust: stable-gnu | |
target: i686-pc-windows-gnu | |
- os: windows-latest | |
rust: 1.62.0-gnu | |
target: x86_64-pc-windows-gnu | |
- os: windows-latest | |
rust: stable-gnu | |
target: x86_64-pc-windows-gnu | |
- os: windows-latest | |
rust: beta-gnu | |
target: i686-pc-windows-gnu | |
- os: windows-latest | |
rust: beta-gnu | |
target: x86_64-pc-windows-gnu | |
- os: windows-latest | |
rust: nightly-gnu | |
target: i686-pc-windows-gnu | |
- os: windows-latest | |
rust: nightly-gnu | |
target: x86_64-pc-windows-gnu | |
steps: | |
- name: ✔️ Checkout ✔️ | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: 💵 Cache 💵 | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/cargo-*-all-features* | |
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }} | |
- uses: actions-rs/toolchain@v1 | |
name: 🧰 Toolchain 🧰 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
target: ${{ matrix.target }} | |
override: true | |
- name: 💾 Install (cargo-all-features) 💾 | |
uses: actions-rs/[email protected] | |
with: | |
crate: cargo-all-features | |
version: latest | |
use-tool-cache: true | |
continue-on-error: true | |
- name: 🧪 Test 🧪 | |
run: cargo test-all-features |