-
Notifications
You must be signed in to change notification settings - Fork 28
90 lines (85 loc) · 2.79 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
---
name: devicemapper CI
# yamllint disable-line rule:truthy
on:
push:
branches:
- master
paths-ignore:
- 'CHANGES.txt'
- '**/README.md'
pull_request:
branches:
- master
paths-ignore:
- 'CHANGES.txt'
- '**/README.md'
workflow_dispatch:
jobs:
checks:
strategy:
matrix:
include:
- components: rustfmt
toolchain: 1.79.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile fmt-ci
- components: clippy
toolchain: 1.79.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile clippy
- components: cargo
toolchain: 1.79.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile build
- components: cargo
toolchain: 1.79.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile docs
- components: cargo
toolchain: 1.79.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile check-typos
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
components: ${{ matrix.components }}
toolchain: ${{ matrix.toolchain }}
- uses: baptiste0928/cargo-install@v2
with:
crate: typos-cli
- name: Install dependencies
run: |
sudo apt-get -q update
sudo apt-get -y install libdevmapper-dev
- name: Test ${{ matrix.task }} on ${{ matrix.toolchain }} toolchain
run: ${{ matrix.task }}
tests-with-sudo:
strategy:
matrix:
include:
- toolchain: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN
- toolchain: 1.79.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
components: cargo
toolchain: ${{ matrix.toolchain }}
- name: Install dependencies
run: |
sudo apt-get -q update
sudo apt-get -y install libdevmapper-dev
- name: Set toolchain override with sudo
run: sudo /home/runner/.cargo/bin/rustup override set ${{ matrix.toolchain }} # yamllint disable rule:line-length
- name: Run all tests on ${{ matrix.toolchain }} toolchain
run: sudo PATH=$GITHUB_WORKSPACE/.cargo/bin:$PATH make -f Makefile sudo_test # yamllint disable rule:line-length
# VERIFICATION OF TEST INFRASTRUCTURE
yamllint:
runs-on: ubuntu-20.04
container:
image: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- uses: actions/checkout@v4
- name: Install dependencies for Fedora
run: dnf install -y make yamllint
- name: Run yamllint
run: make -f Makefile yamllint