Skip to content

Commit

Permalink
Merge pull request #52 from Chia-Network/20231026-cl23-optimizer
Browse files Browse the repository at this point in the history
20231026 cl23 optimizer
  • Loading branch information
prozacchiwawa authored Nov 27, 2023
2 parents 911221f + 8c34084 commit 3e6a057
Show file tree
Hide file tree
Showing 232 changed files with 13,808 additions and 245 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,9 @@ jobs:
- name: Build Windows with maturin on Python ${{ matrix.python }}
if: startsWith(matrix.os, 'windows')
shell: bash
run: |
python -m venv venv
cp venv/Scripts/activate .
echo ". .\venv\Scripts\Activate.ps1" > activate.ps1
. ./activate
maturin build -i python --release --strip
# Find and install the newly built wheel
Expand Down Expand Up @@ -143,24 +142,23 @@ jobs:
# Test cldb output both run from python and via its command line tool.
- name: "Run step run tests"
shell: bash
run: |
. ./activate
cargo build
pip install .
pip install clvm_rs
pip install clvm_tools
cd resources/tests && \
python test_clvm_step.py && \
python mandelbrot-cldb.py
cd resources/tests && python test_clvm_step.py && python mandelbrot-cldb.py
- name: "Test step run with mandelbrot, setting print only"
shell: bash
run: |
. ./activate
python ./resources/tests/lib/steprun.py ./resources/tests/mandelbrot/mandelbrot.clvm.hex resources/tests/mandelbrot/mand_args.txt ./resources/tests/mandelbrot/mandelbrot.sym > /tmp/mand_output.txt
# Fail if the output differs.
diff -s -q /tmp/mand_output.txt ./resources/tests/mandelbrot/mand_test.txt
python ./resources/tests/lib/steprun.py ./resources/tests/mandelbrot/mandelbrot.clvm.hex resources/tests/mandelbrot/mand_args.txt ./resources/tests/mandelbrot/mandelbrot.sym > mand_output.txt
# git diff invoked this way returns 0 (as /bin/true) if there is no difference or 1 if there is.
git diff --no-index -s --quiet -- mand_output.txt ./resources/tests/mandelbrot/mand_test.txt
# Remove file in a compatible way using git as a general tool
git add mand_output.txt
git rm --force mand_output.txt
- name: Verify recompilation of old sources match with new compiler
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/extensive-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,6 @@ jobs:
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
Loading

0 comments on commit 3e6a057

Please sign in to comment.