Skip to content

new quarter, new clippy #214

new quarter, new clippy

new quarter, new clippy #214

Workflow file for this run

# 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 rusts
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Set up rust (stable)
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- uses: actions/setup-python@v4
name: Install Python 3.11
with:
python-version: 3.11
- name: Update pip
run: |
python -m pip install --upgrade pip
- name: Set up rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install dependencies
run: |
python -m pip install maturin==1.1.0
- name: Build Linux in manylinux2010 with maturin on Python ${{ matrix.python }}
run: |
podman run --rm=true \
-v ${{ github.workspace }}:/ws:rw --workdir=/ws \
ghcr.io/chia-network/build-images/centos-pypa-rust-x86_64 \
bash -exc '\
yum -y install libc6 openssl-devel && \
source $HOME/.cargo/env && \
rustup target add x86_64-unknown-linux-musl && \
rm -rf venv && \
PY_VERSION=${{ matrix.python }}
PY_VERSION=${PY_VERSION/.} && \
echo "Python version with dot removed is $PY_VERSION" && \
if [ "$PY_VERSION" = "37" ]; \
then export SCND_VERSION="${PY_VERSION}m"; \
else export SCND_VERSION="$PY_VERSION"; fi && \
echo "Exporting path /opt/python/cp$PY_VERSION-cp$SCND_VERSION/bin" && \
export PATH=/opt/python/cp$PY_VERSION-cp$SCND_VERSION/bin/:$PATH && \
/opt/python/cp38-cp38/bin/python -m venv venv && \
if [ ! -f "activate" ]; then ln -s venv/bin/activate; fi && \
. ./activate && \
pip install --upgrade pip
'
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: |
. ./activate
ls target/wheels/
# this mess puts the name of the `.whl` file into `$WHEEL_PATH`
# remove the dot, use the `glob` lib to grab the file from the directory
export WHEEL_PATH=$(echo ${{ matrix.python }} | python -c 'DOTLESS=input().replace(".", ""); import glob; print(" ".join(filter(lambda x: "musl" not in x, glob.glob("target/wheels/clvm_tools_rs-*-cp*-*.whl"))))' )
echo ${WHEEL_PATH}
pip install ${WHEEL_PATH}
- 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