Skip to content

[#66069] Update github actions #35

[#66069] Update github actions

[#66069] Update github actions #35

Workflow file for this run

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 clang libclang-dev
(cd /opt && 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=/opt/wasi-sdk-16.0" >> "$GITHUB_ENV"
rustup target add wasm32-wasi
rustup component add rustfmt clippy
- 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 build --target wasm32-wasi --release
- name: Lint native
run: cargo clippy -- -Dwarnings
- name: Lint wasi
run: CC=${WASI_SDK_PATH}/bin/clang cargo clippy --target wasm32-wasi -- -Dwarnings
- name: Run Rust formater
run: cargo fmt --check