mirror of
https://github.com/anrieff/libcpuid
synced 2024-11-20 23:01:51 +00:00
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Build (macOS)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '*'
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build_macos:
|
|
name: Build on ${{ matrix.os.name }}
|
|
runs-on: ${{ matrix.os.label }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- { label: macos-latest, name: macos-aarch64 }
|
|
- { label: macos-13, name: macos-x86_64 }
|
|
env:
|
|
OS_NAME: ${{ matrix.os.name }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- 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 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@v4
|
|
with:
|
|
name: ${{ matrix.os.name }}
|
|
path: installdir/*
|