Use TaskFactory to create Wasm tasks (#8) #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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: compile and test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Initialize submodules | |
run: | | |
git submodule init | |
git submodule update | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: wasm32-wasi | |
- name: Compile Rust tasks | |
run: | | |
cd examples/rust_template | |
cargo build --release --target wasm32-wasi | |
cd ../rust_concat2files | |
cargo build --release --target wasm32-wasi | |
cd ../rust_mergedirectories | |
cargo build --release --target wasm32-wasi | |
- name: install standalone wasmtime | |
run: | | |
curl https://wasmtime.dev/install.sh -sSf | bash | |
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH | |
export PATH=$HOME/.wasmtime/bin:$PATH | |
wasmtime --version | |
- name: Publish | |
run: dotnet publish src | |
- name: Examples | |
run: dotnet build examples | |
- name: build MSBuild for unit test .dll | |
run: ./msbuild/build.sh | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Test | |
run: dotnet test |