Skip to content

Update xeus-cpp-lite to use emsdk 3.1.73 #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 29, 2025
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
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
Loading