Skip to content

Commit f411c8d

Browse files
committed
Use emsdk from emscripten-forge for deploy build
1 parent a8c460b commit f411c8d

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

.github/workflows/deploy-github-page.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ name: Build and Deploy
22

33
on:
44
workflow_dispatch:
5+
pull_request:
56
push:
67
branches:
78
- main
8-
9+
910
permissions:
1011
contents: read
1112
pages: write
1213
id-token: write
13-
14+
1415
jobs:
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
4843
- name: 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
@@ -66,9 +59,9 @@ jobs:
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

environment-wasm-build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: xeus-r-wasm-build
2+
channels:
3+
- https://repo.mamba.pm/emscripten-forge
4+
- conda-forge
5+
dependencies:
6+
- cmake
7+
- emscripten_emscripten-wasm32==3.1.45

environment-wasm-host.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ channels:
33
- https://repo.mamba.pm/emscripten-forge
44
- https://repo.mamba.pm/conda-forge
55
dependencies:
6+
- emscripten-abi==3.1.45
67
- nlohmann_json
78
- xeus-lite
89
- xeus

0 commit comments

Comments
 (0)