Skip to content

Commit 4f9a02d

Browse files
authored
Update tools & wasi-sdk in CI (#1696)
* Update tools & wasi-sdk in CI * Fixup C++ tests with newer wasi-sdk * Pin wasi-sdk for C#
1 parent 0b0069d commit 4f9a02d

8 files changed

Lines changed: 12 additions & 56 deletions

File tree

.github/actions/install-wasi-sdk/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: 'Install the wasi-sdk toolchain'
44
inputs:
55
version:
66
description: "Wasi-sdk version to install"
7-
default: "30"
7+
default: "34"
88

99
runs:
1010
using: composite
@@ -34,8 +34,8 @@ runs:
3434
- name: Setup `wasm-tools`
3535
uses: bytecodealliance/actions/wasm-tools/setup@v1
3636
with:
37-
version: "1.252.0"
37+
version: "1.258.0"
3838
- name: Setup `wasmtime`
3939
uses: bytecodealliance/actions/wasmtime/setup@v1
4040
with:
41-
version: "46.0.1"
41+
version: "48.0.1"

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ jobs:
103103
with:
104104
dotnet-version: '9.x'
105105
if: matrix.lang == 'csharp'
106+
- uses: ./.github/actions/install-wasi-sdk
107+
if: matrix.lang == 'csharp'
108+
with:
109+
version: 29
106110

107111
# As of this writing async tests require [a patched build of
108112
# Go](https://github.com/dicej/go/releases/tag/go1.25.5-wasi-on-idle).

tests/runtime/lists/runner.cpp

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#include <assert.h>
2+
#include <cmath>
23
#include <limits.h>
34
#include <float.h>
45
#include <runner_cpp.h>
6+
#include <vector>
57

68
static bool equal(wit::string const&a, std::string_view b) {
79
return a.get_view() == b;
@@ -22,18 +24,6 @@ static bool equal(std::span<R> const&a, std::span<S> const& b) {
2224
return true;
2325
}
2426
template<class R>
25-
static bool equal(wit::vector<R> const&a, std::span<R> const& b) {
26-
return equal(a.get_view(), b);
27-
}
28-
template<class R>
29-
static bool equal(std::span<const R> const&a, wit::vector<R> const& b) {
30-
return equal(b, a);
31-
}
32-
template<class R>
33-
static bool equal(std::span<const R> const&a, std::vector<R> const& b) {
34-
return equal(a, std::span<R>(b));
35-
}
36-
template<class R>
3727
static bool equal(wit::vector<R> const&a, std::vector<R> const& b) {
3828
return equal(a.get_view(), std::span<R const>(b));
3929
}
@@ -45,11 +35,6 @@ static bool equal(std::tuple<R,S> const&a, std::tuple<T,U> const& b) {
4535
return equal(std::get<0>(a), std::get<0>(b)) && equal(std::get<1>(a), std::get<1>(b));
4636
}
4737

48-
template <class T>
49-
static bool equal(T const& a, T const& b) {
50-
return a==b;
51-
}
52-
5338
void exports::runner::Run()
5439
{
5540
using namespace ::test::lists::to_test;

tests/runtime/lists/test.cpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <test_cpp.h>
33
#include <float.h>
44
#include <math.h>
5+
#include <vector>
56

67
uint32_t exports::test::lists::to_test::AllocatedBytes() {
78
return 0;
@@ -20,25 +21,9 @@ static bool equal(std::span<R> const&a, std::span<S> const& b) {
2021
return true;
2122
}
2223
template<class R>
23-
static bool equal(wit::vector<R> const&a, std::span<R> const& b) {
24-
return equal(a.get_view(), b);
25-
}
26-
template<class R>
27-
static bool equal(std::span<const R> const&a, wit::vector<R> const& b) {
28-
return equal(b, a);
29-
}
30-
template<class R>
31-
static bool equal(std::span<const R> const&a, std::vector<R> const& b) {
32-
return equal(a, std::span<const R>(b));
33-
}
34-
template<class R>
3524
static bool equal(wit::vector<R> const&a, std::vector<R> const& b) {
3625
return equal(a.get_view(), std::span<R const>(b));
3726
}
38-
template<class R,class S, class T, class U>
39-
static bool equal(std::tuple<R,S> const&a, std::tuple<T,U> const& b) {
40-
return equal(std::get<0>(a), std::get<0>(b)) && equal(std::get<1>(a), std::get<1>(b));
41-
}
4227

4328
static bool equal(wit::string const& a, std::string_view b) {
4429
return a.get_view() == b;

tests/runtime/numbers/runner.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <assert.h>
2+
#include <cmath>
23
#include <limits.h>
34
#include <runner_cpp.h>
45

tests/runtime/resource_borrow_in_record/runner.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <runner_cpp.h>
2+
#include <array>
23

34
namespace test_imports = ::test::resource_borrow_in_record::to_test;
45
#include <iostream>

tests/runtime/results/runner.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,6 @@ static bool equal(std::expected<T, U> const& a, std::expected<T, U> const& b) {
3030
return equal(a.error(), b.error());
3131
}
3232
}
33-
template <class U>
34-
static bool equal(std::expected<void, U> const& a, std::expected<void, U> const& b) {
35-
if (a.has_value()) {
36-
if (!b.has_value()) return false;
37-
return true;
38-
} else {
39-
if (b.has_value()) return false;
40-
return equal(a.error(), b.error());
41-
}
42-
}
4333
static bool equal(std::expected<void, wit::string> const& a, std::expected<void, std::string_view> const& b) {
4434
if (a.has_value()) {
4535
if (!b.has_value()) return false;

tests/runtime/variants/runner.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,6 @@ static bool equal(std::expected<void, U> const& a, std::expected<void, U> const&
110110
}
111111
}
112112
template <class T>
113-
static bool equal(std::expected<T, wit::string> const& a, std::expected<T, std::string_view> const& b) {
114-
if (a.has_value()) {
115-
if (!b.has_value()) return false;
116-
return equal(*a, *b);
117-
} else {
118-
if (b.has_value()) return false;
119-
return equal(a.error().get_view(), b.error());
120-
}
121-
}
122-
template <class T>
123113
static bool equal(std::optional<T> const& a, std::optional<T> const& b) {
124114
if (a.has_value() != b.has_value()) return false;
125115
if (a.has_value()) {

0 commit comments

Comments
 (0)