Skip to content

Commit 42668a3

Browse files
committed
Merge remote-tracking branch 'upstream/main' into platform-invalidate-cache-122549
2 parents ce3201b + 6401cdf commit 42668a3

File tree

538 files changed

+26743
-12613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

538 files changed

+26743
-12613
lines changed

.azure-pipelines/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
trigger: ['main', '3.12', '3.11', '3.10', '3.9', '3.8', '3.7']
1+
trigger: ['main', '3.13', '3.12', '3.11', '3.10', '3.9', '3.8']
22

33
jobs:
44
- job: Prebuild

.azure-pipelines/posix-deps-apt.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

.azure-pipelines/posix-steps.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.azure-pipelines/pr.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM docker.io/library/fedora:40
22

33
ENV CC=clang
44

5-
ENV WASI_SDK_VERSION=22
5+
ENV WASI_SDK_VERSION=24
66
ENV WASI_SDK_PATH=/opt/wasi-sdk
77

88
ENV WASMTIME_HOME=/opt/wasmtime
@@ -14,7 +14,7 @@ RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,cla
1414
dnf -y clean all
1515

1616
RUN mkdir ${WASI_SDK_PATH} && \
17-
curl --location https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-linux.tar.gz | \
17+
curl --location https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz | \
1818
tar --strip-components 1 --directory ${WASI_SDK_PATH} --extract --gunzip
1919

2020
RUN mkdir --parents ${WASMTIME_HOME} && \

.github/workflows/build.yml

Lines changed: 13 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Tests
22

3-
# gh-84728: "paths-ignore" is not used to skip documentation-only PRs, because
4-
# it prevents to mark a job as mandatory. A PR cannot be merged if a job is
5-
# mandatory but not scheduled because of "paths-ignore".
63
on:
74
workflow_dispatch:
85
push:
@@ -23,121 +20,19 @@ concurrency:
2320

