Skip to content

Commit aee8cbe

Browse files
committed
build_pyodide.yaml - move build_pyodide to a separate script
1 parent cb36e10 commit aee8cbe

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.github/workflows/build_pyodide.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,8 @@ jobs:
2828
VERSION=`cat IfcOpenShell/VERSION`
2929
sed -i s/0.8.0/$VERSION/g IfcOpenShell/pyodide/meta.yaml
3030
sed -i s/0.8.0/$VERSION/g IfcOpenShell/pyodide/setup.py
31-
echo '#!/usr/bin/bash' > script.sh
32-
echo 'cd pyodide' >> script.sh
33-
echo 'make' >> script.sh
34-
echo 'cd ..' >> script.sh
35-
echo 'mkdir -p packages/ifcopenshell' >> script.sh
36-
echo 'cp IfcOpenShell/pyodide/meta.yaml packages/ifcopenshell' >> script.sh
37-
echo 'PYODIDE_ROOT=/src/pyodide \' >> script.sh
38-
echo 'PATH=/src/pyodide/emsdk/emsdk:/src/pyodide/emsdk/emsdk/node/22.16.0_64bit/bin:/src/pyodide/emsdk/emsdk/upstream/emscripten:$PATH \' >> script.sh
39-
echo 'pyodide build-recipes ifcopenshell --install' >> script.sh
40-
chmod +x script.sh
4131
sed -i s/--tty// pyodide/run_docker
42-
pyodide/run_docker ./script.sh
32+
pyodide/run_docker IfcOpenShell/pyodide/build_pyodide.sh
4333
FILE=`echo dist/ifcopenshell-*.whl`
4434
NEW_FILE=`echo $FILE | sed "s/$VERSION/$VERSION+${GITHUB_SHA:0:7}/"`
4535
mv $FILE $NEW_FILE

pyodide/build_pyodide.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/bash
2+
set -e
3+
cd pyodide
4+
make
5+
cd ..
6+
mkdir -p packages/ifcopenshell
7+
cp IfcOpenShell/pyodide/meta.yaml packages/ifcopenshell
8+
# Required, otherwise pyodide will create new temp pyodide environment.
9+
export PYODIDE_ROOT=/src/pyodide
10+
# Ensure emsdk tools are in PATH.
11+
export PATH=$PYODIDE_ROOT/emsdk/emsdk:$PYODIDE_ROOT/emsdk/emsdk/node/22.16.0_64bit/bin:$PYODIDE_ROOT/emsdk/emsdk/upstream/emscripten:$PATH
12+
pyodide build-recipes ifcopenshell --install

win/build-all-win.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def build() -> None:
4848
"-DGLTF_SUPPORT=ON",
4949
"-DADD_COMMIT_SHA=ON",
5050
"-DVERSION_OVERRIDE=ON",
51+
"-DSCHEMA_VERSIONS=4",
5152
]
5253
)
5354
run([str(REPO_WIN / "install-ifcopenshell.bat"), "vs2022-x64", "Release"])

0 commit comments

Comments
 (0)