Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
rust-packages: ${{ needs.set_env.outputs.RUST_PACKAGES }}
wasm-packages: ${{ needs.set_env.outputs.WASM_PACKAGES }}
wasm-js-packages: ${{ needs.set_env.outputs.WASM_JS_PACKAGES }}
wasm-pack: true
rustfmt-toolchain: ${{ needs.set_env.outputs.RUST_TOOLCHAIN_NIGHTLY }}
clippy-toolchain: ${{ needs.set_env.outputs.RUST_TOOLCHAIN_NIGHTLY }}
solana-cli-version: ${{ needs.set_env.outputs.SOLANA_CLI_VERSION }}
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/publish-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
outputs:
SOLANA_CLI_VERSION: ${{ steps.compute.outputs.SOLANA_CLI_VERSION }}
TARGET: ${{ steps.compute.outputs.TARGET }}
WASM_PACK: ${{ steps.compute.outputs.WASM_PACK }}
steps:
- name: Git Checkout
uses: actions/checkout@v4
Expand All @@ -59,11 +58,6 @@ jobs:
echo "SOLANA_CLI_VERSION=$(make solana-cli-version)" >> "$GITHUB_OUTPUT"
TARGET=$(echo "$PACKAGE_PATH" | sed 's#/#-#')
echo "TARGET=$TARGET" >> "$GITHUB_OUTPUT"
if [ "$TARGET" = "zk-sdk-wasm-js" ]; then
echo "WASM_PACK=true" >> "$GITHUB_OUTPUT"
else
echo "WASM_PACK=false" >> "$GITHUB_OUTPUT"
fi

main:
needs: set_env
Expand All @@ -79,5 +73,5 @@ jobs:
level: ${{ inputs.level }}
tag: ${{ inputs.tag }}
create-release: ${{ inputs.create-release }}
wasm-pack: ${{ needs.set_env.outputs.WASM_PACK == 'true' }}
wasm-pack: true
secrets: inherit
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ format-rust:
build-sbf-%:
cargo build-sbf --manifest-path $(call make-path,$*)/Cargo.toml $(ARGS)

build-wasm-js-%:
build-wasm-js-node-%:
wasm-pack build --target nodejs --out-dir dist/node --out-name index $(call make-path,$*)

build-wasm-js-%: build-wasm-js-node-%
wasm-pack build --target web --out-dir dist/web --out-name index $(call make-path,$*)
wasm-pack build --target bundler --out-dir dist/bundler --out-name index $(call make-path,$*)
# Remove wasm-pack's generated `.gitignore` files; npm honours them when
Expand Down Expand Up @@ -112,6 +114,11 @@ format-check-js-%:
lint-js-%:
cd $(call make-path,$*) && pnpm install && pnpm lint $(ARGS)

test-js-clients-js: build-wasm-js-node-zk-sdk-wasm-js

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still running the tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since test-js-clients-js has no recipe, I believe Make picks up the recipe from test-js-%, which I can verify. This can still be confusing though I agree, so I made the test commands explicit here. let me know what you think.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh gotcha, that's cool! I had no idea that Make did that. Feel free to leave it as it was if you prefer then

make restart-test-validator
cd $(call make-path,clients-js) && pnpm install && pnpm build && pnpm test $(ARGS)
make stop-test-validator

test-js-%:
make restart-test-validator
cd $(call make-path,$*) && pnpm install && pnpm build && pnpm test $(ARGS)
Expand Down
2 changes: 1 addition & 1 deletion clients-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@solana-program/record": "^0.5.0",
"@solana/kit": "^8.4.0",
"@solana/sysvars": "^8.4.0",
"@solana/zk-sdk": "0.4.1",
"@solana/zk-sdk": "workspace:*",
"@types/node": "^26.6.4",
"ava": "^8.0.1",
"oxfmt": "^0.71.0",
Expand Down
9 changes: 2 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading