Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
Split in server and worker workflows.
Set up the server workflow with the SW versions used on PROD.
Set up the worker workflows to test on Linux with few python versions and on Windows msys2.

See:
https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
https://github.com/marketplace/actions/setup-msys2
  • Loading branch information
ppigazzini committed Nov 1, 2022
1 parent 6f334a8 commit 139cebd
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 48 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/main.yaml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI server

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3

- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.8.0
with:
mongodb-version: "6.0"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install setuptools
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Run server tests
run: |
./test_server.sh
29 changes: 29 additions & 0 deletions .github/workflows/worker_linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI worker linux

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Run worker tests
run: |
./test_worker.sh
42 changes: 42 additions & 0 deletions .github/workflows/worker_msys2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI worker msys2

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: windows-latest
strategy:
matrix:
include:
- { sys: mingw64, env: x86_64, comp: gcc }
- { sys: ucrt64, env: ucrt-x86_64, comp: gcc }
- { sys: clang64, env: clang-x86_64, comp: clang }
defaults:
run:
shell: msys2 {0}

steps:
- name: Setup msys and install required packages
uses: msys2/setup-msys2@v2
with:
update: true
msystem: ${{ matrix.sys }}
install: >-
make
mingw-w64-${{ matrix.env }}-python3
mingw-w64-${{ matrix.env }}-${{ matrix.comp }}
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install dependencies
run: |
python3 -m venv env
. env/bin/activate
python3 -m pip install --upgrade pip setuptools wheel
- name: Run worker tests
run: |
. env/bin/activate
./test_worker.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Overview
[![CI](https://github.com/glinscott/fishtest/actions/workflows/main.yaml/badge.svg)](https://github.com/glinscott/fishtest/actions/workflows/main.yaml)
[![CI server](https://github.com/glinscott/fishtest/actions/workflows/server.yaml/badge.svg)](https://github.com/glinscott/fishtest/actions/workflows/server.yaml) [![CI worker linux](https://github.com/glinscott/fishtest/actions/workflows/worker_linux.yaml/badge.svg)](https://github.com/glinscott/fishtest/actions/workflows/worker_linux.yaml) [![CI worker msys2](https://github.com/glinscott/fishtest/actions/workflows/worker_msys2.yaml/badge.svg)](https://github.com/glinscott/fishtest/actions/workflows/worker_msys2.yaml)

Fishtest is a distributed task queue for testing chess engines. The main instance
for testing the chess engine [Stockfish](https://github.com/official-stockfish/Stockfish) is at this web page https://tests.stockfishchess.org
Expand Down

0 comments on commit 139cebd

Please sign in to comment.