Build once, test many #212
This file contains 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
# Taken from clvm_rs' version. | |
name: Extensive tests | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
tags: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
extensive_tests: | |
name: Extensive tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- uses: actions/setup-python@v4 | |
name: Install Python 3.11 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install maturin==1.1.0 | |
- name: Build Linux in manylinux2014 with maturin on Python 3.11 | |
run: | | |
docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin:v1.1.0 build --release --strip --manylinux 2014 | |
# Refresh in case any ownerships changed. | |
mv target target.docker && cp -r target.docker target | |
# Ensure an empty .cargo-lock file exists. | |
touch target/release/.cargo-lock | |
- name: Install clvm_tools_rs wheel | |
if: ${{ !startsWith(matrix.os, 'windows') }} | |
run: | | |
python -m venv venv | |
ln -s venv/bin/activate | |
. ./activate | |
pip install --upgrade pip | |
ls target/wheels/ | |
pip install --no-index --find-links target/wheels/ clvm_tools_rs | |
- name: Install other wheels | |
run: | | |
. ./activate | |
python -m pip install pytest | |
python -m pip install blspy | |
- name: install clvm & clvm_tools | |
run: | | |
. ./activate | |
git clone https://github.com/Chia-Network/clvm.git --branch=main --single-branch | |
python -m pip install ./clvm | |
echo "installing clvm_rs via pip" | |
pip install clvm_rs | |
echo "installing clvm_tools for clvm tests" | |
# clvm tools is required to run the tests is clvm | |
python -m pip install clvm_tools | |
- name: Run game referee test | |
run: | | |
. ./activate | |
cp support/test-game-referee.sh . | |
sh test-game-referee.sh resources/tests/game-referee-in-cl23 | |
sh test-game-referee.sh resources/tests/game-referee-in-cl21 | |
sh test-game-referee.sh resources/tests/game-referee-after-cl21 |