@@ -21,30 +21,20 @@ jobs:
21
21
fail-fast : false
22
22
matrix :
23
23
include :
24
- - name : ubu24-arm-gcc12-clang-repl-19-emscripten
25
- os : ubuntu-24.04-arm
26
- compiler : gcc-12
27
- clang-runtime : ' 19'
28
- cling : Off
29
- llvm_enable_projects : " clang;lld"
30
- llvm_targets_to_build : " WebAssembly"
31
- emsdk_ver : " 3.1.73"
32
24
- name : osx15-arm-clang-clang-repl-19-emscripten
33
25
os : macos-15
34
26
compiler : clang
35
27
clang-runtime : ' 19'
36
28
cling : Off
37
29
llvm_enable_projects : " clang;lld"
38
- llvm_targets_to_build : " WebAssembly"
39
- emsdk_ver : " 3.1.73"
30
+ llvm_targets_to_build : " WebAssembly"
40
31
- name : ubu24-x86-gcc12-clang-repl-19-emscripten
41
32
os : ubuntu-24.04
42
33
compiler : gcc-12
43
34
clang-runtime : ' 19'
44
35
cling : Off
45
36
llvm_enable_projects : " clang;lld"
46
37
llvm_targets_to_build : " WebAssembly"
47
- emsdk_ver : " 3.1.73"
48
38
49
39
steps :
50
40
- uses : actions/checkout@v4
@@ -115,13 +105,6 @@ jobs:
115
105
key : ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-emscripten
116
106
lookup-only : true
117
107
118
- - name : Setup emsdk
119
- if : ${{ runner.os != 'windows' && steps.cache.outputs.cache-hit != 'true' }}
120
- run : |
121
- git clone --depth=1 https://github.com/emscripten-core/emsdk.git
122
- cd emsdk
123
- ./emsdk install ${{ matrix.emsdk_ver }}
124
-
125
108
- name : Setup default Build Type on *nux
126
109
if : ${{ runner.os != 'windows' && steps.cache.outputs.cache-hit != 'true' }}
127
110
run : |
@@ -262,11 +245,17 @@ jobs:
262
245
sudo apt-get autoremove
263
246
sudo apt-get clean
264
247
248
+ - name : install mamba
249
+ if : ${{ steps.cache.outputs.cache-hit != 'true' }}
250
+ uses : mamba-org/setup-micromamba@main
251
+ with :
252
+ environment-file : environment-wasm-build.yml
253
+ init-shell : bash
254
+ environment-name : CppInterOp-wasm-build
255
+
265
256
- name : Build LLVM/Cling on Unix systems if the cache is invalid (emscripten)
266
257
if : ${{ runner.os != 'windows' && steps.cache.outputs.cache-hit != 'true' }}
267
258
run : |
268
- ./emsdk/emsdk activate ${{matrix.emsdk_ver}}
269
- source ./emsdk/emsdk_env.sh
270
259
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
271
260
if [[ "${cling_on}" == "ON" ]]; then
272
261
git clone https://github.com/root-project/cling.git
@@ -465,21 +454,12 @@ jobs:
465
454
clang-runtime : ' 19'
466
455
cling : Off
467
456
micromamba_shell_init : bash
468
- emsdk_ver : " 3.1.73"
469
457
- name : osx15-arm-clang-clang-repl-19-emscripten_wasm
470
458
os : macos-15
471
459
compiler : clang
472
460
clang-runtime : ' 19'
473
461
cling : Off
474
462
micromamba_shell_init : bash
475
- emsdk_ver : " 3.1.73"
476
- - name : ubu24-arm-gcc12-clang-repl-19-emscripten_wasm
477
- os : ubuntu-24.04-arm
478
- compiler : gcc-12
479
- clang-runtime : ' 19'
480
- cling : Off
481
- micromamba_shell_init : bash
482
- emsdk_ver : " 3.1.73"
483
463
484
464
steps :
485
465
- uses : actions/checkout@v4
@@ -524,19 +504,6 @@ jobs:
524
504
echo "ncpus=$(nproc --all)" >> $GITHUB_ENV
525
505
fi
526
506
527
- - name : install mamba
528
- uses : mamba-org/setup-micromamba@main
529
- with :
530
- init-shell : >-
531
- ${{ matrix.micromamba_shell_init }}
532
-
533
- - name : Setup emsdk
534
- shell : bash -l {0}
535
- run : |
536
- git clone --depth=1 https://github.com/emscripten-core/emsdk.git
537
- cd emsdk
538
- ./emsdk install ${{ matrix.emsdk_ver }}
539
-
540
507
- name : Restore Cache LLVM/Clang runtime build directory
541
508
uses : actions/cache/restore@v4
542
509
id : cache
@@ -545,16 +512,22 @@ jobs:
545
512
llvm-project
546
513
${{ matrix.cling=='On' && 'cling' || '' }}
547
514
key : ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-emscripten
515
+
516
+ - name : install mamba
517
+ uses : mamba-org/setup-micromamba@main
518
+ with :
519
+ environment-file : environment-wasm-build.yml
520
+ init-shell : bash
521
+ environment-name : CppInterOp-wasm-build
548
522
549
523
- name : Emscripten build of CppInterOp on Unix systems
550
524
if : ${{ runner.os != 'windows' }}
551
525
shell : bash -l {0}
552
526
run : |
553
- ./emsdk/emsdk activate ${{matrix.emsdk_ver}}
554
- source ./emsdk/emsdk_env.sh
555
- micromamba create -f environment-wasm.yml --platform=emscripten-wasm32
527
+ micromamba create -f environment-wasm-host.yml --platform=emscripten-wasm32
556
528
557
- export PREFIX=$MAMBA_ROOT_PREFIX/envs/CppInterOp-wasm
529
+ export PREFIX=$MAMBA_ROOT_PREFIX/envs/CppInterOp-wasm-host
530
+ export BUILD_PREFIX=$MAMBA_ROOT_PREFIX/envs/CppInterOp-wasm-build
558
531
export CMAKE_PREFIX_PATH=$PREFIX
559
532
export CMAKE_SYSTEM_PREFIX_PATH=$PREFIX
560
533
@@ -597,7 +570,6 @@ jobs:
597
570
-DBUILD_SHARED_LIBS=ON \
598
571
-DCODE_COVERAGE=${{ env.CODE_COVERAGE }} \
599
572
-DCMAKE_INSTALL_PREFIX=$PREFIX \
600
- -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \
601
573
-DLLVM_ENABLE_WERROR=On \
602
574
../
603
575
fi
@@ -612,26 +584,22 @@ jobs:
612
584
echo "LLVM_BUILD_DIR=$LLVM_BUILD_DIR" >> $GITHUB_ENV
613
585
echo "CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH" >> $GITHUB_ENV
614
586
echo "PREFIX=$PREFIX" >> $GITHUB_ENV
587
+ echo "BUILD_PREFIX=$BUILD_PREFIX" >> $GITHUB_ENV
615
588
616
589
- name : Build xeus-cpp
617
590
shell : bash -l {0}
618
591
run : |
619
- ./emsdk/emsdk activate ${{matrix.emsdk_ver}}
620
- source ./emsdk/emsdk_env.sh
621
- export SYSROOT_PATH=$PWD/emsdk/upstream/emscripten/cache/sysroot
622
- micromamba activate CppInterOp-wasm
592
+ export SYSROOT_PATH=$BUILD_PREFIX/opt/emsdk/upstream/emscripten/cache/sysroot
623
593
git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git
624
594
cd ./xeus-cpp
625
595
mkdir build
626
596
pushd build
627
- export CMAKE_PREFIX_PATH=${{ env.PREFIX }}
628
- export CMAKE_SYSTEM_PREFIX_PATH=${{ env.PREFIX }}
629
597
emcmake cmake \
630
598
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
631
599
-DCMAKE_PREFIX_PATH=${{ env.PREFIX }} \
632
600
-DCMAKE_INSTALL_PREFIX=${{ env.PREFIX }} \
633
601
-DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=ON \
634
- -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \
602
+ -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \
635
603
-DCppInterOp_DIR="${{ env.CPPINTEROP_BUILD_DIR }}/lib/cmake/CppInterOp" \
636
604
-DSYSROOT_PATH=$SYSROOT_PATH \
637
605
..
0 commit comments