-
Notifications
You must be signed in to change notification settings - Fork 154
77 lines (67 loc) · 2.63 KB
/
linux.yml
File metadata and controls
77 lines (67 loc) · 2.63 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
75
76
77
name: Linux build
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:
env:
BUILD_TYPE: Debug
jobs:
linux-build:
name: ${{ matrix.os.image }} ${{ matrix.os.arch }} (Build)
runs-on: ${{ matrix.os.label }}
strategy:
matrix:
os:
# x86_64 (https://github.com/actions/runner-images/tree/main/images/ubuntu)
- { arch: x86_64, label: ubuntu-24.04, image: archlinux:base-devel }
- { arch: x86_64, label: ubuntu-24.04, image: debian:11 }
- { arch: x86_64, label: ubuntu-24.04, image: debian:12 }
- { arch: x86_64, label: ubuntu-24.04, image: fedora:40 }
- { arch: x86_64, label: ubuntu-24.04, image: fedora:41 }
- { arch: x86_64, label: ubuntu-24.04, image: opensuse/leap:15.6 }
- { arch: x86_64, label: ubuntu-24.04, image: ubuntu:22.04 }
- { arch: x86_64, label: ubuntu-24.04, image: ubuntu:24.04 }
- { arch: x86_64, label: ubuntu-24.04, image: ubuntu:25.04 }
# ARM64 (https://github.com/actions/partner-runner-images)
- { arch: aarch64, label: ubuntu-24.04-arm, image: debian:11 }
- { arch: aarch64, label: ubuntu-24.04-arm, image: debian:12 }
- { arch: aarch64, label: ubuntu-24.04-arm, image: fedora:40 }
- { arch: aarch64, label: ubuntu-24.04-arm, image: fedora:41 }
- { arch: aarch64, label: ubuntu-24.04-arm, image: opensuse/leap:15.6 }
- { arch: aarch64, label: ubuntu-24.04-arm, image: ubuntu:22.04 }
- { arch: aarch64, label: ubuntu-24.04-arm, image: ubuntu:24.04 }
- { arch: aarch64, label: ubuntu-24.04-arm, image: ubuntu:25.04 }
container: ${{ matrix.os.image }}
steps:
- name: Install prerequisites
run: |
if command -v pacman; then
pacman -Syu --noconfirm sudo
elif command -v dnf; then
dnf update -y
dnf install -y sudo
elif command -v zypper; then
zypper update -y
zypper install -y sudo tar gzip
elif command -v apt-get; then
apt-get update -y -qq
apt-get install -y -qq sudo
fi
- uses: actions/checkout@v5
- name: Build libcpuid
run: ./scripts/build_libcpuid.sh -t "$BUILD_TYPE"
- name: Build CPU-X
run: ./scripts/build_cpu_x.sh -s "$GITHUB_WORKSPACE" -t "$BUILD_TYPE"
- name: Run tests
run: ninja -C build test
- name: Run CPU-X
run: |
error=0
sudo CPUX_BCLK=100 cpu-x --issue-fmt || error=1
cat /tmp/cpu-x.log
cat /tmp/cpu-x-daemon.log
exit $error