Skip to content

docs: add contributing #5

docs: add contributing

docs: add contributing #5

Workflow file for this run

# This workflow demonstrates how to use the `setup-wasi-sdk` action from CMake projects. The WASI
# SDK comes bundled with a `*.cmake` file that makes this relatively easy.
name: CMake-compatible
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
cmake:
name: Example
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./
- name: Create CMake project
run: |
mkdir cmake-test
cd cmake-test
cat > CMakeLists.txt << 'EOF'
cmake_minimum_required(VERSION 3.16)
project(HelloWasm C)
add_executable(hello hello.c)
EOF
cat > hello.c << 'EOF'
#include <stdio.h>
int main() {
printf("Hello from CMake + WASI!\n");
return 0;
}
EOF
- name: Build with CMake
run: |
cd cmake-test
cmake -B build -DCMAKE_TOOLCHAIN_FILE=$WASI_SDK_PATH/share/cmake/wasi-sdk.cmake
cmake --build build
ls -la build/hello
file build/hello