Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,17 @@ jobs:
run: cargo binstall [email protected]
if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Install Binaryen
run: |
wget https://github.com/WebAssembly/binaryen/releases/download/version_121/binaryen-version_121-x86_64-linux.tar.gz
tar -xzf binaryen-version_121-x86_64-linux.tar.gz
sudo cp -r binaryen-version_121/* /usr/local/
if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Build packages
run: yarn build
env:
CARGO_BUILD_PROFILE: release

if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Set suffix
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/tests-build-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ jobs:
run: cargo binstall [email protected]
if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Install Binaryen
run: |
wget https://github.com/WebAssembly/binaryen/releases/download/version_121/binaryen-version_121-x86_64-linux.tar.gz
tar -xzf binaryen-version_121-x86_64-linux.tar.gz
sudo cp -r binaryen-version_121/* /usr/local/
if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Build JS packages
run: yarn build
if: ${{ steps.check-artifact.outputs.exists != 'true' }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests-js-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
lint:
name: Linting
runs-on: ubuntu-24.04
timeout-minutes: 5
timeout-minutes: 35
permissions:
id-token: write
contents: read
Expand All @@ -35,6 +35,9 @@ jobs:
name: js-build-${{ github.sha }}
path: packages

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3

- name: Run ESLinter
run: yarn workspace "${{ inputs.package }}" lint

Expand Down
2 changes: 1 addition & 1 deletion packages/wasm-dpp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ async-trait = "0.1.59"
bincode = "2.0.0-rc.3"
[profile.release]
lto = true
opt-level = 's'
opt-level = 'z'
[package.metadata.cargo-machete]
ignored = ["wasm-bindgen-futures"]
11 changes: 6 additions & 5 deletions packages/wasm-dpp/scripts/build-wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ fi
# EMCC_CFLAGS="-s ERROR_ON_UNDEFINED_SYMBOLS=0 --no-entry" cargo build --target=wasm32-unknown-emscripten --release
# EMCC_CFLAGS="-s ERROR_ON_UNDEFINED_SYMBOLS=0 --no-entry" wasm-bindgen --out-dir=wasm --target=web --omit-default-module-path ../../target/wasm32-unknown-emscripten/release/wasm_dpp.wasm

# TODO: Must be somehow preinstalled?
#if [ "$PROFILE" == "release" ]; then
# echo "Optimizing wasm using Binaryen"
# wasm-opt -Os "$OUTPUT_FILE" -o "$OUTPUT_FILE"
#fi
if command -v wasm-opt &> /dev/null; then
echo "Optimizing wasm using Binaryen"
wasm-opt -Oz "$OUTPUT_FILE" -o "$OUTPUT_FILE"
else
echo "wasm-opt command not found. Skipping wasm optimization."
fi
Loading