-
Notifications
You must be signed in to change notification settings - Fork 41
93 lines (90 loc) · 2.55 KB
/
main.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
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Continuous Integration
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
check:
name: Compile and Test
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- nightly
- stable
# MSRV
- "1.64"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --verbose
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --verbose
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --verbose --no-default-features
- name: Test (default features)
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --verbose
- name: Test (glob feature)
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --verbose --no-default-features --features glob
- name: Test (metadata feature)
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --verbose --no-default-features --features metadata
- name: Test (nightly feature)
uses: actions-rs/cargo@v1
if: matrix.rust == 'nightly'
with:
command: test
args: --workspace --verbose --no-default-features --features nightly
- name: Test (all features)
uses: actions-rs/cargo@v1
if: matrix.rust == 'nightly'
with:
command: test
args: --workspace --verbose --all-features
api-docs:
name: Publish API Docs to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --verbose --all-features
- name: Redirect top-level GitHub Pages
run: "echo '<meta http-equiv=\"refresh\" content=\"0; url=include_dir/index.html\" />' > target/doc/index.html"
shell: bash
- name: Upload API Docs
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/master'
with:
branch: gh-pages
folder: target/doc