Skip to content

Commit

Permalink
Run on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
benbrandt committed Oct 24, 2024
1 parent 7860645 commit 5aa61d1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,22 +178,22 @@ jobs:
OS=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
echo "RUNNER_OS=$OS" >> $GITHUB_ENV
- name: Install WASI-SDK
if: runner.os != 'Windows'
- name: Download WASI-SDK
shell: bash
run: |
cd /tmp
curl -LO https://github.com/dicej/wasi-sdk/releases/download/${WASI_SDK_RELEASE}/wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz
tar xf wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz
sudo mv wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk
- name: Install WASI-SDK
if: runner.os != 'Windows'
shell: bash
run: sudo mv /tmp/wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk

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

- name: Restore CPython
id: cache-cpython-wasi
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
config:
- { os: "ubuntu-latest", wasiSDK: "linux" }
- { os: "macos-latest", wasiSDK: "macos" }
- { os: "windows-latest", wasiSDK: "mingw" }
runs-on: ${{ matrix.config.os }}
steps:
- name: Checkout
Expand Down Expand Up @@ -49,13 +50,22 @@ jobs:
shared-key: "rust-cache-${{ hashFiles('./Cargo.lock') }}"
cache-on-failure: false

- name: Install WASI-SDK
- name: Download WASI-SDK
shell: bash
run: |
cd /tmp
curl -LO https://github.com/dicej/wasi-sdk/releases/download/${WASI_SDK_RELEASE}/wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz
tar xf wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz
sudo mv wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk
- name: Install WASI-SDK
if: runner.os != 'Windows'
shell: bash
run: sudo mv /tmp/wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk

- name: Install WASI-SDK on Windows
if: runner.os == 'Windows'
shell: bash
run: echo "WASI_SDK_PATH=$(cygpath -m /tmp/wasi-sdk-${WASI_SDK_VERSION})" >> ${GITHUB_ENV}

- name: Cache CPython
id: cache-cpython-wasi
Expand Down

0 comments on commit 5aa61d1

Please sign in to comment.