[#66069] Update github actions #29
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: build library | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
workflow_call: | |
jobs: | |
build-library: | |
runs-on: ubuntu-latest | |
container: | |
image: rust:1.81-slim-bookworm | |
steps: | |
- name: Install dependencies | |
run: | | |
apt-get update | |
apt-get install -y nodejs npm | |
wget -q https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-16/wasi-sdk-16.0-linux.tar.gz | |
tar xvf wasi-sdk-16.0-linux.tar.gz | |
echo "WASI_SDK_PATH=$(pwd)/wasi-sdk-16.0" >> "$GITHUB_ENV" | |
rustup target add wasm32-wasi | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Build native | |
run: cargo build --release | |
- name: Build wasm32-wasi | |
run: CC=${WASI_SDK_PATH}/bin/clang cargo +stage2 build --target wasm32-wasi --release | |
- name: Lint native | |
run: cargo clippy --quiet | |
- name: Lint wasi | |
run: cargo clippy --target wasm32-wasi --quiet | |
- name: Run Rust formater | |
run: cargo fmt --check |