Skip to content

Commit

Permalink
Add correct options to build xeus-cpp-lite deployment correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbarton authored Jan 8, 2025
1 parent c446c3e commit 2f2f032
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,13 @@ jobs:
shell: bash -l {0}
run: |
./emsdk/emsdk activate ${{matrix.emsdk_ver}}
source ./emsdk/emsdk_env.sh
source ./emsdk/emsdk_env.sh
micromamba create -f environment-wasm.yml --platform=emscripten-wasm32
export PREFIX=$MAMBA_ROOT_PREFIX/envs/CppInterOp-wasm
export CMAKE_PREFIX_PATH=$PREFIX
export CMAKE_SYSTEM_PREFIX_PATH=$PREFIX
export LDFLAGS="-s MODULARIZE=1 -s LINKABLE=1 -s EXPORT_ALL=1 -s WASM=1 -std=c++14 -s SIDE_MODULE=1 -sWASM_BIGINT"
LLVM_DIR="$(pwd)/llvm-project"
LLVM_BUILD_DIR="$(pwd)/llvm-project/build"
Expand Down Expand Up @@ -142,7 +143,7 @@ jobs:
../
fi
emmake make -j ${{ env.ncpus }}
emmake make -j ${{ env.ncpus }} install
cd ..
Expand All @@ -159,6 +160,7 @@ jobs:
./emsdk/emsdk activate ${{matrix.emsdk_ver}}
source ./emsdk/emsdk_env.sh
export SYSROOT_PATH=$PWD/emsdk/upstream/emscripten/cache/sysroot
export LDFLAGS="-s MODULARIZE=1 -s LINKABLE=1 -s EXPORT_ALL=1 -s WASM=1 -std=c++14 -sWASM_BIGINT"
micromamba activate CppInterOp-wasm
git clone https://github.com/compiler-research/xeus-cpp.git
cd ./xeus-cpp
Expand All @@ -181,12 +183,12 @@ jobs:
shell: bash -l {0}
run: |
cd ./xeus-cpp/
micromamba create -n xeus-lite-host jupyterlite-core
micromamba create -n xeus-lite-host jupyterlite-core -c conda-forge
micromamba activate xeus-lite-host
python -m pip install jupyterlite-xeus
jupyter lite build --XeusAddon.prefix=${{ env.PREFIX }} --output-dir dist
cp ${{ env.PREFIX }}/bin/xcpp.data dist/extensions/@jupyterlite/xeus/static
cp ${{ env.CPPINTEROP_BUILD_DIR }}/lib/libclangCppInterOp.so dist/extensions/@jupyterlite/xeus/static
cp ${{ env.PREFIX }}/lib/libclangCppInterOp.so dist/extensions/@jupyterlite/xeus/static
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ jobs:
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_ENABLE_THREADS=OFF \
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
../llvm
emmake make clang -j ${{ env.ncpus }}
emmake make cling -j ${{ env.ncpus }}
Expand Down Expand Up @@ -331,6 +333,8 @@ jobs:
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_ENABLE_THREADS=OFF \
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
../llvm
emmake make clang -j ${{ env.ncpus }}
emmake make clang-repl -j ${{ env.ncpus }}
Expand Down Expand Up @@ -541,12 +545,13 @@ jobs:
shell: bash -l {0}
run: |
./emsdk/emsdk activate ${{matrix.emsdk_ver}}
source ./emsdk/emsdk_env.sh
source ./emsdk/emsdk_env.sh
micromamba create -f environment-wasm.yml --platform=emscripten-wasm32
export PREFIX=$MAMBA_ROOT_PREFIX/envs/CppInterOp-wasm
export CMAKE_PREFIX_PATH=$PREFIX
export CMAKE_SYSTEM_PREFIX_PATH=$PREFIX
export LDFLAGS="-s MODULARIZE=1 -s LINKABLE=1 -s EXPORT_ALL=1 -s WASM=1 -std=c++14 -s SIDE_MODULE=1 -sWASM_BIGINT"
LLVM_DIR="$(pwd)/llvm-project"
LLVM_BUILD_DIR="$(pwd)/llvm-project/build"
Expand Down Expand Up @@ -590,7 +595,7 @@ jobs:
../
fi
emmake make -j ${{ env.ncpus }}
emmake make -j ${{ env.ncpus }} install
cd ..
Expand All @@ -607,6 +612,7 @@ jobs:
./emsdk/emsdk activate ${{matrix.emsdk_ver}}
source ./emsdk/emsdk_env.sh
export SYSROOT_PATH=$PWD/emsdk/upstream/emscripten/cache/sysroot
export LDFLAGS="-s MODULARIZE=1 -s LINKABLE=1 -s EXPORT_ALL=1 -s WASM=1 -std=c++14 -sWASM_BIGINT"
micromamba activate CppInterOp-wasm
git clone https://github.com/compiler-research/xeus-cpp.git
cd ./xeus-cpp
Expand All @@ -623,4 +629,4 @@ jobs:
-DCppInterOp_DIR="${{ env.CPPINTEROP_BUILD_DIR }}/lib/cmake/CppInterOp" \
-DSYSROOT_PATH=$SYSROOT_PATH \
..
emmake make -j ${{ env.ncpus }}
emmake make -j ${{ env.ncpus }} install

0 comments on commit 2f2f032

Please sign in to comment.