2024-07-31 13:36:09 +00:00
|
|
|
name: Build (FreeBSD)
|
|
|
|
|
|
|
|
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:36:09 +00:00
|
|
|
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
|
2024-08-02 14:52:43 +00:00
|
|
|
uses: hummeltech/freebsd-vagrant-action@v2
|
2024-07-31 13:36:09 +00:00
|
|
|
with:
|
|
|
|
box: ${{ matrix.box }}
|
|
|
|
save_box_to_cache: true
|
|
|
|
|
|
|
|
- name: Install packages
|
|
|
|
run: sudo pkg install --yes cmake python3
|
2024-08-03 10:25:27 +00:00
|
|
|
shell: /usr/local/bin/bash --noprofile --norc -euo pipefail {0}
|
2024-07-31 13:36:09 +00:00
|
|
|
|
|
|
|
- name: Generate build system
|
|
|
|
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="" -DLIBCPUID_ENABLE_TESTS=ON
|
2024-08-03 10:25:27 +00:00
|
|
|
shell: /usr/local/bin/bash --noprofile --norc -euo pipefail {0}
|
2024-07-31 13:36:09 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: cmake --build build
|
2024-08-03 10:25:27 +00:00
|
|
|
shell: /usr/local/bin/bash --noprofile --norc -euo pipefail {0}
|
2024-07-31 13:36:09 +00:00
|
|
|
|
|
|
|
- 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-08-03 10:25:27 +00:00
|
|
|
shell: /usr/local/bin/bash --noprofile --norc -euo pipefail {0}
|
2024-07-31 13:36:09 +00:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
make -C build consistency
|
|
|
|
make -C build test-old
|
2024-08-03 10:25:27 +00:00
|
|
|
shell: /usr/local/bin/bash --noprofile --norc -euo pipefail {0}
|
2024-07-31 14:39:42 +00:00
|
|
|
|
|
|
|
- name: Install
|
|
|
|
run: cmake --install build
|
|
|
|
env:
|
|
|
|
DESTDIR: ${{ github.workspace }}/installdir
|
2024-08-03 10:25:27 +00:00
|
|
|
shell: /usr/local/bin/bash --noprofile --norc -euo pipefail {0}
|