2020-05-23 17:13:01 +00:00
|
|
|
name: Build (UNIX)
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_unix:
|
|
|
|
name: Build
|
|
|
|
runs-on: ${{ matrix.os.label }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
2024-06-28 18:41:00 +00:00
|
|
|
- { label: macos-latest, name: macos-aarch64 }
|
|
|
|
- { label: macos-13, name: macos-x86_64 }
|
|
|
|
- { label: ubuntu-latest, name: linux-x86_64 }
|
2020-05-23 17:13:01 +00:00
|
|
|
env:
|
|
|
|
OS_NAME: ${{ matrix.os.name }}
|
|
|
|
|
|
|
|
steps:
|
2024-04-28 10:48:24 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-05-23 17:13:01 +00:00
|
|
|
|
|
|
|
- name: Generate build system
|
2024-07-10 20:02:50 +00:00
|
|
|
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="" -DLIBCPUID_ENABLE_TESTS=ON
|
2020-05-23 17:13:01 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: cmake --build build
|
|
|
|
|
2024-06-28 18:41:00 +00:00
|
|
|
# - name: Run cpuid_tool
|
|
|
|
# run: |
|
|
|
|
# echo "RAW dump"
|
|
|
|
# ./build/cpuid_tool/cpuid_tool --save=-
|
|
|
|
# echo "Report"
|
|
|
|
# ./build/cpuid_tool/cpuid_tool --all
|
|
|
|
|
2020-05-23 17:13:01 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
make -C build consistency
|
|
|
|
make -C build test-old
|
|
|
|
|
|
|
|
- name: Install
|
|
|
|
run: |
|
|
|
|
cmake --install build
|
|
|
|
install -v AUTHORS ChangeLog COPYING Readme.md "$DESTDIR"
|
|
|
|
echo -e "Operating system and compiler version:\n$(uname -a)\n$(cc --version)" > "$DESTDIR/Readme.$OS_NAME"
|
|
|
|
env:
|
|
|
|
DESTDIR: ${{ github.workspace }}/installdir
|
|
|
|
|
|
|
|
- name: Upload artifacts
|
2024-04-28 10:48:24 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-05-23 17:13:01 +00:00
|
|
|
with:
|
|
|
|
name: ${{ matrix.os.name }}
|
|
|
|
path: installdir/*
|