File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
.github/actions/setup-wasm Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 55 description : ' Rust toolchain version'
66 required : false
77 default : ' nightly'
8- wasm-bindgen-version :
9- description : ' wasm-bindgen-cli version'
10- required : false
11- default : ' 0.2.99'
128 cache-prefix :
139 description : ' Cache prefix key'
1410 required : false
@@ -20,13 +16,11 @@ runs:
2016 uses : dtolnay/rust-toolchain@stable
2117 with :
2218 toolchain : ${{ inputs.toolchain }}
23- components : rustfmt, rust-src
2419
25- - name : Install wasm32 target and wasm-bindgen-cli
20+ - name : Setup WASM toolchain using Makefile
2621 shell : bash
2722 run : |
28- rustup target add wasm32-unknown-unknown
29- cargo install -f wasm-bindgen-cli --version ${{ inputs.wasm-bindgen-version }}
23+ make setup-wasm
3024
3125 - name : Setup Rust Cache
3226 uses : Swatinem/rust-cache@v2
Original file line number Diff line number Diff line change 88# - ./github/workflows/lint.yaml
99NIGHTLY_RUST_VERSION = "nightly"
1010
11+ # WebAssembly
12+ WASM_BINDGEN_CLI_VERSION = "0.2.99"
13+
1114# Docker
1215DOCKER_ORG ?= o1labs
1316
@@ -240,8 +243,8 @@ lint-dockerfiles: ## Check all Dockerfiles using hadolint
240243 fi ; \
241244 fi
242245
243- .PHONY : setup-wasm-toolchain
244- setup-wasm-toolchain : # # Setup the WebAssembly toolchain, using nightly
246+ .PHONY : setup-wasm
247+ setup-wasm : # # Setup the WebAssembly toolchain, using nightly
245248 @ARCH=$$(uname -m ) ; \
246249 OS=$$(uname -s | tr A-Z a-z ) ; \
247250 case $$ OS in \
@@ -256,8 +259,11 @@ setup-wasm-toolchain: ## Setup the WebAssembly toolchain, using nightly
256259 * ) echo " Unsupported architecture: $$ ARCH" && exit 1 ;; \
257260 esac ; \
258261 TARGET=" $$ ARCH_PART-$$ OS_PART" ; \
259- echo " Installing rust-src and rustfmt for ${NIGHTLY_RUST_VERSION} -$$ TARGET with wasm32 target" ; \
260- rustup target add wasm32-unknown-unknown --toolchain ${NIGHTLY_RUST_VERSION} -$$ TARGET
262+ echo " Installing components for ${NIGHTLY_RUST_VERSION} -$$ TARGET with wasm32 target" ; \
263+ rustup component add rust-src --toolchain ${NIGHTLY_RUST_VERSION} -$$ TARGET; \
264+ rustup component add rustfmt --toolchain ${NIGHTLY_RUST_VERSION} -$$ TARGET; \
265+ rustup target add wasm32-unknown-unknown --toolchain ${NIGHTLY_RUST_VERSION} -$$ TARGET; \
266+ cargo install wasm-bindgen-cli --version ${WASM_BINDGEN_CLI_VERSION}
261267
262268.PHONY : test
263269test : # # Run tests
You can’t perform that action at this time.
0 commit comments