diff --git a/.github/workflows/build_freebsd.yml b/.github/workflows/build_freebsd.yml new file mode 100644 index 0000000..1474d04 --- /dev/null +++ b/.github/workflows/build_freebsd.yml @@ -0,0 +1,49 @@ +name: Build (FreeBSD) + +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + +jobs: + build_freebsd: + name: Build on ${{ matrix.box }} + runs-on: ubuntu-latest + strategy: + matrix: + box: + - generic/freebsd13 + - generic/freebsd14 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Provision VM + uses: hummeltech/freebsd-vagrant-action@v1.4 + with: + box: ${{ matrix.box }} + save_box_to_cache: true + + - name: Install packages + run: sudo pkg install --yes cmake python3 + + - 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 diff --git a/Readme.md b/Readme.md index 99b1a4d..da032a1 100644 --- a/Readme.md +++ b/Readme.md @@ -23,7 +23,7 @@ libcpuid support varies depending on the features: |Name|Build|x86 MSR|ARM CPUID| |----|----|-------|---------| |DragonFly BSD|:heavy_check_mark: |:grey_question: ([`cpuctl` kernel module](https://man.freebsd.org/cgi/man.cgi?query=cpuctl))|:x:| -|FreeBSD|:heavy_check_mark: |: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))| +|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:| |NetBSD|:grey_question:|:x:|:x:|