Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check wasm files in CI #180

Merged
merged 8 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/check-wasm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
push:
branches: [ main, develop ]
pull_request:

name: Check WASM files
jobs:
test:
runs-on: ubuntu-latest
name: Check wasm files
steps:
- name: Clone the repository
uses: actions/checkout@v3

- name: Build NEAR contracts
run: |
cd near
./build.sh
git status
changed_files=$(git status --porcelain --untracked-files=no | wc -l)
if [ $changed_files -gt 0 ]; then
echo 'contract changed, please rebuild contract'
exit 1
fi
timeout-minutes: 40
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.DS_Store
**/target
.history
node_modules
node_modules
near/res/mock_token.wasm
near/res/mock_prover.wasm
near/res/omni_tests.wasm
6 changes: 3 additions & 3 deletions near/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ docker run \
mkdir -p $RES_DIR

if [ -z "$COMPONENT" ]; then
find $DIR/target/wasm32-unknown-unknown/release/ -name "*.wasm" -exec cp -f {} $RES_DIR/ \;
find $DIR/target/wasm32-unknown-unknown/release/ -name "*.wasm" -maxdepth 1 -exec cp -f {} $RES_DIR/ \;
else
binary_name=$(basename $COMPONENT | tr '-' '_')
find $DIR/target/wasm32-unknown-unknown/release/ -name "$binary_name.wasm" -exec cp -f {} $RES_DIR/ \;
find $DIR/target/wasm32-unknown-unknown/release/ -name "$binary_name.wasm" -maxdepth 1 -exec cp -f {} $RES_DIR/ \;
fi

echo "Build completed! Contract files are in the $RES_DIR directory:"
ls -l $RES_DIR
ls -l $RES_DIR
Binary file added near/res/evm_prover.wasm
Binary file not shown.
Binary file added near/res/omni_bridge.wasm
Binary file not shown.
Binary file added near/res/omni_prover.wasm
Binary file not shown.
Binary file added near/res/omni_token.wasm
Binary file not shown.
Binary file added near/res/token_deployer.wasm
Binary file not shown.
Binary file added near/res/wormhole_omni_prover_proxy.wasm
Binary file not shown.
Loading