forked from uutils/util-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (62 loc) · 2.11 KB
/
Copy pathrun-gnu-test.yml
File metadata and controls
68 lines (62 loc) · 2.11 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
name: Run GNU Test
on:
pull_request:
push:
branches:
- 'main'
jobs:
native:
name: Run GNU tests (native)
runs-on: ubuntu-24.04
steps:
- name: Checkout code (uutils/util-linux)
uses: actions/checkout@v7
with:
path: uutils-util-linux
- name: Checkout code (util-linux/util-linux)
uses: actions/checkout@v7
with:
repository: util-linux/util-linux
path: gnu-util-linux
ref: v2.41.4
- uses: Swatinem/rust-cache@v2
with:
workspaces: "./uutils-util-linux -> target"
- name: Install dependencies
run: |
sudo apt-get update --quiet
# omit preinstalled tools <https://github.com/actions/runner-images/tree/main/images/ubuntu>
sudo apt-get install -y \
autopoint gettext bc socat ntp squashfs-tools \
libcap-ng-dev libpam-dev libudev-dev python3-dev libmount-dev libclang-dev libsmartcols-dev
- name: Build GNU tests
run: |
cd gnu-util-linux
./autogen.sh
./configure
make libsmartcols/src/filter-parser.c libsmartcols/src/filter-scanner.c
make -j$(nproc) check-programs
- name: Download test baseline if exists
id: download-test-baseline
continue-on-error: true
uses: actions/download-artifact@v8
with:
name: gnu-test-failures
path: uutils-util-linux/.reference/
- name: Run GNU tests
env:
GNU_PROJECT_DIR: ${{ github.workspace }}/gnu-util-linux
run: |
cd uutils-util-linux
./scripts/run-tests.sh
- name: Update test baseline
if: github.ref == 'refs/heads/main'
run: |
cd uutils-util-linux
./scripts/check-new-gnu-failures.sh --update-baseline
- name: Upload test baseline artifact
if: github.ref == 'refs/heads/main' || steps.download-test-baseline.outcome == 'failure'
uses: actions/upload-artifact@v7
with:
name: gnu-test-failures
path: uutils-util-linux/.reference/gnu-test-failures.txt