-
Notifications
You must be signed in to change notification settings - Fork 122
75 lines (61 loc) · 1.57 KB
/
lint.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Lint
on:
workflow_dispatch:
push:
tags:
- "!v*"
branches:
- master
pull_request:
branches:
- master
- feature/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
env:
TARGET: x86_64-pc-linux-gnu
MAKE_DEBUG: 0
jobs:
generic:
name: Lint
runs-on: ubuntu-latest
env:
BUILD_VERSION: latest # Computed
GITHUB_PULL_REQUEST: ${{ github.event.number }}
PYTHON: 3.8
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint
run: ./ci/lint/main.sh
- name: Extended Lint
run: ./ci/extended_lint/main.sh
rust:
name: Rust Lint
runs-on: ubuntu-latest
container: defi/ain-builder:latest
env:
CARGO_INCREMENTAL: 0
steps:
- name: Checkout
uses: actions/checkout@v4
- run: git config --global --add safe.directory '*'
- name: Populate environment
run: ./make.sh ci-export-vars
- name: Setup dependencies
run: ./make.sh ci-setup-deps
- name: Setup dependencies for user
run: ./make.sh ci-setup-user-deps
- name: Rust lint cache
uses: Swatinem/rust-cache@v2
with:
workspaces: lib -> ../build/lib/target
save-if: ${{ github.ref == 'refs/heads/master' }}
shared-key: lint
- name: Build depends and configure
run: ./make.sh build-deps && ./make.sh build-conf
- name: Format checks
run: ./make.sh lib fmt-check 1
- name: Clippy checks
run: ./make.sh lib clippy 1