This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (72 loc) · 2.13 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
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
name: Continuous Integration
on:
pull_request:
push:
branches:
- main
env:
DEFAULT_CRATE_NAME: wasmer_toml
jobs:
check:
name: Compile and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Setup Rust
uses: dsherret/rust-toolchain-file@v1
- name: Install Nextest
uses: taiki-e/install-action@nextest
- name: Type Checking
run: cargo check --workspace --verbose --locked
- name: Build
run: cargo build --workspace --verbose --locked
- name: Test
run: cargo nextest run --workspace --verbose --locked
lints:
name: Linting and Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Setup Rust
uses: dsherret/rust-toolchain-file@v1
- name: Check Formatting
run: cargo fmt --all --verbose --check
- name: Clippy
run: cargo clippy --workspace --verbose
api-docs:
name: Publish API Docs to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Setup Rust
uses: dsherret/rust-toolchain-file@v1
- name: Generate API docs
run: cargo doc --workspace --verbose --locked
- name: Redirect top-level GitHub Pages
run: 'echo ''<meta http-equiv="refresh" content="0; url=${{ env.DEFAULT_CRATE_NAME }}/index.html" />'' > target/doc/index.html'
shell: bash
- name: Upload API Docs
uses: JamesIves/github-pages-deploy-action@v4.4.0
if: github.ref == 'refs/heads/main'
with:
branch: gh-pages
folder: target/doc
single-commit: true
workflow-times:
name: Workflow Timings
runs-on: ubuntu-latest
needs:
- check
steps:
- name: Time Reporter
uses: Michael-F-Bryan/workflow-timer@v0.2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
jobs: |
Compile and Test