Skip to content

Commit 777cfc5

Browse files
committed
Try switching from Pyodide patches to a submodule
1 parent 66c77fd commit 777cfc5

File tree

4 files changed

+11
-7567
lines changed

4 files changed

+11
-7567
lines changed

.github/workflows/gh-pages.yml

+9-44
Original file line numberDiff line numberDiff line change
@@ -12,57 +12,24 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout the repository
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
16+
with:
17+
submodules: true
1618
- name: Install nix
17-
uses: cachix/install-nix-action@v27
19+
uses: cachix/install-nix-action@v29
1820
- name: Setup Python
19-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v5
2022
with:
2123
python-version: '3.11'
2224
- name: Install the dependencies
2325
run: |
2426
python -m pip install -r requirements.txt
25-
- name: Prepare Pyodide
26-
run: |
27-
git submodule init pyodide
28-
git submodule update pyodide
29-
- name: Check the Pyodide version
30-
run: |
31-
echo "PYODIDE_SHA_SHORT=$(git submodule status pyodide | cut -c 2-8)" >> $GITHUB_ENV
3227
- name: Cache the Pyodide build
33-
uses: actions/cache@v3
28+
uses: actions/cache@v4
3429
with:
3530
path: ./pyodide
36-
key: pyodide-${{ env.PYODIDE_SHA_SHORT }}-${{ hashFiles('patches/pyodide.patch') }}
37-
restore-keys: |
38-
pyodide-${{ env.PYODIDE_SHA_SHORT }}-${{ hashFiles('patches/pyodide.patch') }}
39-
pyodide-${{ env.PYODIDE_SHA_SHORT }}
40-
- name: Add a read-only SSH key to pull private dependencies
41-
uses: webfactory/[email protected]
42-
with:
43-
ssh-private-key: ${{ secrets.FCBENCH_SSH_TOKEN }}
44-
- name: Checkout and patch pyodide
45-
run: |
46-
cd pyodide
47-
git apply --whitespace=nowarn ../patches/pyodide.patch
48-
git clone [email protected]:juntyr/field-compression-benchmark.git \
49-
packages/field-compression-benchmark/field-compression-benchmark
50-
cd packages/field-compression-benchmark/field-compression-benchmark
51-
git submodule update --init wasi/wit-deps/wasi-*
52-
git apply ../patches/0001-codecs-build.patch
53-
- name: Pre-build the wasm codecs for fcbench
54-
run: |
55-
cd pyodide/packages/field-compression-benchmark/field-compression-benchmark
56-
57-
# Build the codecs
58-
cargo build -p codecs-build -vv
59-
60-
# Clean up after the build
61-
cargo clean
62-
grep '^channel\s*=\s*' rust-toolchain \
63-
| sed 's/channel.*=.*\"\(.*\)\"/\1/' \
64-
| xargs rustup toolchain uninstall
65-
nix store gc
31+
key: pyodide-${{ github.ref }}
32+
restore-keys: pyodide-refs/heads/main
6633
- name: Build Pyodide and all required packages
6734
run: |
6835
cd pyodide
@@ -74,8 +41,6 @@ jobs:
7441
- name: Clean up the pyodide build
7542
run: |
7643
cd pyodide
77-
git apply --whitespace=nowarn --reverse ../patches/pyodide.patch
78-
rm -rf packages/field-compression-benchmark/field-compression-benchmark
7944
rm -rf .docker_home
8045
find . -name jupyter-lite.json -delete
8146
find . -name jupyter_lite_config.json -delete
@@ -94,7 +59,7 @@ jobs:
9459
find dist/ -name favicon.ico | xargs -L1 cp -f static/favicons/favicon.ico
9560
rm -rf static
9661
- name: Deploy to dist branch
97-
uses: peaceiris/actions-gh-pages@v3
62+
uses: peaceiris/actions-gh-pages@v4
9863
with:
9964
github_token: ${{ secrets.GITHUB_TOKEN }}
10065
publish_branch: dist

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "pyodide"]
22
path = pyodide
3-
url = https://github.com/pyodide/pyodide.git
3+
url = https://github.com/climet-eu/pyodide.git

0 commit comments

Comments
 (0)