2421
jobs:
2522
check_source:
26-
name: 'Check for source changes'
27-
runs-on: ubuntu-latest
28-
timeout-minutes: 10
29-
outputs:
30-
# Some of the referenced steps set outputs conditionally and there may be
31-
# cases when referencing them evaluates to empty strings. It is nice to
32-
# work with proper booleans so they have to be evaluated through JSON
33-
# conversion in the expressions. However, empty strings used like that
34-
# may trigger all sorts of undefined and hard-to-debug behaviors in
35-
# GitHub Actions CI/CD. To help with this, all of the outputs set here
36-
# that are meant to be used as boolean flags (and not arbitrary strings),
37-
# MUST have fallbacks with default values set. A common pattern would be
38-
# to add ` || false` to all such expressions here, in the output
39-
# definitions. They can then later be safely used through the following
40-
# idiom in job conditionals and other expressions. Here's some examples:
41-
#
42-
# if: fromJSON(needs.check_source.outputs.run-docs)
43-
#
44-
# ${{
45-
# fromJSON(needs.check_source.outputs.run_tests)
46-
# && 'truthy-branch'
47-
# || 'falsy-branch'
48-
# }}
49-
#
50-
run-docs: ${{ steps.docs-changes.outputs.run-docs || false }}
51-
run-win-msi: ${{ steps.win-msi-changes.outputs.run-win-msi || false }}
52-
run_tests: ${{ steps.check.outputs.run_tests || false }}
53-
run_hypothesis: ${{ steps.check.outputs.run_hypothesis || false }}
54-
run_cifuzz: ${{ steps.check.outputs.run_cifuzz || false }}
55-
config_hash: ${{ steps.config_hash.outputs.hash }} # str
56-
steps:
57-
- uses: actions/checkout@v4
58-
- name: Check for source changes
59-
id: check
60-
run: |
61-
if [ -z "$GITHUB_BASE_REF" ]; then
62-
echo "run_tests=true" >> $GITHUB_OUTPUT
63-
else
64-
git fetch origin $GITHUB_BASE_REF --depth=1
65-
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
66-
# reliable than git diff "origin/$GITHUB_BASE_REF.." (2 dots),
67-
# but it requires to download more commits (this job uses
68-
# "git fetch --depth=1").
69-
#
70-
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) works with Git
71-
# 2.26, but Git 2.28 is stricter and fails with "no merge base".
72-
#
73-
# git diff "origin/$GITHUB_BASE_REF.." (2 dots) should be enough on
74-
# GitHub, since GitHub starts by merging origin/$GITHUB_BASE_REF
75-
# into the PR branch anyway.
76-
#
77-
# https://github.com/python/core-workflow/issues/373
78-
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc|^\.pre-commit-config\.yaml$|\.ruff\.toml$|\.md$|mypy\.ini$)' && echo "run_tests=true" >> $GITHUB_OUTPUT || true
79-
fi
80-
81-
# Check if we should run hypothesis tests
82-
GIT_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
83-
echo $GIT_BRANCH
84-
if $(echo "$GIT_BRANCH" | grep -q -w '3\.\(8\|9\|10\|11\)'); then
85-
echo "Branch too old for hypothesis tests"
86-
echo "run_hypothesis=false" >> $GITHUB_OUTPUT
87-
else
88-
echo "Run hypothesis tests"
89-
echo "run_hypothesis=true" >> $GITHUB_OUTPUT
90-
fi
91-
92-
# oss-fuzz maintains a configuration for fuzzing the main branch of
93-
# CPython, so CIFuzz should be run only for code that is likely to be
94-
# merged into the main branch; compatibility with older branches may
95-
# be broken.
96-
FUZZ_RELEVANT_FILES='(\.c$|\.h$|\.cpp$|^configure$|^\.github/workflows/build\.yml$|^Modules/_xxtestfuzz)'
97-
if [ "$GITHUB_BASE_REF" = "main" ] && [ "$(git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE $FUZZ_RELEVANT_FILES; echo $?)" -eq 0 ]; then
98-
# The tests are pretty slow so they are executed only for PRs
99-
# changing relevant files.
100-
echo "Run CIFuzz tests"
101-
echo "run_cifuzz=true" >> $GITHUB_OUTPUT
102-
else
103-
echo "Branch too old for CIFuzz tests; or no C files were changed"
104-
echo "run_cifuzz=false" >> $GITHUB_OUTPUT
105-
fi
106-
- name: Compute hash for config cache key
107-
id: config_hash
108-
run: |
109-
echo "hash=${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}" >> $GITHUB_OUTPUT
110-
- name: Get a list of the changed documentation-related files
111-
if: github.event_name == 'pull_request'
112-
id: changed-docs-files
113-
uses: Ana06/[email protected]
114-
with:
115-
filter: |
116-
Doc/**
117-
Misc/**
118-
.github/workflows/reusable-docs.yml
119-
format: csv # works for paths with spaces
120-
- name: Check for docs changes
121-
if: >-
122-
github.event_name == 'pull_request'
123-
&& steps.changed-docs-files.outputs.added_modified_renamed != ''
124-
id: docs-changes
125-
run: |
126-
echo "run-docs=true" >> "${GITHUB_OUTPUT}"
127-
- name: Get a list of the MSI installer-related files
128-
id: changed-win-msi-files
129-
uses: Ana06/[email protected]
130-
with:
131-
filter: |
132-
Tools/msi/**
133-
.github/workflows/reusable-windows-msi.yml
134-
format: csv # works for paths with spaces
135-
- name: Check for changes in MSI installer-related files
136-
if: >-
137-
steps.changed-win-msi-files.outputs.added_modified_renamed != ''
138-
id: win-msi-changes
139-
run: |
140-
echo "run-win-msi=true" >> "${GITHUB_OUTPUT}"
23+
name: Change detection
24+
# To use boolean outputs from this job, parse them as JSON.
25+
# Here's some examples:
26+
#
27+
# if: fromJSON(needs.check_source.outputs.run-docs)
28+
#
29+
# ${{
30+
# fromJSON(needs.check_source.outputs.run_tests)
31+
# && 'truthy-branch'
32+
# || 'falsy-branch'
33+
# }}
34+
#
35+
uses: ./.github/workflows/reusable-change-detection.yml
14136

14237
check-docs:
14338
name: Docs

0 commit comments

Comments
 (0)