Cleanup and fix Windows build #444
Workflow file for this run
This file contains hidden or 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
| name: PZ Compilation Verification | |
| on: | |
| push: | |
| branches: [ "main", "ci" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| concurrency: | |
| group: ${{ github.workflow }} - ${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| # - uses: actions/checkout@v4 | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| - name: Obtain Reference Bench | |
| run: | | |
| benchref=$(git show -s --format=%B HEAD | sed '1!G;h;$!d' | grep -m 1 -o -x '[[:space:]]*\b[Bb]ench[ :]\+[1-9][0-9]*\b[[:space:]]*' | sed 's/[^0-9]//g') | |
| if [[ -n "$benchref" ]]; then | |
| echo "benchref=$benchref" >> $GITHUB_ENV | |
| echo "Reference bench: $benchref" | |
| else | |
| echo "ERROR: No reference bench found" | |
| exit 1 | |
| fi | |
| - name: Fetch latest NNUE | |
| run: wget https://github.com/kevlu8/PZChessBot-Networks/releases/latest/download/nnue.bin | |
| - name: Compile | |
| run: make -j4 native | |
| - name: Check Bench | |
| run: | | |
| out=$(eval "./pzchessbot bench 2>&1" | tail -n 1) | |
| obtained=$(eval "echo $out" | awk '{print $1}') | |
| speed=$(eval "echo $out" | awk '{print $3}') | |
| echo "speed $speed" | |
| if [ "${{ env.benchref }}" != "$obtained" ]; then | |
| echo "signature mismatch: reference ${{ env.benchref }} obtained: $obtained." | |
| exit 1 | |
| fi | |
| echo "signature OK: $obtained" |