mirror of
https://github.com/anrieff/libcpuid
synced 2024-12-16 16:35:45 +00:00
9ec39e1312
All actions using Node12 are deprecated: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: Build (UNIX)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '*'
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
|
|
jobs:
|
|
build_unix:
|
|
name: Build
|
|
runs-on: ${{ matrix.os.label }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- { label: macos-latest, name: macos }
|
|
- { label: ubuntu-latest, name: linux }
|
|
env:
|
|
OS_NAME: ${{ matrix.os.name }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Generate build system
|
|
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="" -DLIBCPUID_TESTS:BOOL=ON
|
|
|
|
- name: Build
|
|
run: cmake --build build
|
|
|
|
- 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
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.os.name }}
|
|
path: installdir/*
|