From dc2823e59d3392f2611b7cc14941e6923783d4a8 Mon Sep 17 00:00:00 2001 From: arty Date: Thu, 2 Nov 2023 11:56:50 -0700 Subject: [PATCH] Back out feature infra, as we won't be using it here --- .github/workflows/build-arm64-wheels.yml | 7 +------ .github/workflows/build-m1-wheel.yml | 11 +++-------- .github/workflows/build-test.yml | 13 +++---------- Cargo.toml | 3 +-- support/feature-fishing.py | 11 ----------- 5 files changed, 8 insertions(+), 37 deletions(-) delete mode 100755 support/feature-fishing.py diff --git a/.github/workflows/build-arm64-wheels.yml b/.github/workflows/build-arm64-wheels.yml index 97ccdd435..6d8a5f72c 100644 --- a/.github/workflows/build-arm64-wheels.yml +++ b/.github/workflows/build-arm64-wheels.yml @@ -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: diff --git a/.github/workflows/build-m1-wheel.yml b/.github/workflows/build-m1-wheel.yml index 725bfcad3..a7a3c0a4e 100644 --- a/.github/workflows/build-m1-wheel.yml +++ b/.github/workflows/build-m1-wheel.yml @@ -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: | @@ -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 diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index a6ee8a771..633ba7d8b 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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: @@ -154,7 +147,7 @@ jobs: shell: bash run: | . ./activate - cargo build --no-default-features --features="${USE_FEATURES}" + maturin develop cd resources/tests && \ python test_clvm_step.py && \ python mandelbrot-cldb.py @@ -165,7 +158,7 @@ jobs: 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 --release # Grab chia-blockchain rm -rf chia-blockchain @@ -228,7 +221,7 @@ jobs: - name: Run tests if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.python, '3.8') - run: cargo test --features="${USE_FEATURES}" + run: cargo test - name: Exhaustive assign tests if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.python, '3.8') diff --git a/Cargo.toml b/Cargo.toml index 6fd6b6888..a0a465bc0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,9 +52,8 @@ name = "clvm_tools_rs" crate-type = ["cdylib", "rlib"] [features] -debug-print = [] extension-module = ["dep:pyo3"] -default = ["debug-print"] +default = [] [target.'cfg(target_family="wasm")'.dependencies] wasm-bindgen = { version = "0.2.80", features = ["serde-serialize"] } diff --git a/support/feature-fishing.py b/support/feature-fishing.py deleted file mode 100755 index d63850b7c..000000000 --- a/support/feature-fishing.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python - -from tomlkit import parse -import sys - -cargo_toml = parse(open('Cargo.toml').read()) -results=",".join(list(filter(lambda x: x != 'extension-module', cargo_toml['features']['default']))) -if len(sys.argv) > 1: - print(f"{sys.argv[1]}{results}") -else: - print(results)