Skip to content

Update to pyodide 0.24.0 #58

Update to pyodide 0.24.0

Update to pyodide 0.24.0 #58

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- main
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install the dependencies
run: |
python -m pip install -r requirements.txt
- name: Prepare Pyodide
run: |
git submodule init pyodide
git submodule update pyodide
- name: Check the Pyodide version
run: |
echo "PYODIDE_SHA_SHORT=$(git submodule status pyodide | cut -c 2-8)" >> $GITHUB_ENV
- name: Cache the Pyodide build
uses: actions/cache@v3
with:
path: ./pyodide
key: pyodide-${{ env.PYODIDE_SHA_SHORT }}-${{ hashFiles('patches/pyodide.patch') }}
restore-keys: |
pyodide-${{ env.PYODIDE_SHA_SHORT }}-${{ hashFiles('patches/pyodide.patch') }}
pyodide-${{ env.PYODIDE_SHA_SHORT }}
- name: Add a read-only SSH key to pull private dependencies
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.FCBENCH_SSH_TOKEN }}
- name: Build Pyodide
run: |
cd pyodide
git apply --whitespace=nowarn ../patches/pyodide.patch
cp -r ../fcpy packages/fcpy/fcpy
git clone -b fcbench [email protected]:juntyr/field-compression-benchmark.git packages/fcbench/field-compression-benchmark
PYODIDE_DOCKER_IMAGE=$(docker build . -q) ./run_docker --non-interactive PYODIDE_PACKAGES="basemap,fcpy,fcbench,ipyfilite,ipyloglite,pyodide-http" make
git apply --whitespace=nowarn --reverse ../patches/pyodide.patch
rm -rf packages/fcpy/fcpy
rm -rf packages/fcbench/field-compression-benchmark
cd ..
mkdir -p static
cp -r pyodide/dist static/pyodide
rm -rf static/pyodide/*-tests.tar
rm -f static/pyodide/tsconfig.tsbuildinfo
- name: Build the JupyterLite site
run: |
jupyter lite build --output-dir dist
cp ./_headers dist/
cp -r data dist/
- name: Deploy to dist branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: dist
publish_dir: ./dist
force_orphan: true