Skip to content

Commit 463289e

Browse files
authored
pyodide build (#5916)
1 parent 2fbb47d commit 463289e

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

.github/workflows/build_pyodide.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
uses: actions/checkout@v3
1313
with:
1414
submodules: recursive
15+
path: IfcOpenShell
1516

1617
- name: Checkout Pyodide
1718
uses: actions/checkout@v3
@@ -20,19 +21,32 @@ jobs:
2021
repository: pyodide/pyodide
2122
ref: '0.26.4'
2223
token: ${{ secrets.BUILD_REPO_TOKEN }}
24+
path: pyodide
2325

2426
- name: Build
2527
run: |
28+
find .. -maxdepth 2
29+
echo '#!/usr/bin/bash' > script.sh
2630
echo 'cd pyodide' > script.sh
2731
echo 'make && pip install ./pyodide-build' >> script.sh
2832
echo 'cd ..' >> script.sh
29-
echo 'mkdir packages/ifcopenshell' >> script.sh
33+
echo 'mkdir -p packages/ifcopenshell' >> script.sh
3034
echo 'cp IfcOpenShell/pyodide/meta.yaml packages/ifcopenshell' >> script.sh
3135
echo 'PYODIDE_ROOT=/src/pyodide \' >> script.sh
3236
echo 'PATH=/src/pyodide/emsdk/emsdk:/src/pyodide/emsdk/emsdk/node/20.18.0_64bit/bin:/src/pyodide/emsdk/emsdk/upstream/emscripten:$PATH \' >> script.sh
3337
echo 'pyodide build-recipes ifcopenshell --install' >> script.sh
34-
pyodide/run_docker script.sh
35-
38+
chmod +x script.sh
39+
sed -i s/--tty// pyodide/run_docker
40+
pyodide/run_docker ./script.sh
41+
mv dist/IfcOpenShell-0.8.0-py3-none-any.whl dist/ifcopenshell_python-v0.8.0+${GITHUB_SHA:0:7}-cp312-cp312-emscripten_3_1_58_wasm32.whl
42+
43+
- name: Configure AWS credentials
44+
uses: aws-actions/configure-aws-credentials@v4
45+
with:
46+
aws-access-key-id: ${{ secrets.AWS_UPLOAD_ACCESS_KEY_ID }}
47+
aws-secret-access-key: ${{ secrets.AWS_UPLOAD_SECRET_ACCESS_KEY }}
48+
aws-region: us-east-1
49+
3650
- name: Upload .zip archives to S3
3751
run: |
38-
aws s3 cp ~/output s3://ifcopenshell-builds/ --recursive --exclude "*" --include "*.whl"
52+
aws s3 cp dist s3://ifcopenshell-builds/ --recursive --exclude "*" --include "*.whl"

pyodide/meta.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ build:
1010
BUILD_CFG=Release python nix/build-all.py --without-hdf5 --without-opencollada --without-swig --without-pcre -v --wasm --py312 IfcOpenShell-Python
1111
mv package/ifcopenshell .
1212
cp pyodide/setup.py .
13-
mv dist/IfcOpenShell-0.8.0-py3-none-any.whl dist/ifcopenshell-python-v0.8.0-${GITHUB_SHA:0:7}-cp312-cp312-emscripten_3_1_58_wasm32.whl
1413
1514
about:
1615
home: http://ifcopenshell.org

0 commit comments

Comments
 (0)