feat: bump up actions v4 #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: rust-wasm-study | |
on: [push] | |
env: | |
RUSTUP_TOOLCHAIN: "1.77.1" | |
RUSTUP_HOME: "./rust/rustup" | |
CARGO_HOME: "./rust/cargo" | |
jobs: | |
build-rust-wasm-study: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Cache Rust | |
id: cache-rust | |
uses: actions/cache@v4 | |
with: | |
path: rust | |
key: ${{ runner.os }}-rustup-${{env.RUSTUP_TOOLCHAIN}} | |
- name: Install rust | |
if: steps.cache-rust.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p $RUSTUP_HOME | |
mkdir -p $CARGO_HOME | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
rustup install $RUSTUP_TOOLCHAIN | |
rustup target add wasm32-wasi --toolchain $RUSTUP_TOOLCHAIN | |
rustup target add wasm32-unknown-unknown --toolchain $RUSTUP_TOOLCHAIN | |
- name: Configure Rust and display version | |
run: | | |
echo "PATH=$(dirname $(rustup which cargo)):$PATH" >> $GITHUB_ENV | |
rustc --version | |
cargo --version | |
- name: Build Rust Wasm Study | |
run: | | |
cd wasm-module1 | |
cargo build --release --target wasm32-wasi | |
cd .. | |
cd wasm-module2 | |
cargo build --release --target wasm32-wasi | |
cd .. | |
cd wasm-app | |
cargo build --release |