Skip to content

Bump to v4.6.1

Bump to v4.6.1 #88

Workflow file for this run

name: test
on:
push:
tags:
- v*
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo generate-lockfile
- uses: actions/cache@v2
with:
path: |
target
~/.cargo/registry
key: rust-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: rust-build-
- run: make
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo generate-lockfile
- uses: actions/cache@v2
with:
path: |
target
~/.cargo/registry
key: rust-lint-rustfmt-${{ hashFiles('**/Cargo.lock') }}
restore-keys: rust-lint-rustfmt-
- run: make lint-rustfmt
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo generate-lockfile
- uses: actions/cache@v2
with:
path: |
target
~/.cargo/registry
key: rust-lint-clippy-${{ hashFiles('**/Cargo.lock') }}
restore-keys: rust-lint-clippy-
- run: make lint-clippy
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo generate-lockfile
- uses: actions/cache@v2
with:
path: |
target
~/.cargo/registry
key: rust-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: rust-test-
- run: make test
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Unit tests
run: cargo test --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
- name: Coverage
uses: actions-rs/grcov@v0.1
with:
config: .github/grcov.yml
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo generate-lockfile
- uses: actions/cache@v2
with:
path: |
target
~/.cargo/registry
key: rust-doc-${{ hashFiles('**/Cargo.lock') }}
restore-keys: rust-doc-
- run: make build-doc
- uses: actions/upload-artifact@v2
with:
name: docs
path: target/doc
doc-publish:
if: github.ref == 'refs/heads/main'
needs: doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- uses: actions/download-artifact@v2
with:
name: docs
path: target/doc
- name: Update gh-pages branch
run: |
git config --global user.email mail@saschagrunert.de
git config --global user.name "CircleCI"
git fetch origin gh-pages
git checkout -f gh-pages
rm -rf doc
mv target/doc .
git add .
git diff-index --quiet HEAD || git commit -m 'Update documentation'
git push -f origin gh-pages