-
Notifications
You must be signed in to change notification settings - Fork 9
74 lines (63 loc) · 2.56 KB
/
test.yml
File metadata and controls
74 lines (63 loc) · 2.56 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Run Tests
on:
push:
branches:
- master
tags:
- "v*.*.*"
pull_request:
branches:
- 'master'
jobs:
test:
strategy:
fail-fast: false
matrix:
arch: [x86_64, aarch64]
distro: ["alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest", "registry.openanolis.cn/openanolis/anolisos:23"]
include:
- arch: x86_64
runner: ubuntu-latest
- arch: aarch64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: bash
container:
image: ${{ matrix.distro }}
volumes:
- /run/udev/control:/run/udev/control
- /dev:/dev
options: --privileged --ipc=host
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
# update packages
yum update -y
# 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
# install runtime dependencies for tests (from cryptpilot.spec)
# Note: skip coreutils as it conflicts with coreutils-single on anolisos:23
yum install -y device-mapper kmod systemd systemd-udev lvm2 util-linux veritysetup dosfstools xfsprogs e2fsprogs fuse3 fuse3-libs
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.82.0
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: 'true'
- name: Install build dependencies
run: yum-builddep -y --skip-unavailable ./cryptpilot.spec
- name: Run test script from repo
run: make run-test