-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (57 loc) · 1.46 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- main
pull_request:
paths:
- "src/**"
- "tests/**"
- "examples/**"
- "Cargo.*"
- ".github/**"
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
RUST_TOOLCHAIN: ${{ vars.RUST_TOOLCHAIN || 'stable' }}
CARGO_TERM_COLOR: always
# To build on Ubuntu 22.04
LLVM_CONFIG_PATH: /usr/bin/llvm-config-12
LIBCLANG_PATH: /usr/lib/llvm-12/lib
LIBCLANG_STATIC_PATH: /usr/lib/llvm-12/lib
CLANG_PATH: /usr/bin/clang-12
jobs:
markdown_lint:
runs-on: ubuntu-22.04
steps:
- uses: articulate/actions-markdownlint@v1
with:
config: .markdownlint.yaml
files: '*.md'
ignore: target
version: 0.28.1
build_test_rust:
runs-on: ubuntu-22.04
steps:
- name: Install clang
run: sudo apt-get install -y clang-12 libclang-12-dev
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: clippy
- name: Run cargo check
run: |
cargo check --all --tests
- name: Run cargo clippy
run: |
cargo clippy --version
cargo clippy --all-targets -- -W warnings -D warnings
- name: Create Documentation
run: |
cargo doc --no-deps --all-features
- name: Run doc tests
run: |
cargo test