Skip to content

Commit

Permalink
Use custom Stockfish builds for CI to test with different versions
Browse files Browse the repository at this point in the history
  • Loading branch information
kieferro committed Sep 6, 2023
1 parent f2cb530 commit c72d968
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
name: Python Linux ${{ matrix.python-version }}
python-version: ['3.8', '3.9', '3.10', '3.11']
stockfish-tag: ['sf_15.1', 'sf_16']
name: Python ${{ matrix.python-version }} - ${{ matrix.stockfish-tag }} - Linux
steps:
- uses: actions/checkout@v3
- name: Setup Python
Expand All @@ -25,10 +26,28 @@ jobs:
cache: 'pip'
- name: Display Python version
run: python --version
- name: Install dependencies
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
sudo apt-get install stockfish
- name: Cache stockfish
uses: actions/cache@v3
id: stockfish-cache
with:
path: ~/work/stockfish-bin/stockfish
key: ubuntu-${{ matrix.stockfish-tag }}
- name: Compile stockfish from Source
if: steps.stockfish-cache.outputs.cache-hit != 'true'
run: |
cd /tmp
git clone https://github.com/official-stockfish/Stockfish.git -b ${{ matrix.stockfish-tag }}
cd Stockfish/src
make -j profile-build ARCH=x86-64-avx2
mkdir ~/work/stockfish-bin
mv ./stockfish ~/work/stockfish-bin/stockfish
- name: Add Stockfish to PATH
run: echo "$HOME/work/stockfish-bin" >> $GITHUB_PATH
- name: Display stockfish version
run: stockfish
- name: Test with pytest
run: |
pip install pytest pytest-cov
Expand All @@ -46,8 +65,8 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
name: Python Windows ${{ matrix.python-version }}
python-version: ['3.8', '3.9', '3.10', '3.11']
name: Python ${{ matrix.python-version }} - Windows
steps:
- uses: actions/checkout@v3
- name: Setup Python
Expand Down

0 comments on commit c72d968

Please sign in to comment.