Get a working build for PyBaMM – with IDAKLU enabled #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build WASM dependencies and PyBaMM | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake build-essential libssl-dev pkg-config | |
# - name: Set up Emscripten | |
# uses: mymindstorm/setup-emsdk@v14 | |
# with: | |
# version: 3.1.58 | |
# actions-cache-folder: "emsdk-cache" | |
# - name: Set up Node.js | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: "20" | |
- name: Check out Pyodide | |
uses: actions/checkout@v4 | |
with: | |
repository: pyodide/pyodide | |
path: pyodide_checkout | |
submodules: recursive | |
- name: Overwrite previous recipes and copy new ones | |
run: cp -r recipes/* pyodide_checkout/packages/pyodide/src/packages/ | |
- name: Build Pyodide distribution | |
working-directory: pyodide_checkout/ | |
run: | | |
PYODIDE_CORES=$(nproc) | |
PYODIDE_JOBS="${PYODIDE_CORES}" PYODIDE_PACKAGES="pybamm" make | |
- name: Upload Pyodide distribution | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pyodide_dist | |
path: pyodide_checkout/dist/* | |
if-no-files-found: error |