Skip to content

empty

empty #45

Workflow file for this run

name: Build
on:
push:
branches: [master, feature/*]
# pull_request:
# branches: [master]
workflow_call:
workflow_dispatch:
jobs:
format:
name: Check Format
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout 3rd-party
uses: ./.github/actions/checkout
- name: Install toolchain
uses: ./.github/actions/rust-toolchain
with:
components: rustfmt
- name: Check format
run: cargo fmt --all -- --check
check:
name: Check Manifest
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare runner
uses: ./.github/actions/prepare-runner
- name: Install toolchain
uses: ./.github/actions/rust-toolchain
- name: Check manifest
run: cargo check --verbose --workspace
licenses:
name: Cargo licenses
runs-on: ubuntu-latest
continue-on-error: true
env:
OUTPUT_FILE: licenses.html
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare runner
uses: ./.github/actions/prepare-runner
- name: Install toolchain
uses: ./.github/actions/rust-toolchain
- name: Install cargo-deny
uses: ./.github/actions/cargo-install
with:
target: cargo-deny
- name: Check cargo-deny
run: cargo deny check
- name: Generate license manifest
id: license-manifest
uses: ./.github/actions/cargo-about
with:
output-file: ${{env.OUTPUT_FILE}}
- name: Upload License Manifest Artifact
uses: actions/upload-artifact@v1
if: steps.license-manifest.outcome == 'success'
continue-on-error: true
with:
name: licenses
path: ${{env.OUTPUT_FILE}}
clippy:
name: Static Analysis
runs-on: ubuntu-latest
continue-on-error: true
permissions:
contents: read
security-events: write
actions: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout 3rd-party
uses: ./.github/actions/checkout
- name: Install toolchain
uses: ./.github/actions/rust-toolchain
with:
components: clippy
- name: Install clippy-sarif
uses: ./.github/actions/cargo-install
with:
target: clippy-sarif
- name: Install sarif-fmt
uses: ./.github/actions/cargo-install
with:
target: sarif-fmt
- name: Check clippy
continue-on-error: true
run: |
cargo clippy \
--no-deps \
--message-format=json \
-- --deny clippy::all \
| clippy-sarif \
| tee rust-clippy-results.sarif \
| sarif-fmt
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true
doctest:
name: Doctest
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare runner
uses: ./.github/actions/prepare-runner
- name: Install toolchain
uses: ./.github/actions/rust-toolchain
- name: Doctest
run: cargo test --doc --verbose
build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
# - windows-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare runner
uses: ./.github/actions/prepare-runner
- name: Install toolchain
uses: ./.github/actions/rust-toolchain
with:
components: llvm-tools-preview
- name: Build
id: build
uses: ./.github/actions/cargo-build
- name: Test
id: test
run: cargo test --verbose
- name: Coverage
uses: ./.github/actions/cargo-code-coverage
with:
output-file: ${{ matrix.os }}-codecov.json
minimum-requirement: 0.0