-
Notifications
You must be signed in to change notification settings - Fork 11
56 lines (46 loc) · 1.91 KB
/
Copy pathclippy.yml
File metadata and controls
56 lines (46 loc) · 1.91 KB
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
name: Cargo Clippy
on:
push:
branches:
- master
tags:
- "v*.*.*"
pull_request:
branches:
- 'master'
jobs:
clippy:
strategy:
fail-fast: false
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container:
image: alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest
steps:
- name: Install dependencies
run: |
set -e
set -x
# Speed up package installation
sed -i -E 's|https?://mirrors.openanolis.cn/anolis/|https://mirrors.aliyun.com/anolis/|g' /etc/yum.repos.d/*.repo
sed -i -E 's|https?://mirrors.cloud.aliyuncs.com/|https://mirrors.aliyun.com/|g' /etc/yum.repos.d/*.repo
sed -i 's/^max_parallel_downloads=.*/max_parallel_downloads=20/' /etc/yum.conf
if ! grep -q "^max_parallel_downloads=" /etc/yum.conf; then
sed -i '/^\[main\]$/a max_parallel_downloads=20' /etc/yum.conf
fi
# install development tools
yum install -y autoconf automake binutils bison flex gcc gcc-c++ gdb glibc-devel libtool make pkgconf pkgconf-m4 pkgconf-pkg-config rpm-build rpm-sign strace asciidoc byacc ctags diffstat elfutils-libelf-devel git intltool patchutils perl-Fedora-VSP perl-Sys-Syslog perl-generators pesign source-highlight systemtap valgrind valgrind-devel cmake expect rpmdevtools rpmlint perl clang
# install rpmdevtools
yum install -y git yum-utils
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.85.0
- name: Install build dependencies
run: yum-builddep -y --skip-unavailable --define 'with_rustup 1' ./cryptpilot.spec
- name: Install Clippy
run: rustup component add clippy
- name: Cargo Clippy
run: cargo clippy --all-targets --all-features -- -D warnings