2021-05-13 02:53:27 +03:00
|
|
|
name: Continuous Integration
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-05-30 14:25:13 +03:00
|
|
|
- main
|
2021-05-13 02:53:27 +03:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2021-05-30 14:25:13 +03:00
|
|
|
- main
|
2021-10-15 21:25:15 +03:00
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * 0"
|
2021-05-13 02:53:27 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
name: Check
|
2021-09-25 21:43:24 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2021-05-13 02:53:27 +03:00
|
|
|
steps:
|
|
|
|
- name: Install toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2021-05-24 03:16:26 +03:00
|
|
|
toolchain: stable
|
2021-05-13 02:53:27 +03:00
|
|
|
profile: minimal
|
|
|
|
override: true
|
|
|
|
- name: Checkout
|
2021-09-25 21:36:22 +03:00
|
|
|
uses: actions/checkout@v2
|
2021-05-13 02:53:27 +03:00
|
|
|
- name: Check
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --locked --verbose
|
|
|
|
|
|
|
|
test:
|
|
|
|
name: Test suite
|
2021-09-25 21:43:24 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2021-05-13 02:53:27 +03:00
|
|
|
steps:
|
|
|
|
- name: Install toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2021-05-24 18:33:24 +03:00
|
|
|
profile: minimal
|
2022-03-29 14:44:45 +03:00
|
|
|
toolchain: nightly
|
2021-05-13 02:53:27 +03:00
|
|
|
override: true
|
|
|
|
- name: Checkout
|
2022-02-20 17:26:11 +03:00
|
|
|
if: github.event_name != 'pull_request'
|
2021-09-25 21:36:22 +03:00
|
|
|
uses: actions/checkout@v2
|
2021-05-15 03:01:12 +03:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-02-20 17:26:11 +03:00
|
|
|
- name: Checkout
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
fetch-depth: 0
|
2021-05-13 02:53:27 +03:00
|
|
|
- name: Run tests
|
2021-05-24 18:33:24 +03:00
|
|
|
run: |
|
|
|
|
export CARGO_INCREMENTAL=0
|
|
|
|
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
|
|
|
|
export RUSTDOCFLAGS="-Cpanic=abort"
|
2022-02-12 19:39:59 +03:00
|
|
|
curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
|
2021-05-24 18:33:24 +03:00
|
|
|
cargo test --verbose $CARGO_OPTIONS
|
2021-05-30 15:03:54 +03:00
|
|
|
zip -0 ccov.zip `find . \( -name "git_cliff*.gc*" \) -print`;
|
2021-05-24 18:33:24 +03:00
|
|
|
./grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore "/*" -o lcov.info;
|
|
|
|
bash <(curl -s https://codecov.io/bash) -f lcov.info;
|
2021-05-24 18:43:42 +03:00
|
|
|
|
2021-05-13 02:53:27 +03:00
|
|
|
clippy:
|
|
|
|
name: Lints
|
2021-09-25 21:43:24 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2021-05-13 02:53:27 +03:00
|
|
|
steps:
|
|
|
|
- name: Install toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2022-03-29 14:44:45 +03:00
|
|
|
toolchain: nightly
|
2021-05-13 02:53:27 +03:00
|
|
|
profile: minimal
|
|
|
|
components: clippy
|
|
|
|
override: true
|
|
|
|
- name: Checkout
|
2021-09-25 21:36:22 +03:00
|
|
|
uses: actions/checkout@v2
|
2021-05-13 02:53:27 +03:00
|
|
|
- name: Check the lints
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
2022-08-12 12:51:38 +03:00
|
|
|
args: --tests --verbose -- -D warnings
|
2021-05-13 02:53:27 +03:00
|
|
|
|
|
|
|
rustfmt:
|
|
|
|
name: Formatting
|
2021-09-25 21:43:24 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2021-05-13 02:53:27 +03:00
|
|
|
steps:
|
|
|
|
- name: Install toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2022-03-29 14:44:45 +03:00
|
|
|
toolchain: nightly
|
2021-05-13 02:53:27 +03:00
|
|
|
profile: minimal
|
|
|
|
components: rustfmt
|
|
|
|
override: true
|
|
|
|
- name: Checkout
|
2021-09-25 21:36:22 +03:00
|
|
|
uses: actions/checkout@v2
|
2021-05-13 02:53:27 +03:00
|
|
|
- name: Check the formatting
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
2021-05-13 21:28:42 +03:00
|
|
|
args: --all -- --check --verbose
|
2021-05-13 02:53:27 +03:00
|
|
|
|
|
|
|
lychee:
|
|
|
|
name: Links
|
2021-09-25 21:43:24 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2021-05-13 02:53:27 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2021-09-25 21:36:22 +03:00
|
|
|
uses: actions/checkout@v2
|
2021-05-13 02:53:27 +03:00
|
|
|
- name: Check the links
|
|
|
|
uses: lycheeverse/lychee-action@v1
|
2021-06-29 02:11:30 +03:00
|
|
|
with:
|
2022-07-12 16:11:08 +03:00
|
|
|
args: --exclude "%7Busername%7D|file:///|https://datatracker.ietf.org|protonmail" -v *.md
|
2021-05-13 02:53:27 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-02-12 22:02:26 +03:00
|
|
|
|
|
|
|
audit:
|
|
|
|
name: Audit check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run cargo-audit
|
|
|
|
uses: actions-rs/audit-check@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|