add windows cpu info #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml | |
name: Tests on multiple platforms | |
on: | |
push: | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
compiler: "" | |
- os: ubuntu-latest | |
compiler: gcc | |
- os: ubuntu-latest | |
compiler: clang | |
- os: macos-latest | |
compiler: clang | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
if: ${{ matrix.os == 'windows-latest' }} | |
- name: Build and run tests (Windows X64) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
wmic cpu | |
nmake -f Makefile.win64 | |
Get-ChildItem "." -Filter '*.exe' | | |
Foreach-Object { | |
Write-Output "--- RUNNING $_ ---" | |
Invoke-Expression $_ | |
Write-Output "--- done RUNNING $_ ---" | |
} | |
working-directory: ${{ github.workspace }}/test | |
shell: pwsh | |
- name: Build and run tests (Ubuntu X64) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
lscpu | |
make -f Makefile.linux64.${{ matrix.compiler }} | |
compiler=${{ matrix.compiler }} | |
for f in $(find . -type f -name "*.cpp"); do | |
if [[ -z "${f##*win.cpp}" ]]; then | |
continue | |
fi | |
f=${f%.cpp} | |
if [ ${compiler}="clang" ] && [[ $f == *virtual* ]]; then | |
continue | |
fi | |
echo "--- RUNNING $f ---" | |
${f} | |
echo "--- done RUNNING $f ---" | |
done | |
working-directory: ${{ github.workspace }}/test | |
- name: Build and run tests (Macos Arm64) | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: | | |
sysctl hw | |
make -f Makefile.linux64.clang | |
compiler=clang | |
for f in $(find . -type f -name "*.cpp"); do | |
if [[ -z "${f##*win.cpp}" ]]; then | |
continue | |
fi | |
f=${f%.cpp} | |
if [ ${compiler}="clang" ] && [[ $f == *virtual* ]]; then | |
continue | |
fi | |
echo "--- RUNNING $f ---" | |
printf '\x07' | dd of=${f} bs=1 seek=160 count=1 conv=notrunc | |
${f} | |
echo "--- done RUNNING $f ---" | |
done | |
working-directory: ${{ github.workspace }}/test | |
shell: bash |