@@ -2,15 +2,16 @@ name: Build and Deploy
22
33on :
44  workflow_dispatch :
5+   pull_request :
56  push :
67    branches :
78    - main 
8-      
9+ 
910permissions :
1011  contents : read 
1112  pages : write 
1213  id-token : write 
13-      
14+ 
1415jobs :
1516  build :
1617    runs-on : ${{ matrix.os }} 
@@ -20,38 +21,30 @@ jobs:
2021      matrix :
2122        include :
2223          - name : Github-page 
23-             os : macos-15 
24+             os : ubuntu-24.04 
2425            emsdk_ver : " 3.1.45" 
2526    steps :
2627      - uses : actions/checkout@v4 
2728        with :
2829          fetch-depth : 0 
29-          
30+ 
3031      - name : install mamba 
3132        uses : mamba-org/setup-micromamba@main 
3233        with :
34+           environment-file : environment-wasm-build.yml 
3335          init-shell : bash 
36+           environment-name : xeus-cpp-wasm-build 
3437
3538      - name : Setup default Build Type on *nux 
3639        if : ${{ runner.os != 'windows' }} 
3740        run : | 
3841          echo "ncpus=$(nproc --all)" >> $GITHUB_ENV 
39-            
40- name : Setup emsdk 
41-         shell : bash -l {0} 
42-         run : | 
43-           cd $HOME 
44-           git clone --depth=1 https://github.com/emscripten-core/emsdk.git 
45-           cd emsdk 
46-           ./emsdk install  ${{ matrix.emsdk_ver }}     
4742
4843name : Build xeus-cpp 
4944        shell : bash -l {0} 
5045        run : | 
51-           $HOME/emsdk/emsdk activate ${{matrix.emsdk_ver}} 
52-           source $HOME/emsdk/emsdk_env.sh 
5346          micromamba create -f environment-wasm-host.yml --platform=emscripten-wasm32 
54-            
47+ 
5548          mkdir build 
5649          pushd build 
5750
6659            -DCMAKE_FIND_ROOT_PATH=$PREFIX                    \ 
6760            -DSYSROOT_PATH=$SYSROOT_PATH                      \ 
6861            .. 
69-           emmake make -j   ${{ env.ncpus }} install 
62+           emmake make -j ${{ env.ncpus }} install 
7063
71- name : Jupyter Lite integration   
64+ name : Jupyter Lite integration 
7265        shell : bash -l {0} 
7366        run : | 
7467          micromamba create -n xeus-lite-host jupyterlite-core jupyter_server 
@@ -89,12 +82,15 @@ jobs:
8982
9083  deploy :
9184    needs : build 
85+     if : github.ref == 'refs/heads/main' 
9286    permissions :
9387      pages : write 
9488      id-token : write 
89+ 
9590    environment :
9691      name : github-pages 
9792      url : ${{ steps.deployment.outputs.page_url }} 
93+ 
9894    runs-on : ubuntu-24.04 
9995    steps :
10096      - name : Deploy to GitHub Pages 
0 commit comments