2024-07-31 13:48:15 +00:00
|
|
|
name: Build (Linux)
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
|
2024-08-03 10:34:49 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2024-07-31 13:48:15 +00:00
|
|
|
jobs:
|
|
|
|
build_linux:
|
|
|
|
name: Build on ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-20.04
|
|
|
|
- ubuntu-22.04
|
|
|
|
- ubuntu-24.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Generate build system
|
|
|
|
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="" -DLIBCPUID_ENABLE_TESTS=ON
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: cmake --build build
|
|
|
|
|
|
|
|
- name: Run cpuid_tool
|
|
|
|
run: |
|
2024-07-31 14:39:42 +00:00
|
|
|
./build/cpuid_tool/cpuid_tool --save=- --all
|
|
|
|
sudo ./build/cpuid_tool/cpuid_tool --rdmsr-raw --rdmsr
|
2024-07-31 13:48:15 +00:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
make -C build consistency
|
|
|
|
make -C build test-old
|
|
|
|
|
|
|
|
- name: Install
|
2024-07-31 14:39:42 +00:00
|
|
|
run: cmake --install build
|
2024-07-31 13:48:15 +00:00
|
|
|
env:
|
|
|
|
DESTDIR: ${{ github.workspace }}/installdir
|