Skip to content

Commit

Permalink
Removing diff
Browse files Browse the repository at this point in the history
  • Loading branch information
prozacchiwawa committed Nov 2, 2023
1 parent 37aa20c commit 984ef95
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 40 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build-arm64-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,13 @@ jobs:
rustup target add aarch64-unknown-linux-musl
rm -rf venv
export PATH="${PATH}:/opt/python/cp39-cp39/bin/:/opt/python/cp38-cp38/bin/:/opt/python/cp37-cp37m/bin/"
- name: Build Python wheels
run: |
/opt/python/cp38-cp38/bin/python -m venv venv
if [ ! -f "activate" ]; then ln -s venv/bin/activate; fi
. ./activate
pip install maturin==1.1.0
pip install tomlkit
USE_FEATURES=$(./support/feature-fishing.py)
echo "USE_FEATURES=${USE_FEATURES}" >> "$GITHUB_ENV"
export
CC=gcc maturin build --release --strip --manylinux 2014 "--features=extension-module,${USE_FEATURES}"
CC=gcc maturin build --release --strip --manylinux 2014
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/build-m1-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,9 @@ jobs:
python3 -m venv venv
. ./venv/bin/activate
export PATH=~/.cargo/bin:$PATH
arch -arm64 pip install tomlkit
USE_FEATURES=$(arch -arm64 ./support/feature-fishing.py)
echo "USE_FEATURES=${USE_FEATURES}" >> "$GITHUB_ENV"
arch -arm64 pip install maturin==1.1.0
arch -arm64 maturin build -i python --release --strip "--features=extension-module,${USE_FEATURES}"
echo "cargo test using features: ${USE_FEATURES}"
arch -arm64 cargo test --features="${USE_FEATURES}"
pip install maturin==1.1.0
maturin build -i python --release --strip
cargo test
- name: Install clvm_tools_rs wheel
run: |
Expand Down Expand Up @@ -106,7 +102,6 @@ jobs:
- name: Run tests from clvm_tools
run: |
. ./venv/bin/activate
arch -arm64 cargo test --features="${USE_FEATURES}"
cd clvm_tools
pytest
Expand Down
24 changes: 3 additions & 21 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ jobs:
run: |
python -m pip install maturin==1.1.0
- name: Set up feature flags to use
shell: bash
run: |
python -m pip install tomlkit
USE_FEATURES=$(./support/feature-fishing.py)
echo "USE_FEATURES=${USE_FEATURES}" >> "$GITHUB_ENV"
- name: Build MacOs with maturin on Python ${{ matrix.python }}
if: startsWith(matrix.os, 'macos')
env:
Expand Down Expand Up @@ -98,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 @@ -148,24 +140,14 @@ jobs:
python -c 'import clvm_tools_rs; print(clvm_tools_rs.__file__)'
echo "CLVM_TOOLS_RS_VERSION=$(python -c 'import clvm_tools_rs; print(clvm_tools_rs.get_version())')" >> "$GITHUB_ENV"
# Test cldb output both run from python and via its command line tool.
# Thanks: https://stackoverflow.com/questions/9948517/how-to-stop-a-powershell-script-on-the-first-error
- name: "Run step run tests"
shell: bash
run: |
. ./activate
cargo build --no-default-features --features="${USE_FEATURES}"
cd resources/tests && \
python test_clvm_step.py && \
python mandelbrot-cldb.py
- name: Verify recompilation of old sources match with new compiler
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.python, '3.8')
run: |
set -x
. ./activate
# Build cmd line tools
PYO3_PYTHON=`which python` cargo build --no-default-features --features="${USE_FEATURES}" --release
PYO3_PYTHON=`which python` cargo build --no-default-features --release
# Grab chia-blockchain
rm -rf chia-blockchain
Expand Down Expand Up @@ -228,7 +210,7 @@ jobs:
- name: Run tests
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.python, '3.8')
run: cargo test --features="${USE_FEATURES}"
run: cargo test --no-default-features

- name: Exhaustive assign tests
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.python, '3.8')
Expand Down
5 changes: 0 additions & 5 deletions src/compiler/cldb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ use crate::compiler::clvm::{convert_from_clvm_rs, run_step, RunStep};
use crate::compiler::runtypes::RunFailure;
use crate::compiler::sexp::SExp;
use crate::compiler::srcloc::Srcloc;
#[cfg(feature = "debug-print")]
use crate::util::u8_from_number;
use crate::util::Number;

#[cfg(feature = "debug-print")]
fn print_atom() -> SExp {
SExp::Atom(Srcloc::start("*print*"), b"$print$".to_vec())
}
Expand Down Expand Up @@ -114,7 +112,6 @@ pub struct CldbRun {
outputs_to_step: HashMap<Number, PriorResult>,
}

#[cfg(feature = "debug-print")]
fn humanize(a: Rc<SExp>) -> Rc<SExp> {
match a.borrow() {
SExp::Integer(l, i) => {
Expand All @@ -135,7 +132,6 @@ fn humanize(a: Rc<SExp>) -> Rc<SExp> {
}
}

#[cfg(feature = "debug-print")]
fn is_print_request(a: &SExp) -> Option<(Srcloc, Rc<SExp>)> {
if let SExp::Cons(l, f, r) = a {
if &print_atom() == f.borrow() {
Expand Down Expand Up @@ -241,7 +237,6 @@ impl CldbRun {
let args = format_arg_inputs(&arg_associations);
self.to_print.insert("Argument-Refs".to_string(), args);
} else if v == 34_u32.to_bigint().unwrap() {
#[cfg(feature = "debug-print")]
// Handle diagnostic output.
if let Some((loc, outputs)) = is_print_request(a) {
self.to_print
Expand Down

0 comments on commit 984ef95

Please sign in to comment.