mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 03:57:45 +00:00
9a2d50eccc
In CI, it is typical for the process to halt immediately when an error
is encountered. However, with our `shell: bash {0}` configuration,
the process continues despite errors for posix shells.
This commit updates the behavior of posix and msys2 shells to ensure
consistency in terms of pipeline exit codes and stop conditions.
We adopt the most appropriate default behavior as recommended
by the GitHub documentation.
Update the code that searches for the bench value in the git log:
- to be compatible with the new shell settings
- to retry the value from the first line that contains
only the template and spaces/tabs/newlines
see also
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
https://github.com/msys2/setup-msys2/blob/main/main.js
closes https://github.com/official-stockfish/Stockfish/pull/4653
No functional change
67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
name: Stockfish
|
|
on:
|
|
workflow_call:
|
|
jobs:
|
|
Stockfish:
|
|
name: ${{ matrix.sanitizers.name }}
|
|
runs-on: ${{ matrix.config.os }}
|
|
env:
|
|
COMPILER: ${{ matrix.config.compiler }}
|
|
COMP: ${{ matrix.config.comp }}
|
|
CXXFLAGS: "-Werror"
|
|
strategy:
|
|
matrix:
|
|
config:
|
|
- name: Ubuntu 20.04 GCC
|
|
os: ubuntu-20.04
|
|
compiler: g++
|
|
comp: gcc
|
|
shell: bash
|
|
sanitizers:
|
|
- name: Run with thread sanitizer
|
|
make_option: sanitize=thread
|
|
instrumented_option: sanitizer-thread
|
|
- name: Run with UB sanitizer
|
|
make_option: sanitize=undefined
|
|
instrumented_option: sanitizer-undefined
|
|
- name: Run under valgrind
|
|
make_option: ""
|
|
instrumented_option: valgrind
|
|
- name: Run under valgrind-thread
|
|
make_option: ""
|
|
instrumented_option: valgrind-thread
|
|
defaults:
|
|
run:
|
|
working-directory: src
|
|
shell: ${{ matrix.config.shell }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Download required linux packages
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install expect valgrind g++-multilib
|
|
|
|
- name: Download the used network from the fishtest framework
|
|
run: make net
|
|
|
|
- name: Check compiler
|
|
run: $COMPILER -v
|
|
|
|
- name: Test help target
|
|
run: make help
|
|
|
|
- name: Check git
|
|
run: git --version
|
|
|
|
# Sanitizers
|
|
|
|
- name: ${{ matrix.sanitizers.name }}
|
|
run: |
|
|
export CXXFLAGS="-O1 -fno-inline"
|
|
make clean
|
|
make -j2 ARCH=x86-64-modern ${{ matrix.sanitizers.make_option }} debug=yes optimize=no build > /dev/null
|
|
../tests/instrumented.sh --${{ matrix.sanitizers.instrumented_option }}
|