From d31e2fd73b26e24e8852f63a0c4510f4b2728527 Mon Sep 17 00:00:00 2001 From: The Tumultuous Unicorn Of Darkness Date: Wed, 31 Jul 2024 15:48:15 +0200 Subject: [PATCH] CI: split UNIX job --- .github/workflows/build_linux.yml | 47 +++++++++++++++++++ .../workflows/{unix.yml => build_macos.yml} | 14 ++---- Readme.md | 4 +- 3 files changed, 52 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/build_linux.yml rename .github/workflows/{unix.yml => build_macos.yml} (78%) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml new file mode 100644 index 0000000..ff3ecde --- /dev/null +++ b/.github/workflows/build_linux.yml @@ -0,0 +1,47 @@ +name: Build (Linux) + +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + +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: | + echo "RAW dump" + ./build/cpuid_tool/cpuid_tool --save=- + echo "Report" + ./build/cpuid_tool/cpuid_tool --all + + - name: Run tests + run: | + make -C build consistency + make -C build test-old + + - name: Install + run: | + cmake --install build + env: + DESTDIR: ${{ github.workspace }}/installdir diff --git a/.github/workflows/unix.yml b/.github/workflows/build_macos.yml similarity index 78% rename from .github/workflows/unix.yml rename to .github/workflows/build_macos.yml index 0754409..6ef1f6f 100644 --- a/.github/workflows/unix.yml +++ b/.github/workflows/build_macos.yml @@ -1,4 +1,4 @@ -name: Build (UNIX) +name: Build (macOS) on: push: @@ -9,15 +9,14 @@ on: - '*' jobs: - build_unix: - name: Build + build_macos: + name: Build on ${{ matrix.os.name }} runs-on: ${{ matrix.os.label }} strategy: matrix: os: - { label: macos-latest, name: macos-aarch64 } - { label: macos-13, name: macos-x86_64 } - - { label: ubuntu-latest, name: linux-x86_64 } env: OS_NAME: ${{ matrix.os.name }} @@ -30,13 +29,6 @@ jobs: - name: Build run: cmake --build build - # - name: Run cpuid_tool - # run: | - # echo "RAW dump" - # ./build/cpuid_tool/cpuid_tool --save=- - # echo "Report" - # ./build/cpuid_tool/cpuid_tool --all - - name: Run tests run: | make -C build consistency diff --git a/Readme.md b/Readme.md index da032a1..7a65ca7 100644 --- a/Readme.md +++ b/Readme.md @@ -24,8 +24,8 @@ libcpuid support varies depending on the features: |----|----|-------|---------| |DragonFly BSD|:heavy_check_mark: |:grey_question: ([`cpuctl` kernel module](https://man.freebsd.org/cgi/man.cgi?query=cpuctl))|:x:| |FreeBSD|:heavy_check_mark: ![FreeBSD workflow status](https://github.com/anrieff/libcpuid/actions/workflows/build_freebsd.yml/badge.svg)|:heavy_check_mark: ([`cpuctl` kernel module](https://man.freebsd.org/cgi/man.cgi?query=cpuctl))|:heavy_check_mark:¹ ([`cpuid` out-of-tree kernel module](https://github.com/anrieff/libcpuid/tree/master/drivers/arm/freebsd))| -|Linux|:heavy_check_mark: ![UNIX workflow status](https://github.com/anrieff/libcpuid/actions/workflows/unix.yml/badge.svg)|:heavy_check_mark: ([`msr` kernel module](https://man7.org/linux/man-pages/man4/msr.4.html))|:heavy_check_mark:¹ ([`cpuid` out-of-tree kernel module](https://github.com/anrieff/libcpuid/tree/master/drivers/arm/linux))| -|macOS|:heavy_check_mark: ![UNIX workflow status](https://github.com/anrieff/libcpuid/actions/workflows/unix.yml/badge.svg)|:x:|:x:| +|Linux|:heavy_check_mark: ![Linux workflow status](https://github.com/anrieff/libcpuid/actions/workflows/build_linux.yml/badge.svg)|:heavy_check_mark: ([`msr` kernel module](https://man7.org/linux/man-pages/man4/msr.4.html))|:heavy_check_mark:¹ ([`cpuid` out-of-tree kernel module](https://github.com/anrieff/libcpuid/tree/master/drivers/arm/linux))| +|macOS|:heavy_check_mark: ![macOS workflow status](https://github.com/anrieff/libcpuid/actions/workflows/build_macos.yml/badge.svg)|:x:|:x:| |NetBSD|:grey_question:|:x:|:x:| |OpenBSD|:grey_question:|:x:|:x:| |Windows|:heavy_check_mark: ![Windows workflow status](https://github.com/anrieff/libcpuid/actions/workflows/build_windows.yml/badge.svg)|:heavy_check_mark: ([`msr` driver](https://github.com/anrieff/libcpuid/tree/master/drivers/x86/windows/msr))|:x:|