-
Notifications
You must be signed in to change notification settings - Fork 12
80 lines (63 loc) · 2.05 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: build
on:
pull_request:
push:
branches:
- master
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
build:
name: Build on ${{ matrix.os }} (${{ matrix.rust }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
rust:
- stable
- nightly
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install ${{ matrix.rust }} Rust
run: rustup default ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
# Verify that features work by themselves
# Features should not interfere with each other
- name: Build and test with no default feature
run: cargo test --no-default-features
- name: Build and test with markdown_deps_updated feature
run: cargo test --no-default-features --features markdown_deps_updated
- name: Build and test with html_root_url_updated feature
run: cargo test --no-default-features --features html_root_url_updated
- name: Build and test with contains_regex feature
run: cargo test --no-default-features --features contains_regex
- name: Build and test with all features
run: cargo test --all-features
build-documentation:
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build documentation and check intra-doc links
env:
RUSTDOCFLAGS: --deny rustdoc::broken_intra_doc_links
run: cargo doc --all-features --no-deps
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# We use an unstable rustfmt feature and we thus need the
# nightly channel to enforce the formatting.
- name: Setup Rust nightly
run: rustup default nightly
- name: Install rustfmt
run: rustup component add rustfmt
- name: Check Formatting
uses: dprint/check@v2.2