Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
33 changes: 15 additions & 18 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,44 +21,37 @@ 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

export BUILD_PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-build
export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-host
echo "PREFIX=$PREFIX" >> $GITHUB_ENV
export SYSROOT_PATH=$HOME/emsdk/upstream/emscripten/cache/sysroot
export SYSROOT_PATH=$BUILD_PREFIX/opt/emsdk/upstream/emscripten/cache/sysroot

emcmake cmake \
-DCMAKE_BUILD_TYPE=Release \
Expand All @@ -66,9 +60,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 +83,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
14 changes: 1 addition & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,19 +191,7 @@ jobs:
matrix:
include:
- name: ubu24
os: ubuntu-24.04
emsdk_ver: "3.1.45"
micromamba_shell_init: bash
- name: ubu22
os: ubuntu-22.04
emsdk_ver: "3.1.45"
micromamba_shell_init: bash
- name: osx13-x86
os: macos-13
emsdk_ver: "3.1.45"
micromamba_shell_init: bash
- name: osx14-arm
os: macos-14
os: ubuntu-24.04-arm
emsdk_ver: "3.1.45"
micromamba_shell_init: bash
- name: osx15-arm
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-cpp-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