-
Notifications
You must be signed in to change notification settings - Fork 77
51 lines (40 loc) · 1.23 KB
/
CI.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
name: Build
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: "--cfg docsrs"
jobs:
build_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
cargo miri setup
- name: Test with Miri
run: cargo miri test --all-features
deploy_docs:
name: Deploy documentation
runs-on: ubuntu-latest
needs: build_test
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
- name: Build documentation
run: cargo doc --features "serde zeroize const-default alloc"
- name: Finalize documentation
run: |
echo "<meta http-equiv=\"refresh\" content=\"0; url=generic_array\">" > target/doc/index.html
touch target/doc/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: target/doc