mirror of https://github.com/python/cpython
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`.
This commit is contained in:
parent
04397434aa
commit
8020946814
|
@ -6,7 +6,7 @@ ENV WASI_SDK_VERSION=21
|
||||||
ENV WASI_SDK_PATH=/opt/wasi-sdk
|
ENV WASI_SDK_PATH=/opt/wasi-sdk
|
||||||
|
|
||||||
ENV WASMTIME_HOME=/opt/wasmtime
|
ENV WASMTIME_HOME=/opt/wasmtime
|
||||||
ENV WASMTIME_VERSION=18.0.3
|
ENV WASMTIME_VERSION=22.0.0
|
||||||
ENV WASMTIME_CPU_ARCH=x86_64
|
ENV WASMTIME_CPU_ARCH=x86_64
|
||||||
|
|
||||||
RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,clang,curl,git,ln,tar,xz} 'dnf-command(builddep)' && \
|
RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,clang,curl,git,ln,tar,xz} 'dnf-command(builddep)' && \
|
||||||
|
|
|
@ -11,7 +11,7 @@ jobs:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
env:
|
env:
|
||||||
WASMTIME_VERSION: 18.0.3
|
WASMTIME_VERSION: 22.0.0
|
||||||
WASI_SDK_VERSION: 21
|
WASI_SDK_VERSION: 21
|
||||||
WASI_SDK_PATH: /opt/wasi-sdk
|
WASI_SDK_PATH: /opt/wasi-sdk
|
||||||
CROSS_BUILD_PYTHON: cross-build/build
|
CROSS_BUILD_PYTHON: cross-build/build
|
||||||
|
@ -20,9 +20,9 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# No problem resolver registered as one doesn't currently exist for Clang.
|
# No problem resolver registered as one doesn't currently exist for Clang.
|
||||||
- name: "Install wasmtime"
|
- name: "Install wasmtime"
|
||||||
uses: jcbhmr/setup-wasmtime@v2
|
uses: bytecodealliance/actions/wasmtime/setup@v1
|
||||||
with:
|
with:
|
||||||
wasmtime-version: ${{ env.WASMTIME_VERSION }}
|
version: ${{ env.WASMTIME_VERSION }}
|
||||||
- name: "Restore WASI SDK"
|
- name: "Restore WASI SDK"
|
||||||
id: cache-wasi-sdk
|
id: cache-wasi-sdk
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
@ -50,8 +50,10 @@ jobs:
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ env.CROSS_BUILD_PYTHON }}/config.cache
|
path: ${{ env.CROSS_BUILD_PYTHON }}/config.cache
|
||||||
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
|
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python.
|
||||||
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}-${{ env.pythonLocation }}
|
# Include the hash of `Tools/wasm/wasi.py` as it may change the environment variables.
|
||||||
|
# (Make sure to keep the key in sync with the other config.cache step below.)
|
||||||
|
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 }}
|
||||||
- name: "Configure build Python"
|
- name: "Configure build Python"
|
||||||
run: python3 Tools/wasm/wasi.py configure-build-python -- --config-cache --with-pydebug
|
run: python3 Tools/wasm/wasi.py configure-build-python -- --config-cache --with-pydebug
|
||||||
- name: "Make build Python"
|
- name: "Make build Python"
|
||||||
|
@ -60,8 +62,8 @@ jobs:
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ env.CROSS_BUILD_WASI }}/config.cache
|
path: ${{ env.CROSS_BUILD_WASI }}/config.cache
|
||||||
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
|
# Should be kept in sync with the other config.cache step above.
|
||||||
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-wasi-sdk-${{ env.WASI_SDK_VERSION }}-${{ inputs.config_hash }}-${{ env.pythonLocation }}
|
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 }}
|
||||||
- name: "Configure host"
|
- name: "Configure host"
|
||||||
# `--with-pydebug` inferred from configure-build-python
|
# `--with-pydebug` inferred from configure-build-python
|
||||||
run: python3 Tools/wasm/wasi.py configure-host -- --config-cache
|
run: python3 Tools/wasm/wasi.py configure-host -- --config-cache
|
||||||
|
|
Loading…
Reference in New Issue