diff --git a/.github/workflows/build_openbsd.yml b/.github/workflows/build_openbsd.yml new file mode 100644 index 0000000..397c1d7 --- /dev/null +++ b/.github/workflows/build_openbsd.yml @@ -0,0 +1,57 @@ +name: Build (OpenBSD) + +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + +jobs: + build_openbsd: + name: Build on ${{ matrix.box }} + runs-on: ubuntu-latest + strategy: + matrix: + box: + - generic/openbsd7 + 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 + provision-commands: >- + pkg_add -I install bash rsync-3.2.7p1; + echo 'AcceptEnv *' >> /etc/ssh/sshd_config; + rcctl restart sshd; + mkdir -p ${{ github.workspace }}; + chown vagrant:vagrant ${{ github.workspace }}; + mkdir -p ${{ runner.temp }}; + chown vagrant:vagrant ${{ runner.temp }}; + + - name: Install packages + run: sudo pkg_add -I 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: ./build/cpuid_tool/cpuid_tool --save=- --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/Readme.md b/Readme.md index 2dd6477..6901906 100644 --- a/Readme.md +++ b/Readme.md @@ -27,7 +27,7 @@ libcpuid support varies depending on the features: |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:| +|OpenBSD|:heavy_check_mark: ![OpenBSD BSD workflow status](https://github.com/anrieff/libcpuid/actions/workflows/build_openbsd.yml/badge.svg)|: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:| Legend: