From 0705b382f628b4d43822b00b994845c457b712c4 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Mon, 3 Feb 2025 22:08:11 -0800 Subject: [PATCH 1/2] chore: keep `asm` feature on all arch for backward compatibility --- halo2_proofs/Cargo.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/halo2_proofs/Cargo.toml b/halo2_proofs/Cargo.toml index d3b977cdc..37193decb 100644 --- a/halo2_proofs/Cargo.toml +++ b/halo2_proofs/Cargo.toml @@ -109,10 +109,7 @@ sanity-checks = [] batch = ["rand/getrandom"] profile = ["dep:ark-std"] circuit-params = [] - -[target.'cfg(target_arch = "x86")'.features] -asm = ["halo2curves/asm"] -[target.'cfg(target_arch = "x86_64")'.features] +# only for x86: asm = ["halo2curves/asm"] [lib] From f1ee8a6cee084f688074337614e5aa1407604d68 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Mon, 3 Feb 2025 22:18:05 -0800 Subject: [PATCH 2/2] fix ci --- .github/workflows/ci.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adf4cec30..5227918d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,13 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - feature_set: [basic, all] os: [ubuntu-latest, windows-latest, macOS-latest] - include: - - feature_set: basic - features: --features batch,dev-graph,gadget-traces,circuit-params - - feature_set: all - features: --all-features steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 @@ -25,11 +19,28 @@ jobs: run: | # https://crates.io/crates/font-kit sudo apt install pkg-config libfreetype6-dev libfontconfig1-dev - - name: Run tests + - name: Run tests with basic features uses: actions-rs/cargo@v1 with: command: test - args: --verbose --release --workspace --no-default-features ${{ matrix.features }} + args: --verbose --release --workspace --no-default-features --features batch,dev-graph,gadget-traces,circuit-params + - name: Get all features + id: get-features + shell: bash + run: | + if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then + echo "features=--all-features" >> $GITHUB_OUTPUT + else + # Get all features except 'asm' and format them for cargo + FEATURES=$(cargo metadata --format-version 1 | \ + jq -r '.packages[] | select(.name == "halo2-axiom") | .features | keys - ["asm"] | join(",")') + echo "features=--features ${FEATURES}" >> $GITHUB_OUTPUT + fi + - name: Run tests with all features + uses: actions-rs/cargo@v1 + with: + command: test + args: --verbose --release --workspace --no-default-features ${{ steps.get-features.outputs.features }} build: name: Build target ${{ matrix.target }}