Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions .github/workflows/deploy-github-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ name: Build and Deploy

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -20,38 +21,30 @@ jobs:
matrix:
include:
- name: Github-page
os: macos-15
os: ubuntu-24.04
emsdk_ver: "3.1.45"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: install mamba
uses: mamba-org/setup-micromamba@main
with:
environment-file: environment-wasm-build.yml
init-shell: bash
environment-name: xeus-cpp-wasm-build

- name: Setup default Build Type on *nux
if: ${{ runner.os != 'windows' }}
run: |
echo "ncpus=$(nproc --all)" >> $GITHUB_ENV

- name: Setup emsdk
shell: bash -l {0}
run: |
cd $HOME
git clone --depth=1 https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install ${{ matrix.emsdk_ver }}

- name: Build xeus-cpp
shell: bash -l {0}
run: |
$HOME/emsdk/emsdk activate ${{matrix.emsdk_ver}}
source $HOME/emsdk/emsdk_env.sh
micromamba create -f environment-wasm-host.yml --platform=emscripten-wasm32

mkdir build
pushd build

Expand All @@ -66,9 +59,9 @@ jobs:
-DCMAKE_FIND_ROOT_PATH=$PREFIX \
-DSYSROOT_PATH=$SYSROOT_PATH \
..
emmake make -j ${{ env.ncpus }} install
emmake make -j ${{ env.ncpus }} install

- name: Jupyter Lite integration
- name: Jupyter Lite integration
shell: bash -l {0}
run: |
micromamba create -n xeus-lite-host jupyterlite-core jupyter_server
Expand All @@ -89,12 +82,15 @@ jobs:

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-24.04
steps:
- name: Deploy to GitHub Pages
Expand Down
7 changes: 7 additions & 0 deletions environment-wasm-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: xeus-r-wasm-build
channels:
- https://repo.mamba.pm/emscripten-forge
- conda-forge
dependencies:
- cmake
- emscripten_emscripten-wasm32==3.1.45
1 change: 1 addition & 0 deletions environment-wasm-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ channels:
- https://repo.mamba.pm/emscripten-forge
- https://repo.mamba.pm/conda-forge
dependencies:
- emscripten-abi==3.1.45
- nlohmann_json
- xeus-lite
- xeus
Expand Down
Loading