|
| 1 | +--- |
| 2 | +name: test-msvc |
| 3 | + |
| 4 | +# Experiment: run et-ws-web-runner (and the .NET dotnet-data1 module) on Windows using the native MSVC |
| 5 | +# toolchain. On x86_64-pc-windows-msvc the v8 crate uses denoland's MSVC prebuilt -- no gnullvm fork and no |
| 6 | +# gnullvm C++ exception-unwind bug -- so the (proven-valid) dotnet module should actually run. |
| 7 | +# |
| 8 | +# Deliberately does NOT use mise: Rust, .NET and NASM are installed via actions and the dotnet module is built |
| 9 | +# with raw `dotnet` commands. MISE_ENV=dotnet is set only when running the web-runner test, so the test's |
| 10 | +# `mise_env_includes()` skips every non-dotnet module (the gate reads the MISE_ENV env var directly). |
| 11 | +# |
| 12 | +# Runs on push until the web runner is green on MSVC. |
| 13 | +"on": |
| 14 | + push: |
| 15 | + |
| 16 | +permissions: |
| 17 | + contents: read |
| 18 | + |
| 19 | +jobs: |
| 20 | + web-runner-msvc: |
| 21 | + runs-on: windows-latest |
| 22 | + timeout-minutes: 90 |
| 23 | + steps: |
| 24 | + - name: Checkout |
| 25 | + uses: actions/checkout@v4 |
| 26 | + with: |
| 27 | + fetch-depth: 1 |
| 28 | + persist-credentials: false |
| 29 | + |
| 30 | + - name: Install Rust (x86_64-pc-windows-msvc) |
| 31 | + uses: dtolnay/rust-toolchain@stable |
| 32 | + |
| 33 | + - name: Install NASM |
| 34 | + # aws-lc-sys (deno_node_crypto -> ... -> aws-lc-sys) assembles BoringSSL's x86_64 .asm with NASM. |
| 35 | + uses: ilammy/setup-nasm@v1 |
| 36 | + |
| 37 | + - name: Install .NET SDK |
| 38 | + uses: actions/setup-dotnet@v4 |
| 39 | + with: |
| 40 | + dotnet-version: "10.0.300" |
| 41 | + |
| 42 | + - name: Build dotnet-data1 WASM module |
| 43 | + shell: bash |
| 44 | + run: | |
| 45 | + set -xeuo pipefail |
| 46 | + cd services/ws-modules/dotnet-data1 |
| 47 | + dotnet workload install wasm-tools --skip-manifest-update |
| 48 | + # MSBuild's BrowserWasmApp.targets link step calls bare `emcc` and relies on PATH; surface the |
| 49 | + # workload's emcc dir + EmscriptenLocation ourselves (same approach as the mise build task). |
| 50 | + packs="${DOTNET_ROOT:-/c/Program Files/dotnet}/packs" |
| 51 | + emcc_bat="$(find "$packs" -name emcc.bat 2>/dev/null | head -1)" |
| 52 | + if [ -z "$emcc_bat" ]; then |
| 53 | + emcc_bat="$(find "/c/Program Files/dotnet/packs" -name emcc.bat 2>/dev/null | head -1)" |
| 54 | + fi |
| 55 | + test -n "$emcc_bat" || { echo "emcc.bat not found under dotnet packs"; exit 1; } |
| 56 | + emcc_dir="$(dirname "$emcc_bat")" |
| 57 | + emsdk_loc="$(dirname "$(dirname "$emcc_dir")")/Sdk" |
| 58 | + export PATH="$(cygpath -u "$emcc_dir"):$PATH" |
| 59 | + dotnet publish -c Release -p:EmscriptenLocation="$(cygpath -w "$emsdk_loc")" |
| 60 | + publish=bin/Release/net10.0/publish/wwwroot/_framework |
| 61 | + cp "$publish"/*.js "$publish"/*.wasm "$publish"/*.dat pkg/ |
| 62 | +
|
| 63 | + - name: Run web-runner dotnet-data1 test |
| 64 | + shell: bash |
| 65 | + env: |
| 66 | + MISE_ENV: dotnet |
| 67 | + run: cargo test -p et-ws-web-runner module_runs_successfully::case_4_dotnet_data1 -- --nocapture |
0 commit comments