Skip to content

Commit

Permalink
Update xeus-cpp-lite to use emsdk 3.1.73 (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
anutosh491 authored Jan 29, 2025
1 parent ba37f4f commit 5076c46
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 33 deletions.
34 changes: 8 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,9 @@ jobs:
matrix:
include:
- name: ubu24
os: ubuntu-24.04-arm
emsdk_ver: "3.1.45"
micromamba_shell_init: bash
os: ubuntu-24.04
- name: osx15-arm
os: macos-15
emsdk_ver: "3.1.45"
micromamba_shell_init: bash

steps:
- uses: actions/checkout@v4
Expand All @@ -215,8 +211,9 @@ jobs:
- name: install mamba
uses: mamba-org/setup-micromamba@main
with:
init-shell: >-
${{ matrix.micromamba_shell_init }}
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' }}
Expand All @@ -227,34 +224,19 @@ jobs:
else
echo "ncpus=$(nproc --all)" >> $GITHUB_ENV
fi
- name: Setup default Build Type on Windows
if: ${{ runner.os == 'windows' }}
run: |
$env:ncpus=$([Environment]::ProcessorCount)
echo "ncpus=$env:ncpus" >> $env: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 PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-host
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 @@ -263,7 +245,7 @@ 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
shell: bash -l {0}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ You are now in a position to build the xeus-cpp kernel. You build it by executin
micromamba create -f environment-wasm-host.yml --platform=emscripten-wasm32
mkdir build
cd build
export BUILD_TOOLS_PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-build
export BUILD_PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-build
export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-host
export SYSROOT_PATH=$BUILD_TOOLS_PREFIX/opt/emsdk/upstream/emscripten/cache/sysroot
export SYSROOT_PATH=$BUILD_PREFIX/opt/emsdk/upstream/emscripten/cache/sysroot

emcmake cmake \
-DCMAKE_BUILD_TYPE=Release \
Expand Down
4 changes: 2 additions & 2 deletions environment-wasm-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: xeus-cpp-wasm-build
channels:
- https://repo.mamba.pm/emscripten-forge
- https://repo.prefix.dev/emscripten-forge-dev
- conda-forge
dependencies:
- cmake
- emscripten_emscripten-wasm32==3.1.45
- emscripten_emscripten-wasm32==3.1.73
5 changes: 2 additions & 3 deletions environment-wasm-host.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: xeus-cpp-wasm-host
channels:
- https://repo.mamba.pm/emscripten-forge
- https://repo.prefix.dev/emscripten-forge-dev
- https://repo.mamba.pm/conda-forge
dependencies:
- emscripten-abi==3.1.45
- nlohmann_json
- xeus-lite
- xeus
- CppInterOp>=1.5.0
- cpp-argparse
- pugixml
- pugixml

0 comments on commit 5076c46

Please sign in to comment.