[mlir-wgpu] add webgpu runtime wrappers #152
This file contains hidden or 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
| name: Deploy static content to Pages | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| workflow_call: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/deploy_pip_page.yml" | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: false | |
| - name: Download pip links | |
| shell: bash | |
| run: | | |
| wget https://github.com/llvm/eudsl/releases/expanded_assets/mlir-python-bindings | |
| wget https://github.com/llvm/eudsl/releases/expanded_assets/eudsl | |
| wget https://github.com/llvm/eudsl/releases/expanded_assets/llvm | |
| wget https://github.com/llvm/eudsl/releases/expanded_assets/eudsl-python-extras | |
| cat mlir-python-bindings eudsl llvm eudsl-python-extras > index.html | |
| sed -i.bak 's/\/llvm\/eudsl/https:\/\/github.com\/llvm\/eudsl/g' index.html | |
| mkdir -p page && mv index.html page | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Fetch latest WASM wheel | |
| run: | | |
| pip download mlir-python-bindings --plat pyodide_2025_0_wasm32 --no-deps --python-version 3.13 -f https://llvm.github.io/eudsl | |
| echo "MLIR_PYTHON_WHEEL_NAME=$(ls mlir_python_bindings*)" >> $GITHUB_ENV | |
| pip wheel eudsl-python-extras -f https://llvm.github.io/eudsl --no-deps -w . | |
| echo "EUDSL_PYTHON_EXTRAS_WHEEL_NAME=$(ls eudsl_python_extras*)" >> $GITHUB_ENV | |
| - name: Create WASM console page | |
| run: | | |
| mkdir -p page/console | |
| cp pages/console/index.html page/console/index.html | |
| cp $MLIR_PYTHON_WHEEL_NAME page/console/mlir_python_bindings-0.0.1-cp312-cp312-pyodide_2024_0_wasm32.whl | |
| cp $EUDSL_PYTHON_EXTRAS_WHEEL_NAME page/console/eudsl_python_extras-0.0.1-py3-none-any.whl | |
| - name: Create WASM jupyterlite page | |
| run: | | |
| mkdir -p page/jupyter | |
| python -m pip install -r pages/jupyter/requirements.txt | |
| jupyter lite build \ | |
| --contents pages/jupyter/contents \ | |
| --output-dir page/jupyter \ | |
| --piplite-wheels $MLIR_PYTHON_WHEEL_NAME \ | |
| --piplite-wheels $EUDSL_PYTHON_EXTRAS_WHEEL_NAME | |
| - name: Show directory structure | |
| run: | | |
| tree page | |
| - uses: geekyeggo/delete-artifact@v5 | |
| with: | |
| name: github-pages | |
| failOnError: false | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: page | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |