mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 17:49:35 +00:00

Github Actions allows us to use up to 20 workers. This way we can launch multiple different checks at the same time and optimize the overall time the CI takes a bit. closes https://github.com/official-stockfish/Stockfish/pull/4223 No functional change
77 lines
No EOL
2.1 KiB
YAML
77 lines
No EOL
2.1 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 {0}'
|
|
}
|
|
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 qemu-user
|
|
|
|
- name: Download the used network from the fishtest framework
|
|
run: |
|
|
make net
|
|
|
|
- name: Check compiler
|
|
run: |
|
|
export PATH=$PATH:$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin
|
|
$COMPILER -v
|
|
|
|
- name: Test help target
|
|
run: |
|
|
make help
|
|
|
|
# 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 }} |