Skip to content

Trying to debug windows ci 2 #67

Trying to debug windows ci 2

Trying to debug windows ci 2 #67

Workflow file for this run

name: Validate Bench & Run Tests
on: [push]
jobs:
WhiteCore:
runs-on: ${{matrix.os}}
name: WhiteCore ${{matrix.arch}} ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
arch: [popcnt, avx2, bmi2]
include:
- os: ubuntu-latest
suffix: "-linux"
packages: |
sudo apt-get update
sudo apt-get install clang-15 valgrind
- os: windows-latest
suffix: "-win"
exe-suffix: ".exe"
steps:
- uses: actions/checkout@v3
- name: Install required packages
if: matrix.os == 'ubuntu-latest'
run: ${{ matrix.packages }}
- name: Build WhiteCore
run: |
clang++ --version
make EXE=WhiteCore-${{matrix.arch}}${{matrix.suffix}} ARCH=${{matrix.arch}} build=debug
- name: Run tests
run: ./WhiteCore-${{matrix.arch}}${{matrix.suffix}} test
- name: Run bench on Windows
if: matrix.os == 'windows-latest'
run: ./WhiteCore-${{matrix.arch}}${{matrix.suffix}} bench
- name: Run bench on Linux
id: obtain_bench
if: matrix.os == 'ubuntu-latest'
run: |
BENCH=$(./WhiteCore-${{matrix.arch}}${{matrix.suffix}} bench | grep -Eo '^[0-9]+ nodes' | grep -o '[0-9]*')
COMMIT_BENCH=$(git log -1 --pretty=%B | grep -Eo '^Bench: *[0-9]+' | grep -o '[0-9]*')
echo "BENCH=$BENCH" >> $GITHUB_ENV
echo "COMMIT_BENCH=$COMMIT_BENCH" >> $GITHUB_ENV
- name: Invalid bench
if: steps.obtain_bench.outputs.BENCH != steps.obtain_bench.outputs.COMMIT_BENCH &&
matrix.os == 'ubuntu-latest'
run: |
echo "::error::The commit bench ${{steps.obtain_bench.outputs.COMMIT_BENCH}} is not equal to the actual bench ${{steps.obtain_bench.outputs.BENCH}}!"
exit 1
- name: Run Valgrind
if: runner.os == 'Linux'
run: |
valgrind --error-exitcode=1 --errors-for-leak-kinds=all --leak-check=full ./WhiteCore-${{matrix.arch}}${{matrix.suffix}} bench
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: WhiteCore-${{matrix.arch}}${{matrix.suffix}}${{matrix.exe-suffix}}
path: ./WhiteCore-${{matrix.arch}}${{matrix.suffix}}${{matrix.exe-suffix}}