async kernels with native even loop -- no libuv #97
Workflow file for this run
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: build and deploy | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Github-page | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install mamba | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-file: environment-wasm-build.yml | |
| init-shell: bash | |
| environment-name: xeus-python-wasm-build | |
| - name: Set ncpus | |
| run: echo "ncpus=$(nproc --all)" >> $GITHUB_ENV | |
| - name: Build xeus-python | |
| shell: bash -l {0} | |
| run: | | |
| micromamba create \ | |
| -f environment-wasm-host.yml --platform=emscripten-wasm32 \ | |
| -c https://prefix.dev/emscripten-forge-dev \ | |
| -c https://prefix.dev/conda-forge | |
| set -eux | |
| URL=https://github.com/DerThorsten/xeus-python-shell/archive/refs/heads/libuv.zip | |
| curl -L $URL -o xeus-python-shell-libuv.zip | |
| unzip xeus-python-shell-libuv.zip | |
| export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-python-wasm-host | |
| echo "PREFIX=$PREFIX" >> $GITHUB_ENV | |
| emcmake cmake . \ | |
| -DCMAKE_PREFIX_PATH=$PREFIX \ | |
| -DCMAKE_INSTALL_PREFIX=$PREFIX \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \ | |
| -DXPYT_EMSCRIPTEN_WASM_BUILD=ON \ | |
| -DCMAKE_VERBOSE_MAKEFILE=ON | |
| emmake make -j${{ env.ncpus }} install | |
| - name: Jupyter Lite integration | |
| shell: bash -l {0} | |
| run: | | |
| THIS_DIR=$(pwd) | |
| jupyter lite build \ | |
| --XeusAddon.prefix=${{ env.PREFIX }} \ | |
| --contents notebooks/ \ | |
| --output-dir dist \ | |
| --XeusAddon.mounts=$THIS_DIR/xeus-python-shell-libuv/xeus_python_shell/:/lib/python3.13/site-packages/xeus_python_shell/ | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: ./dist | |
| deploy: | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |