Skip to content

Commit 8d1bf5a

Browse files
committed
chore(CI): add dl-wasi-sdk step
1 parent 36b54ac commit 8d1bf5a

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/rust-host.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ jobs:
55
build-and-test:
66
runs-on: ubuntu-latest
77
steps:
8+
- name: Set variables based on OS and architecture for just dl-wasi-sdk
9+
run: |
10+
if [ "${{ runner.arch }}" = "X64" ]; then
11+
echo "WASI_ARCH=x86_64" >> $GITHUB_ENV
12+
else
13+
echo "WASI_ARCH=arm64" >> $GITHUB_ENV
14+
fi
15+
if [ "${{ runner.os }}" = "Windows" ]; then
16+
echo "WASI_OS=windows" >> $GITHUB_ENV
17+
else
18+
echo "WASI_OS=linux" >> $GITHUB_ENV
19+
fi
20+
echo "WASI_VERSION_FULL=25.0" >> $GITHUB_ENV
821
- uses: actions/checkout@v4
922
- uses: actions-rs/toolchain@v1
1023
with:
@@ -15,6 +28,10 @@ jobs:
1528
- uses: extractions/setup-just@v3
1629
- name: Install cargo-component
1730
run: cargo binstall cargo-component@0.21.1
31+
- name: Install wasi-sdk
32+
run: |
33+
mkdir c_deps
34+
just dl-wasi-sdk
1835
- name: Build
1936
run: just build
2037
- name: Test

.github/workflows/web-host.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ jobs:
55
build:
66
runs-on: ubuntu-latest
77
steps:
8+
- name: Set variables based on OS and architecture for just dl-wasi-sdk
9+
run: |
10+
if [ "${{ runner.arch }}" = "X64" ]; then
11+
echo "WASI_ARCH=x86_64" >> $GITHUB_ENV
12+
else
13+
echo "WASI_ARCH=arm64" >> $GITHUB_ENV
14+
fi
15+
if [ "${{ runner.os }}" = "Windows" ]; then
16+
echo "WASI_OS=windows" >> $GITHUB_ENV
17+
else
18+
echo "WASI_OS=linux" >> $GITHUB_ENV
19+
fi
20+
echo "WASI_VERSION_FULL=25.0" >> $GITHUB_ENV
821
- uses: actions/checkout@v4
922
- uses: actions-rs/toolchain@v1
1023
with:
@@ -18,6 +31,10 @@ jobs:
1831
- uses: extractions/setup-just@v3
1932
- name: Install cargo-component
2033
run: cargo binstall cargo-component@0.21.1
34+
- name: Install wasi-sdk
35+
run: |
36+
mkdir c_deps
37+
just dl-wasi-sdk
2138
- name: Install JavaScript dependencies
2239
run: npm ci
2340
- name: Build

0 commit comments

Comments
 (0)