Skip to content

Commit 267965e

Browse files
committed
Run on windows
1 parent 7860645 commit 267965e

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.github/workflows/release.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,22 +178,22 @@ jobs:
178178
OS=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
179179
echo "RUNNER_OS=$OS" >> $GITHUB_ENV
180180
181-
- name: Install WASI-SDK
182-
if: runner.os != 'Windows'
181+
- name: Download WASI-SDK
183182
shell: bash
184183
run: |
185184
cd /tmp
186185
curl -LO https://github.com/dicej/wasi-sdk/releases/download/${WASI_SDK_RELEASE}/wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz
187186
tar xf wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz
188-
sudo mv wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk
187+
188+
- name: Install WASI-SDK
189+
if: runner.os != 'Windows'
190+
shell: bash
191+
run: sudo mv wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk
189192

190193
- name: Install WASI-SDK on Windows
191194
if: runner.os == 'Windows'
192195
shell: bash
193-
run: |
194-
curl -LO https://github.com/dicej/wasi-sdk/releases/download/${WASI_SDK_RELEASE}/wasi-sdk-${WASI_SDK_VERSION}-mingw.tar.gz
195-
tar xf wasi-sdk-${WASI_SDK_VERSION}-mingw.tar.gz
196-
echo "WASI_SDK_PATH=$(cygpath -m $(pwd)/wasi-sdk-${WASI_SDK_VERSION})" >> ${GITHUB_ENV}
196+
run: echo "WASI_SDK_PATH=$(cygpath -m $(pwd)/wasi-sdk-${WASI_SDK_VERSION})" >> ${GITHUB_ENV}
197197

198198
- name: Restore CPython
199199
id: cache-cpython-wasi

.github/workflows/test.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
config:
2323
- { os: "ubuntu-latest", wasiSDK: "linux" }
2424
- { os: "macos-latest", wasiSDK: "macos" }
25+
- { os: "windows-latest", wasiSDK: "mingw" }
2526
runs-on: ${{ matrix.config.os }}
2627
steps:
2728
- name: Checkout
@@ -49,13 +50,22 @@ jobs:
4950
shared-key: "rust-cache-${{ hashFiles('./Cargo.lock') }}"
5051
cache-on-failure: false
5152

52-
- name: Install WASI-SDK
53+
- name: Download WASI-SDK
5354
shell: bash
5455
run: |
5556
cd /tmp
5657
curl -LO https://github.com/dicej/wasi-sdk/releases/download/${WASI_SDK_RELEASE}/wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz
5758
tar xf wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz
58-
sudo mv wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk
59+
60+
- name: Install WASI-SDK
61+
if: runner.os != 'Windows'
62+
shell: bash
63+
run: sudo mv wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk
64+
65+
- name: Install WASI-SDK on Windows
66+
if: runner.os == 'Windows'
67+
shell: bash
68+
run: echo "WASI_SDK_PATH=$(cygpath -m $(pwd)/wasi-sdk-${WASI_SDK_VERSION})" >> ${GITHUB_ENV}
5969

6070
- name: Cache CPython
6171
id: cache-cpython-wasi

0 commit comments

Comments
 (0)