File tree Expand file tree Collapse file tree 5 files changed +21
-15
lines changed Expand file tree Collapse file tree 5 files changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -29,25 +29,25 @@ jobs:
29
29
- name : Install mamba
30
30
uses : mamba-org/provision-with-micromamba@main
31
31
with :
32
- environment-file : env.yaml
33
- environment-name : pyjs-wasm
32
+ environment-file : build- env.yaml
33
+ environment-name : pyjs-build-env
34
34
micromamba-version : " 0.23.2"
35
35
36
36
37
37
- name : build page
38
38
run : |
39
- micromamba activate pyjs-wasm
39
+ micromamba activate pyjs-build-env
40
40
41
41
42
42
mkdir build
43
43
pushd build
44
44
45
- micromamba create -n pyjs-browser -env \
45
+ micromamba create -n pyjs-web -env \
46
46
--platform=emscripten-32 \
47
47
-c https://repo.mamba.pm/emscripten-forge \
48
48
-c https://repo.mamba.pm/conda-forge \
49
49
--yes \
50
- "pyjs==0.8.0" numpy
50
+ -f $GITHUB_WORKSPACE/web-env.yaml
51
51
52
52
53
53
# donload empack config
57
57
58
58
59
59
# pack the environment in a js/data file
60
- empack pack env --env-prefix $MAMBA_ROOT_PREFIX/envs/pyjs-browser -env --outname python_data --config empack_config.yaml
60
+ empack pack env --env-prefix $MAMBA_ROOT_PREFIX/envs/pyjs-web -env --outname python_data --config empack_config.yaml
61
61
62
62
63
63
# copy relevant files from build to page
66
66
67
67
68
68
# copy relevant files from env to page
69
- cp $MAMBA_ROOT_PREFIX/envs/pyjs-browser -env/lib_js/pyjs/pyjs_runtime_browser* ../page
69
+ cp $MAMBA_ROOT_PREFIX/envs/pyjs-web -env/lib_js/pyjs/pyjs_runtime_browser* ../page
70
70
71
71
- name : Deploy
72
72
uses : peaceiris/actions-gh-pages@v3
Original file line number Diff line number Diff line change 1
- name : pyjs-wasm
1
+ name : pyjs-build-env
2
2
channels :
3
3
- conda-forge
4
4
dependencies :
Original file line number Diff line number Diff line change 2
2
set -e
3
3
4
4
# install wasm env
5
- rm -rf $MAMBA_ROOT_PREFIX /envs/pyjs-build-wasm
6
- micromamba create -n pyjs-build-wasm \
5
+ rm -rf $MAMBA_ROOT_PREFIX /envs/pyjs-web-env
6
+ micromamba create -n pyjs-web-env \
7
7
--platform=emscripten-32 \
8
8
-c https://repo.mamba.pm/emscripten-forge \
9
9
-c https://repo.mamba.pm/conda-forge \
10
10
--yes \
11
- " pyjs==0.8.0 " numpy
11
+ -f web-env.yaml
12
12
13
13
# create build/work dir
14
14
mkdir -p build
@@ -21,15 +21,15 @@ wget -O $EMPACK_CONFIG https://raw.githubusercontent.com/emscripten-forge/recipe
21
21
22
22
23
23
# pack the environment in a js/data file
24
- empack pack env --env-prefix $MAMBA_ROOT_PREFIX /envs/pyjs-build-wasm --outname python_data --config empack_config.yaml
24
+ empack pack env --env-prefix $MAMBA_ROOT_PREFIX /envs/pyjs-web-env --outname python_data --config empack_config.yaml
25
25
26
26
27
27
# copy relevant files from build to page
28
28
cp python_data.js ../page
29
29
cp python_data.data ../page
30
30
31
31
# copy relevant files from env to page
32
- cp $MAMBA_ROOT_PREFIX /envs/pyjs-build-wasm /lib_js/pyjs/pyjs_runtime_browser* ../page
32
+ cp $MAMBA_ROOT_PREFIX /envs/pyjs-web-env /lib_js/pyjs/pyjs_runtime_browser* ../page
33
33
34
34
cd ../page
35
35
Original file line number Diff line number Diff line change @@ -94,9 +94,8 @@ var Module = {};
94
94
pyjs . setStatus = setStatus
95
95
addToOutput ( "Download data ..." )
96
96
var promise_core = await import ( './python_data.js' )
97
- pyjs . init ( )
97
+ await pyjs . init ( )
98
98
99
- var deps = await pyjs . _wait_run_dependencies ( )
100
99
addToOutput ( "...done" )
101
100
interpreter = new pyjs . Interpreter ( )
102
101
main_scope = pyjs . main_scope ( )
Original file line number Diff line number Diff line change
1
+ name : pyjs-web-env
2
+ channels :
3
+ - https://repo.mamba.pm/emscripten-forge
4
+ - conda-forge
5
+ dependencies :
6
+ - pyjs == 0.9.0
7
+ - numpy
You can’t perform that action at this time.
0 commit comments