Skip to content

Commit 73e5a19

Browse files
Skip WASM verification for non-example contracts (#2436)
### What Gate the WASM discovery and verification steps (interface, env-meta, meta, spec) behind a `startsWith(matrix.dir, 'examples/')` condition in the OpenZeppelin contracts CI workflow. ### Why The WASM verification steps assume the contract produces a discoverable `.wasm` artifact with a Soroban contract spec, which holds for soroban example contracts but not for the packages in the OpenZeppelin contracts repo. Running these steps for non-example directories causes failures that don't reflect real issues with those contracts.
1 parent 505fbbb commit 73e5a19

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/test-with-openzeppelin-contracts.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@ jobs:
6868
- name: Build ${{ matrix.dir }}
6969
run: stellar contract build --manifest-path ${{ matrix.dir }}/Cargo.toml
7070
- name: Find wasm
71+
if: ${{ startsWith(matrix.dir, 'examples/') }}
7172
id: find-wasm
7273
run: |
7374
wasm=$(find . -name '*.wasm' -path '*/wasm32v1-none/release/*' -not -path '*/deps/*' | head -1)
7475
echo "wasm=$wasm" | tee -a $GITHUB_OUTPUT
7576
- name: Verify interface
77+
if: ${{ startsWith(matrix.dir, 'examples/') }}
7678
run: |
7779
output=$(stellar contract info interface --wasm ${{ steps.find-wasm.outputs.wasm }} --output json)
7880
echo "$output"
@@ -82,6 +84,7 @@ jobs:
8284
exit 1
8385
fi
8486
- name: Verify env-meta
87+
if: ${{ startsWith(matrix.dir, 'examples/') }}
8588
run: |
8689
output=$(stellar contract info env-meta --wasm ${{ steps.find-wasm.outputs.wasm }} --output json)
8790
echo "$output"
@@ -90,6 +93,7 @@ jobs:
9093
exit 1
9194
fi
9295
- name: Verify meta
96+
if: ${{ startsWith(matrix.dir, 'examples/') }}
9397
run: |
9498
output=$(stellar contract info meta --wasm ${{ steps.find-wasm.outputs.wasm }} --output json)
9599
echo "$output"
@@ -98,4 +102,5 @@ jobs:
98102
exit 1
99103
fi
100104
- name: Verify spec
105+
if: ${{ startsWith(matrix.dir, 'examples/') }}
101106
run: stellar contract spec-verify --wasm ${{ steps.find-wasm.outputs.wasm }}

0 commit comments

Comments
 (0)