-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
daf2e16
commit 7a2cc78
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: "Test `main`" | ||
|
||
env: | ||
WASI_SDK_PATH: /opt/wasi-sdk | ||
WASI_SDK_VERSION: "20" | ||
WASMTIME_VERSION: "14.x" | ||
|
||
on: | ||
- workflow_dispatch | ||
|
||
jobs: | ||
test-main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# TODO: cache installation somehow | ||
- name: "Install WASI SDK ${{ env.WASI_SDK_VERSION }}" | ||
run: | | ||
mkdir ${{ env.WASI_SDK_PATH }} && \ | ||
curl -s -S --location https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${{ env.WASI_SDK_VERSION }}/wasi-sdk-${{ env.WASI_SDK_VERSION }}.0-linux.tar.gz | \ | ||
tar --strip-components 1 --directory ${{ env.WASI_SDK_PATH }} --extract --gunzip | ||
$WASI_SDK_PATH/bin/clang --version | ||
- name: "Install wasmtime ${{ env.WASMTIME_VERSION }}" | ||
uses: jcbhmr/setup-wasmtime@v2 | ||
with: | ||
wasmtime-version: ${{ env.WASMTIME_VERSION }} | ||
- name: "Install Python" | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- name: "Checkout CPython" | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: "python/cpython" | ||
- name: "Configure the build python" | ||
run: python3 Tools/wasm/wasi.py configure-build-python -- --with-pydebug | ||
- name: "Make the build python" | ||
run: python3 Tools/wasm/wasi.py make-build-python | ||
- name: "Configure the host" | ||
run: python3 Tools/wasm/wasi.py configure-host | ||
- name: "Make the host" | ||
run: python3 Tools/wasm/wasi.py make-host | ||
- name: "Run tests" | ||
run: make --directory cross-build/wasm32-wasi/ test |