Skip to content

Test main

Test main #1

Workflow file for this run

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