Skip to content

Commit 20a6341

Browse files
[3.13] GH-120372: Switch to wasmtime 22 (GH-121523) (GH-121557)
GH-120372: Switch to wasmtime 22 (GH-121523) Along the way, make the cache key in GitHub Actions for `config.cache` be more robust in the face of potential env var changes from `Tools/wasm/wasi.py`. (cherry picked from commit 8020946) Co-authored-by: Brett Cannon <brett@python.org>
1 parent eae8fa1 commit 20a6341

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV WASI_SDK_VERSION=21
66
ENV WASI_SDK_PATH=/opt/wasi-sdk
77

88
ENV WASMTIME_HOME=/opt/wasmtime
9-
ENV WASMTIME_VERSION=18.0.3
9+
ENV WASMTIME_VERSION=22.0.0
1010
ENV WASMTIME_CPU_ARCH=x86_64
1111

1212
RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,clang,curl,git,ln,tar,xz} 'dnf-command(builddep)' && \

.github/workflows/reusable-wasi.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
timeout-minutes: 60
1212
runs-on: ubuntu-22.04
1313
env:
14-
WASMTIME_VERSION: 18.0.3
14+
WASMTIME_VERSION: 22.0.0
1515
WASI_SDK_VERSION: 21
1616
WASI_SDK_PATH: /opt/wasi-sdk
1717
CROSS_BUILD_PYTHON: cross-build/build
@@ -20,9 +20,9 @@ jobs:
2020
- uses: actions/checkout@v4
2121
# No problem resolver registered as one doesn't currently exist for Clang.
2222
- name: "Install wasmtime"
23-
uses: jcbhmr/setup-wasmtime@v2
23+
uses: bytecodealliance/actions/wasmtime/setup@v1
2424
with:
25-
wasmtime-version: ${{ env.WASMTIME_VERSION }}
25+
version: ${{ env.WASMTIME_VERSION }}
2626
- name: "Restore WASI SDK"
2727
id: cache-wasi-sdk
2828
uses: actions/cache@v4
@@ -50,8 +50,10 @@ jobs:
5050
uses: actions/cache@v4
5151
with:
5252
path: ${{ env.CROSS_BUILD_PYTHON }}/config.cache
53-
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
54-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}-${{ env.pythonLocation }}
53+
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python.
54+
# Include the hash of `Tools/wasm/wasi.py` as it may change the environment variables.
55+
# (Make sure to keep the key in sync with the other config.cache step below.)
56+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi.py') }}-${{ env.pythonLocation }}
5557
- name: "Configure build Python"
5658
run: python3 Tools/wasm/wasi.py configure-build-python -- --config-cache --with-pydebug
5759
- name: "Make build Python"
@@ -60,8 +62,8 @@ jobs:
6062
uses: actions/cache@v4
6163
with:
6264
path: ${{ env.CROSS_BUILD_WASI }}/config.cache
63-
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
64-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-wasi-sdk-${{ env.WASI_SDK_VERSION }}-${{ inputs.config_hash }}-${{ env.pythonLocation }}
65+
# Should be kept in sync with the other config.cache step above.
66+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi.py') }}-${{ env.pythonLocation }}
6567
- name: "Configure host"
6668
# `--with-pydebug` inferred from configure-build-python
6769
run: python3 Tools/wasm/wasi.py configure-host -- --config-cache

0 commit comments

Comments
 (0)