From 1f7afd12e1dae7b72129d38c73309c24cb47cf8a Mon Sep 17 00:00:00 2001 From: Jacob Steves Date: Thu, 12 Nov 2026 13:34:52 -0500 Subject: [PATCH 1/2] Run CI tests and builds on Linux, Windows, and macOS --- .github/workflows/ci.yml | 14 ++++++++++++-- integration_tests/src/lib.rs | 10 ++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b1e8f8..ed2075e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,14 +22,24 @@ jobs: run: cargo clippy --tests test: - runs-on: ubuntu-latest + name: test (${{ matrix.os }}) + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Run tests run: cargo test build: - runs-on: ubuntu-latest + name: build (${{ matrix.os }}) + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Build diff --git a/integration_tests/src/lib.rs b/integration_tests/src/lib.rs index 9203edb..12892eb 100644 --- a/integration_tests/src/lib.rs +++ b/integration_tests/src/lib.rs @@ -46,7 +46,10 @@ fn build_example(name: &str) -> Result<()> { } static FUNCTION_RUNNER_PATH: LazyLock> = LazyLock::new(|| { - let path = workspace_root().join(format!("tmp/function-runner-{FUNCTION_RUNNER_VERSION}")); + let path = workspace_root().join(format!( + "tmp/function-runner-{FUNCTION_RUNNER_VERSION}{}", + std::env::consts::EXE_SUFFIX + )); if !path.exists() { std::fs::create_dir_all(workspace_root().join("tmp"))?; @@ -57,7 +60,10 @@ static FUNCTION_RUNNER_PATH: LazyLock> = LazyLock::new(| }); static TRAMPOLINE_PATH: LazyLock> = LazyLock::new(|| { - let path = workspace_root().join(format!("tmp/trampoline-{TRAMPOLINE_VERSION}")); + let path = workspace_root().join(format!( + "tmp/trampoline-{TRAMPOLINE_VERSION}{}", + std::env::consts::EXE_SUFFIX + )); if !path.exists() { std::fs::create_dir_all(workspace_root().join("tmp"))?; download_trampoline(&path)?; From b725381ac5ff7a8e83625d2ec8e2b92e35c0a4ee Mon Sep 17 00:00:00 2001 From: Jacob Steves Date: Thu, 12 Nov 2026 13:43:37 -0500 Subject: [PATCH 2/2] Make panic test expectation platform-aware for Windows --- integration_tests/tests/integration_test.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/integration_tests/tests/integration_test.rs b/integration_tests/tests/integration_test.rs index 3f3f97d..f54d579 100644 --- a/integration_tests/tests/integration_test.rs +++ b/integration_tests/tests/integration_test.rs @@ -107,10 +107,19 @@ fn test_example_with_panic() -> Result<()> { let err = run_example(path.clone(), "target_panic", input) .unwrap_err() .to_string(); - let expected_err = - "Function runner returned non-zero exit code: exit status: 1, logs: panicked at example_with_targets/src/main.rs:57:5:\nSomething went wrong\nerror while executing at wasm backtrace:"; + // `ExitStatus` is displayed differently on Windows, and the panic location + // uses the platform's path separator. + let exit_status = if cfg!(windows) { + "exit code: 1" + } else { + "exit status: 1" + }; + let sep = std::path::MAIN_SEPARATOR; + let expected_err = format!( + "Function runner returned non-zero exit code: {exit_status}, logs: panicked at example_with_targets{sep}src{sep}main.rs:57:5:\nSomething went wrong\nerror while executing at wasm backtrace:" + ); assert!( - err.contains(expected_err), + err.contains(&expected_err), "Expected error message to contain:\n`{expected_err}`\nbut was:\n`{err}`" ); Ok(())