Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8020946

Browse files
authoredJul 9, 2024
pythonGH-120372: Switch to wasmtime 22 (pythonGH-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`.
1 parent 0439743 commit 8020946

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed
 

‎.devcontainer/Dockerfile

+1-1
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

+9-7
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)
Failed to load comments.