use #[track_caller] and Location

This commit is contained in:
Harald Hoyer 2020-08-28 16:45:24 +02:00
parent e2815321bc
commit 356335e807
Signed by: harald
GPG key ID: 900F3C4971086004
21 changed files with 515 additions and 548 deletions

View file

@ -35,6 +35,12 @@ jobs:
- name: Build mdbook
run: cargo install mdbook
- name: Build cargo-readme
run: cargo install cargo-readme
- name: Build README.md
run: cargo readme > README.md
- name: Build
run: mdbook build

View file

@ -1,15 +1,86 @@
name: Rust
on: [push]
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- 1.46.0
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v1
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}
default: true
profile: minimal
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build --all-features
run: cargo build --verbose --all-features
- name: Run tests --all-features
run: cargo test --verbose --all-features
fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
components: rustfmt
toolchain: stable
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
components: clippy
toolchain: stable
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
readme:
name: cargo readme
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- run: cargo install cargo-readme
- run: cargo readme > README.md && git diff --exit-code