Skip to content

Commit

Permalink
Emscripten 3.1.45 and Python 3.11 update (#643)
Browse files Browse the repository at this point in the history
* python 3.12
* emscripten 3.1.45
* build with fexception instead fwasm-exception
  • Loading branch information
DerThorsten authored Oct 23, 2023
1 parent 9d6433c commit fa2b99b
Show file tree
Hide file tree
Showing 192 changed files with 1,525 additions and 24,285 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/.condarc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
channels:
- "https://repo.mamba.pm/emscripten-forge"
- /home/runner/micromamba/envs/ci/conda-bld
- conda-forge

add_pip_as_python_dependency: false
add_pip_as_python_dependency: true
39 changes: 16 additions & 23 deletions .github/workflows/build_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
build_all:
runs-on: ubuntu-latest
env:
TARGET_PLATFORM: emscripten-32
TARGET_PLATFORM: emscripten-wasm32
GITHUB_OWNER: "emscripten-forge"
strategy:
fail-fast: false
matrix:
emsdk_ver: ["3.1.27"]
emsdk_ver: ["3.1.45"]

steps:

Expand All @@ -30,7 +30,7 @@ jobs:
# CONFIG
################################################################
- name: global config
shell: bash -l {0}
shell: bash -el {0}
run: |
git config --global advice.detachedHead false
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME/.condarc
Expand All @@ -39,37 +39,31 @@ jobs:
################################################################
# MAMBA
################################################################
- name: install mamba
uses: mamba-org/provision-with-micromamba@main
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci_env.yml
environment-name: ci-env
micromamba-version: '0.23.2'
environment-name: ci
init-shell: >-
bash
cache-environment: true
post-cleanup: 'all'

################################################################
# POST ENV INSTALL CONFIG
################################################################
- name: post env install config
shell: bash -l {0}
shell: bash -el {0}
run: |
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME/.condarc
micromamba activate ci-env
playwright install
################################################################
# setup emsdk
################################################################
- name: "setup emsdk"
shell: bash -l {0}
shell: bash -el {0}
run: |
micromamba activate ci-env
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install ${{ matrix.emsdk_ver }}
./emsdk activate ${{ matrix.emsdk_ver }}
echo $(pwd)/emsdk-${{ matrix.emsdk_ver }}
echo $(pwd) > $HOME/.emsdkdir
./emsdk/setup_emsdk.sh ${{ matrix.emsdk_ver }} $(pwd)/emsdk_install
Expand All @@ -80,19 +74,18 @@ jobs:
# in the conda env named "ci-env"
################################################################
- name: "install custom non-master dependencies"
shell: bash -l {0}
shell: bash -el {0}
run: |
micromamba activate ci-env
python -m pip install git+https://github.com/DerThorsten/boa.git@python_api --no-deps --ignore-installed
python -m pip install git+https://github.com/DerThorsten/boa.git@python_api_v2 --no-deps --ignore-installed
################################################################
# build ALL recipes
################################################################
- name: "build packages workflow_dispatch"
shell: bash -l {0}
shell: bash -el {0}
run: |
micromamba activate ci-env
cd ${GITHUB_WORKSPACE}
python builder.py build directory $GITHUB_WORKSPACE/recipes/recipes --skip-tests
python builder.py build directory $GITHUB_WORKSPACE/recipes/recipes_emscripten --emscripten-32
python builder.py build directory $GITHUB_WORKSPACE/recipes/recipes_emscripten --emscripten-wasm32
96 changes: 49 additions & 47 deletions .github/workflows/build_recipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
build_recipes:
runs-on: ubuntu-latest
env:
TARGET_PLATFORM: emscripten-32
TARGET_PLATFORM: emscripten-wasm32
GITHUB_OWNER: "emscripten-forge"
strategy:
fail-fast: false
matrix:
emsdk_ver: ["3.1.27"]
emsdk_ver: ["3.1.45"]

steps:
- name: Checkout repo
Expand All @@ -41,7 +41,7 @@ jobs:
# CONFIG
################################################################
- name: global config
shell: bash -l {0}
shell: bash -el {0}
run: |
git config --global advice.detachedHead false
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME
Expand All @@ -50,38 +50,32 @@ jobs:
################################################################
# MAMBA
################################################################
- name: install mamba
uses: mamba-org/provision-with-micromamba@main
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci_env.yml
environment-name: ci-env
micromamba-version: '0.23.2'
environment-name: ci
init-shell: >-
bash
cache-environment: true
post-cleanup: 'all'

################################################################
# setup emsdk
################################################################
- name: "setup emsdk"
shell: bash -el {0}
run: |
./emsdk/setup_emsdk.sh ${{ matrix.emsdk_ver }} $(pwd)/emsdk_install
################################################################
# POST ENV INSTALL CONFIG
################################################################
- name: post env install config
shell: bash -l {0}
shell: bash -el {0}
run: |
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME/.condarc
micromamba activate ci-env
playwright install
################################################################
# setup emsdk
################################################################
- name: "setup emsdk"
shell: bash -l {0}
run: |
micromamba activate ci-env
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install ${{ matrix.emsdk_ver }}
./emsdk activate ${{ matrix.emsdk_ver }}
echo $(pwd)/emsdk-${{ matrix.emsdk_ver }}
echo $(pwd) > $HOME/.emsdkdir
################################################################
Expand All @@ -91,29 +85,37 @@ jobs:
# in the conda env named "ci-env"
################################################################
- name: "install custom non-master dependencies"
shell: bash -l {0}
shell: bash -el {0}
run: |
micromamba activate ci-env
python -m pip install git+https://github.com/DerThorsten/boa.git@python_api --no-deps --ignore-installed
python -m pip install git+https://github.com/DerThorsten/boa.git@python_api_v2 --no-deps --ignore-installed
################################################################
# run pytests
################################################################
- name: "test config files"
shell: bash -l {0}
shell: bash -el {0}
run: |
micromamba activate ci-env
cd testing
pytest test_empack_config.py
# ################################################################
# # build pyjs
# ################################################################
# - name: "build package"
# shell: bash -el {0}
# run: |
# cd ${GITHUB_WORKSPACE}
# python builder.py build explicit $GITHUB_WORKSPACE/recipes/recipes/emscripten_emscripten-wasm32
# python builder.py build explicit $GITHUB_WORKSPACE/recipes/recipes_emscripten/pyjs --emscripten-wasm32


################################################################
# build recipes with changes PUSH
################################################################
- name: "build packages push"
shell: bash -l {0}
shell: bash -el {0}
if: github.event_name == 'push'
run: |
micromamba activate ci-env
cd ${GITHUB_WORKSPACE}
python builder.py build changed $GITHUB_WORKSPACE/ origin/main~1 origin/main
Expand All @@ -122,10 +124,9 @@ jobs:
# build recipes with changes PULL_REQUEST
################################################################
- name: "build packages pull_request"
shell: bash -l {0}
shell: bash -el {0}
if: github.event_name == 'pull_request'
run: |
micromamba activate ci-env
cd ${GITHUB_WORKSPACE}
python builder.py build changed $GITHUB_WORKSPACE/ origin/main HEAD
Expand All @@ -135,21 +136,22 @@ jobs:
################################################################
- name: "quetz upload packages"
if: github.event_name == 'push'
shell: bash -l {0}
shell: bash -el {0}
run: |
mkdir -p ${CONDA_PREFIX}/conda-bld/emscripten-32
mkdir -p ${CONDA_PREFIX}/conda-bld/emscripten-wasm32
mkdir -p ${CONDA_PREFIX}/conda-bld/linux-64
mkdir -p ${CONDA_PREFIX}/conda-bld/noarch
if [ $(ls ${CONDA_PREFIX}/conda-bld/emscripten-32/*.tar.bz2 | wc -l) -ne 0 ]; then
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client https://beta.mamba.pm/channels/emscripten-forge ${CONDA_PREFIX}/conda-bld/emscripten-32/*.tar.bz2
fi
if [ $(ls ${CONDA_PREFIX}/conda-bld/linux-64/*.tar.bz2 | wc -l) -ne 0 ]; then
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client https://beta.mamba.pm/channels/emscripten-forge ${CONDA_PREFIX}/conda-bld/linux-64/*.tar.bz2
fi
if [ $(ls ${CONDA_PREFIX}/conda-bld/noarch/*.tar.bz2 | wc -l) -ne 0 ]; then
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client https://beta.mamba.pm/channels/emscripten-forge ${CONDA_PREFIX}/conda-bld/noarch/*.tar.bz2
fi
# if [ $(ls ${CONDA_PREFIX}/conda-bld/emscripten-32/*.tar.bz2 | wc -l) -ne 0 ]; then
# QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client https://beta.mamba.pm/channels/emscripten-forge ${CONDA_PREFIX}/conda-bld/emscripten-wasm32/*.tar.bz2
# fi
# if [ $(ls ${CONDA_PREFIX}/conda-bld/linux-64/*.tar.bz2 | wc -l) -ne 0 ]; then
# QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client https://beta.mamba.pm/channels/emscripten-forge ${CONDA_PREFIX}/conda-bld/linux-64/*.tar.bz2
# fi
# if [ $(ls ${CONDA_PREFIX}/conda-bld/noarch/*.tar.bz2 | wc -l) -ne 0 ]; then
# QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client https://beta.mamba.pm/channels/emscripten-forge ${CONDA_PREFIX}/conda-bld/noarch/*.tar.bz2
# fi
45 changes: 18 additions & 27 deletions .github/workflows/build_simple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
build_simple:
runs-on: ubuntu-latest
env:
TARGET_PLATFORM: emscripten-32
TARGET_PLATFORM: emscripten-wasm32
GITHUB_OWNER: "emscripten-forge"
strategy:
fail-fast: false
matrix:
emsdk_ver: ["3.1.27"]
emsdk_ver: ["3.1.45"]

steps:

Expand All @@ -29,7 +29,7 @@ jobs:
# CONFIG
################################################################
- name: global config
shell: bash -l {0}
shell: bash -el {0}
run: |
git config --global advice.detachedHead false
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME/.condarc
Expand All @@ -38,37 +38,31 @@ jobs:
################################################################
# MAMBA
################################################################
- name: install mamba
uses: mamba-org/provision-with-micromamba@main
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci_env.yml
environment-name: ci-env
micromamba-version: '0.23.2'
environment-name: ci
init-shell: >-
bash
cache-environment: true
post-cleanup: 'all'

################################################################
# POST ENV INSTALL CONFIG
################################################################
- name: post env install config
shell: bash -l {0}
shell: bash -el {0}
run: |
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME/.condarc
micromamba activate ci-env
playwright install
################################################################
# setup emsdk
################################################################
- name: "setup emsdk"
shell: bash -l {0}
shell: bash -el {0}
run: |
micromamba activate ci-env
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install ${{ matrix.emsdk_ver }}
./emsdk activate ${{ matrix.emsdk_ver }}
echo $(pwd)/emsdk-${{ matrix.emsdk_ver }}
echo $(pwd) > $HOME/.emsdkdir
./emsdk/setup_emsdk.sh ${{ matrix.emsdk_ver }} $(pwd)/emsdk_install
################################################################
# install / clone custom non-master things
Expand All @@ -77,28 +71,25 @@ jobs:
# in the conda env named "ci-env"
################################################################
- name: "install custom non-master dependencies"
shell: bash -l {0}
shell: bash -el {0}
run: |
micromamba activate ci-env
python -m pip install git+https://github.com/DerThorsten/boa.git@python_api --no-deps --ignore-installed
python -m pip install git+https://github.com/DerThorsten/boa.git@python_api_v2 --no-deps --ignore-installed
################################################################
# build a package which is **not** on emscripten forge
################################################################
- name: "build package"
shell: bash -l {0}
shell: bash -el {0}
run: |
micromamba activate ci-env
cd ${GITHUB_WORKSPACE}
python builder.py build explicit $GITHUB_WORKSPACE/testing/test_recipes/only_py_tests --emscripten-32
python builder.py build explicit $GITHUB_WORKSPACE/testing/test_recipes/only_py_tests --emscripten-wasm32
################################################################
# build a simple package
################################################################
- name: "build package"
shell: bash -l {0}
shell: bash -el {0}
run: |
micromamba activate ci-env
cd ${GITHUB_WORKSPACE}
python builder.py build explicit $GITHUB_WORKSPACE/recipes/recipes_emscripten/regex --emscripten-32
python builder.py build explicit $GITHUB_WORKSPACE/recipes/recipes_emscripten/regex --emscripten-wasm32
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ We are working on:
## Credits
This project would not have been possible without the pioneering work of the [pyodide](https://pyodide.org/) team.
Many aspects of this project are heavily inspired by the [pyodide](https://pyodide.org/) project. This includes the build scripts and
many of the patches which have been taken from the pyodide packages.
many of the patches which have been taken from the pyodide packages.
Loading

0 comments on commit fa2b99b

Please sign in to comment.