Make sure the length of report variable metadata strings are within t… #296
Workflow file for this run
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 Testing | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
# Check Code style quickly by running `rustfmt` over all code | |
rustfmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- run: rustup component add rustfmt | |
- run: cargo fmt --all -- --check | |
build_and_test: | |
name: Build project and run all unit AND integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: plinioh/[email protected] | |
with: | |
binaryName: wasm2wat | |
binaryUrl: https://github.com/WebAssembly/wabt/releases/download/1.0.34/wabt-1.0.34-ubuntu.tar.gz | |
binaryPathInArchive: wabt-1.0.34/bin/wasm2wat | |
- name: Setup wasm-tools and WASI P1 Target | |
run: | | |
echo "[INFO] Installing the 'wasm32-wasip1' compilation target..." | |
rustup target add wasm32-wasip1 | |
echo "[INFO] Installing the 'wasm-tools' package..." | |
cargo install --locked wasm-tools | |
echo "[INFO] Testing the 'wasm-tools' configuration..." | |
wasm-tools --version | |
- name: Set-up OCaml | |
uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: 5 | |
# echo "[INFO] Installing OCaml..." | |
# apt-get update -y | |
# apt-get install -y opam | |
- name: Setup progress | |
run: | | |
echo "[INFO] Installing 'progress'..." | |
git clone https://github.com/titzer/progress.git | |
echo "$GITHUB_WORKSPACE/progress/bin" >> $GITHUB_PATH | |
- name: Setup Virgil | |
run: | | |
echo "[INFO] Testing 'progress' is on PATH..." | |
which progress.x86-64-linux | |
echo "[INFO] Building 'virgil'..." | |
git clone https://github.com/titzer/virgil.git | |
pushd virgil && make && popd | |
echo "$GITHUB_WORKSPACE/virgil/bin" >> $GITHUB_PATH | |
- name: Setup Wizard-Engine | |
run: | | |
echo "[INFO] Testing 'virgil' is on PATH..." | |
which v3c | |
echo "[INFO] Building 'wizeng'..." | |
git clone --branch bugfix/wasi-state https://github.com/ejrgilbert/wizard-engine.git | |
pushd wizard-engine | |
make -j | |
popd | |
echo "[INFO] Configuring the 'wizeng' spectest interpreter..." | |
mkdir -p output/tests/engines | |
mv wizard-engine/bin/spectest.x86-linux output/tests/engines/wizard-spectest | |
echo "[INFO] Testing the 'wizeng' spectest interpreter configuration..." | |
ls -al output/tests/engines | |
./output/tests/engines/wizard-spectest --help || [ $? == 3 ] | |
echo "[INFO] Configuring the 'wizeng' binary..." | |
ln -s ${PWD}/wizard-engine/scripts/wizeng output/tests/engines/wizeng | |
echo "[INFO] Testing the 'wizeng' binary configuration..." | |
./output/tests/engines/wizeng --help | |
- name: Setup Wasm Spec Reference Interpreter | |
run: | | |
echo "[INFO] Configuring OCaml..." | |
opam init -y | |
eval $(opam env) | |
opam install -y dune | |
opam install -y menhir | |
echo "[INFO] Building the wasm ref interpreter..." | |
git clone https://github.com/WebAssembly/multi-memory.git | |
pushd multi-memory/interpreter | |
make | |
popd | |
echo "[INFO] Configuring the wasm ref interpreter..." | |
mv multi-memory/interpreter/wasm output/tests/engines | |
echo "[INFO] Testing the wasm ref interpreter configuration..." | |
./output/tests/engines/wasm --help | |
- name: Build Whamm Core Library | |
run: | | |
pushd whamm_core | |
rustup target add wasm32-wasip1 | |
cargo build --release --target wasm32-wasip1 | |
popd | |
- name: Build | |
run: cargo build | |
- name: Run tests | |
run: cargo test --verbose -- --nocapture |