Skip to content

Workaround a StandardOutput formatting bug #2717

Workaround a StandardOutput formatting bug

Workaround a StandardOutput formatting bug #2717

Workflow file for this run

# Copied from SymPy https://github.com/sympy/sympy/pull/27183
---
name: Mathics3 (Pyodide)
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
pyodide-test:
runs-on: ubuntu-latest
env:
PYODIDE_BUILD_VERSION: ">=314.0.0"
# PYTHON_VERSION and EMSCRIPTEN_VERSION are determined by PYODIDE_BUILD_VERSION.
# The appropriate versions can be found in the Pyodide repodata.json
# "info" field, or in Makefile.envs:
# https://github.com/pyodide/pyodide/blob/main/Makefile.envs#L2
PYTHON_VERSION: 3.14
EMSCRIPTEN_VERSION: 4.0.9
NODE_VERSION: 24
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Emscripten toolchain (Manually)
run: |
# Clone the emsdk repository
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
# Install and activate the specified version
./emsdk install ${{ env.EMSCRIPTEN_VERSION }}
./emsdk activate ${{ env.EMSCRIPTEN_VERSION }}
# Add to PATH for subsequent steps
echo "$(pwd)" >> $GITHUB_PATH
echo "$(pwd)/upstream/emscripten" >> $GITHUB_PATH
source ./emsdk_env.sh
# Verify installation
emcc --version
# - name: Set up Emscripten toolchain (Cached)
# uses: mymindstorm/setup-emsdk@v14
# with:
# version: ${{ env.EMSCRIPTEN_VERSION }}
# actions-cache-folder: emsdk-cache
- name: Install pyodide-build
run: |
pip install -U setuptools
pip install pyodide-build
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set up Pyodide virtual environment and run tests
run: |
# Set up Pyodide virtual environment
pyodide xbuildenv install ${{ env.PYODIDE_BUILD_VERSION }}
pyodide venv .venv-pyodide
# Activate the virtual environment
source .venv-pyodide/bin/activate
pip install setuptools PyYAML click packaging pytest
- name: Install dependent Mathics3 programs
run: |
# We can comment out after next Mathics3-Scanner release
# git clone --depth 1 https://github.com/Mathics3/Mathics3-scanner.git
# cd Mathics3-scanner/
# pip install -e .
# bash -x admin-tools/make-JSON-tables.sh
# cd ..
python -m pip install setuptools wheel
- name: Install Mathics3
run: |
pip install --no-build-isolation -e .
python -m pip install pytest
make -j3 check