🌐 AI搜索 & 代理 主页
Skip to content
Draft
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
a67bd8a
Prototyping 5974
reactive-firewall Jul 17, 2025
bc3d741
Prototype test of Check_Tests.yml
reactive-firewall Jul 17, 2025
579df4a
Update Check_Tests.yml
reactive-firewall Jul 17, 2025
3b0b622
Update Check_Tests.yml
reactive-firewall Jul 17, 2025
8fb83bb
Update Check_Tests.yml
reactive-firewall Jul 17, 2025
370eeb9
Tweaked Check_Tests.yml
reactive-firewall Jul 17, 2025
7032a3c
Update Check_Tests.yml
reactive-firewall Jul 17, 2025
c984045
DEBUG for Check_Tests.yml
reactive-firewall Jul 17, 2025
42e6bd1
DEBUG Check_Tests.yml
reactive-firewall Jul 17, 2025
da5c6b6
DEBUG Check_Tests.yml builds
reactive-firewall Jul 17, 2025
7b84e63
Update Check_Tests.yml
reactive-firewall Jul 17, 2025
e8dd40a
Fixup Check_Tests.yml more
reactive-firewall Jul 17, 2025
e4ea145
Update envs for OS in Check_Tests.yml
reactive-firewall Jul 17, 2025
62b2159
First just-integrate Cpython into Rustpython Automation test for Rust…
reactive-firewall Jul 17, 2025
16908ce
Second-Attempt for GHI RustPython/RustPython#5974
reactive-firewall Jul 17, 2025
7650576
Remove ulimit and re-test
reactive-firewall Jul 17, 2025
bcf6261
Update Check_Tests.yml to attempt auto-fix via fix_test.py
reactive-firewall Jul 21, 2025
ec878b6
STYLE fixes for Check_Tests.yml
reactive-firewall Jul 21, 2025
7a1122c
More Tweaking of Check_Tests.yml
reactive-firewall Jul 21, 2025
7b14fb8
Smarter filtering for direct invocation in Check_Tests.yml
reactive-firewall Jul 22, 2025
f1e1e1b
regression fix for Check_Tests.yml and re-test
reactive-firewall Jul 22, 2025
14b67ad
WIP - UNSTABLE
reactive-firewall Jul 22, 2025
d638f06
Update Check_Tests.yml with unittest logic
reactive-firewall Jul 23, 2025
5706652
Update Check_Tests.yml with shorter timeout limit
reactive-firewall Jul 23, 2025
ab1ab43
DEBUG Check_Tests.yml
reactive-firewall Jul 23, 2025
5e12149
WIP DEBUG STEP
reactive-firewall Jul 23, 2025
c1f6dfd
Expand to recurse Lib/test (WIP)
reactive-firewall Jul 23, 2025
3e65b53
Initial Refactor for CI-5974
reactive-firewall Jul 24, 2025
d1a9d08
Re:re: Fixup for overlooked regression from initial refactor
reactive-firewall Jul 24, 2025
cad55c6
:see_no_evil: Oops! No globbing sparse checkouts, must enumerate
reactive-firewall Jul 24, 2025
c5b556e
DEBUG sparse checkout for actions
reactive-firewall Jul 24, 2025
464eedb
Minor Regression fix for CI inputs
reactive-firewall Jul 24, 2025
d0469bd
DEBUG Refactor a bit
reactive-firewall Jul 24, 2025
18ec6ed
DEBUG integration action a bit more
reactive-firewall Jul 24, 2025
c3f5651
Refactored Smoke-testing experiment into re-useable action
reactive-firewall Jul 24, 2025
32583f5
Fix typo regression.
reactive-firewall Jul 24, 2025
e4dd8ce
:rocket: Prototype
reactive-firewall Jul 24, 2025
f2ab013
:see_no_evil: More minor fixes for CI actions
reactive-firewall Jul 24, 2025
708a78a
Oops! forgot the expansion - retry post-proc summary
reactive-firewall Jul 25, 2025
9e7a8ec
Improved the final output slightly
reactive-firewall Jul 25, 2025
7c8894a
:sparkle: Improved post-proc some more.
reactive-firewall Jul 25, 2025
101b653
Add quotes?
reactive-firewall Jul 25, 2025
ebd23cf
More cleanup of new actions
reactive-firewall Jul 25, 2025
918fb9d
Small improvements to the new actions reporting logic WIP
reactive-firewall Jul 26, 2025
7d3dc3d
Revert triggers for now
reactive-firewall Jul 28, 2025
63c6f61
Issue with chickens and eggs and the order of things.
reactive-firewall Jul 28, 2025
6a2353c
More minor fixes
reactive-firewall Jul 28, 2025
d36c8ca
Oops Missed one.
reactive-firewall Jul 28, 2025
6534d1c
[DEMO] Protoytpe from GHI #5974 with rpau from PR #6089
reactive-firewall Aug 25, 2025
aa209d4
[DEBUG] Opps misunderstood location of tools dir.
reactive-firewall Aug 25, 2025
cf5e371
[DEBUG] Attempt to -c invoke rpau tool with modified import (WIP PR #…
reactive-firewall Aug 27, 2025
cd3dc0a
[DEBUG] possible workaround for braindead windows runners
reactive-firewall Aug 28, 2025
42254c7
[DEBUG] Minor Regression fix for double entries. Oops.
reactive-firewall Aug 28, 2025
8b8398b
[STYLE] Cleaning up the report for CI runs a bit.
reactive-firewall Aug 28, 2025
e79c13b
[DEBUG] Adjust output path to upload at end
reactive-firewall Aug 28, 2025
b211032
[PATCH] workaround for elusive patched files
reactive-firewall Aug 28, 2025
d65b890
Testing based on examples from PR RustPython/RustPython#6089
reactive-firewall Aug 31, 2025
e20f6c5
Oops! forgot to mkdir in setup phase re-try test.
reactive-firewall Aug 31, 2025
3dd549f
Test for new Lib_updater.py script in integration phase (for Lib/test…
reactive-firewall Sep 3, 2025
64728df
[PATCH] Template Regression check in CI/CD
reactive-firewall Sep 28, 2025
b87cb8a
Apply suggestions from code review with AI assistant
reactive-firewall Sep 28, 2025
1960425
[PATCH] Cleanup from automated review in PR #6176
reactive-firewall Sep 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 174 additions & 0 deletions .github/actions/CI-5974-Fetch-CPython/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
---
name: 'Checkout CPython'
description: 'checks-out the given CPython version'
author: 'Mr. Walls'
branding:
icon: 'download-cloud'
color: 'blue'
inputs:
override-repository:
description: |
The GitHub repository to clone CPython from. When running this action on github.com,
the default value is sufficient. Useful for Forks.
required: true
default: ${{ github.server_url == 'https://github.com' && github.repository || 'python/cpython' }}
override-rustpython-path:
description: |
override value for path to the Python Lib. The default is to use the value of the environment
variable 'RUSTPYTHONPATH'. Most users will find the default 'Lib' sufficient.
required: true
default: ${{ github.server_url == 'https://github.com' && github.repository || 'Lib' }}
override-path:
description: |
Path to setup. When running this action on github.com, the default value
is sufficient. MUST be a path to a directory named 'cpython'.
required: true
default: ${{ github.server_url == 'https://github.com' && github.workspace || 'cpython' }}
override-cpython-lib-path:
description: |
override value for path to the CPython Reference Lib. The default is to use the value of the
environment variable 'PYTHONPLATLIBDIR'. Most users will find the default 'Lib' sufficient.
See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPLATLIBDIR for more.
required: true
default: ${{ github.server_url == 'https://github.com' && github.repository || 'Lib' }}
match:
description: |
Glob-style pattern of files or directories to match and integrate.
Only works with git tracked files.
required: true
type: string
default: 'Lib/test/*.py Lib/test/**/*.py'
ignore:
description: |
List of Glob-style patterns of files or directories to ignore.
Only works with git tracked files.
required: false
type: string
github-token:
description: |
The token used to authenticate when fetching RustPython commits from
https://github.com/RustPython/RustPython.git. When running this action on github.com,
the default value is sufficient. When running on GHES, you can pass a personal access
token for github.com if you are experiencing rate limiting.
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
required: true
python-version:
description: |
The Cpython version (e.g., any valid release or tag, 3.11, 3.12, 3.13) to override setup.
The default is to use the value of the environment variable 'PYTHON_VERSION'.
default: '3.13'
required: true
outputs:
branch-name:
description: "The name of the branch that was checked-out."
value: ${{ steps.output_branch_name.outputs.branch-name || '' }}
sha:
description: "The SHA of the commit checked-out."
value: ${{ steps.output_sha.outputs.sha || 'HEAD' }}
files:
description: "The downloaded artifact-files."
value: ${{ steps.output_cpython_files.outputs.files }}

runs:
using: composite
steps:
- name: "Setup Python"
id: output_python
env:
PYTHON_VERSION_INPUT: ${{ inputs.python-version }}
shell: bash
run: |
if [[ -n $PYTHON_VERSION_INPUT ]]; then
printf "python-version=%s\n" "${PYTHON_VERSION_INPUT}" >> "$GITHUB_OUTPUT"
PYTHON_VERSION=${PYTHON_VERSION_INPUT}
else
printf "python-version=%s\n" "${PYTHON_VERSION}" >> "$GITHUB_OUTPUT"
fi
printf "%s\n" "PYTHON_VERSION=${PYTHON_VERSION}" >> "$GITHUB_ENV"
- name: Fetch Reference Cpython ${{ matrix.python-version }} on ${{ matrix.os }}
id: cpython
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
path: ${{ inputs.override-path }}
fetch-tags: true
sparse-checkout: |
${{ inputs.override-cpython-lib-path }}
ref: ${{ steps.output_python.outputs.python-version }}
repository: ${{ inputs.override-repository }}
# fixed settings
fetch-depth: 0
sparse-checkout-cone-mode: false
submodules: true
token: ${{ inputs.github-token }}
- id: store_old_path
if: ${{ !cancelled() }}
shell: bash
run: |
cd ${PWD:-.} ;
export OLD_PWD=$(pwd) ; # only local use for bootstrap
printf "initial-path=%s\n" "${OLD_PWD}" >> "$GITHUB_OUTPUT"
- id: output_branch_name
if: ${{ !cancelled() }}
shell: bash
run: |
cd ${{ inputs.override-path }} || exit 14 ;
printf "branch-name=%s\n" $(git name-rev --name-only HEAD | cut -d~ -f1-1) >> "$GITHUB_OUTPUT"
cd ${{ steps.store_old_path.outputs.initial-path }} || exit 15 ;
- id: output_sha
shell: bash
run: |
cd ${{ inputs.override-path }} || exit 14 ;
printf "sha=%s\n" $(git log -1 --format=%H) >> "$GITHUB_OUTPUT"
cd ${{ steps.store_old_path.outputs.initial-path }} || exit 15 ;
- name: Configure Ignored Reference Lib Files
id: refignorefiles
shell: bash
env:
GIT_IGNORE_PATTERN: ${{ inputs.ignore || '' }}
run: |
# TODO: include work from RustPython/scripts/notes.txt
cd ${{ inputs.override-path }} || exit 14 ;
if [[ -w ".git/info/exclude" ]] ; then
printf "%s\n" ${GIT_IGNORE_PATTERN:-} >>".git/info/exclude" || : ;
else
printf "::debug::%s\n" "Could not find .git/info/exclude" ;
printf "%s\n" ${GIT_IGNORE_PATTERN:-} >>".gitignore" || : ;
fi ;
cd ${{ steps.store_old_path.outputs.initial-path }} || exit 15 ;
if: ${{ success() }}
- name: Enumerate Reference Lib Files
id: output_cpython_files
shell: bash
env:
TEST_MATCH_PATTERN: ${{ inputs.match || '' }}
run: |
cd ${{ inputs.override-path }} || exit 14 ;
FILES=$(git ls-files --exclude-standard -- ${{ env.TEST_MATCH_PATTERN }} )
if [ -z "$FILES" ]; then
printf "%s\n" "::warning file=.github/actions/:: No ${{ inputs.override-cpython-lib-path }} Reference files found for Cpython ${{ inputs.python-version }} on ${{ runner.os }}." ;
printf "%s\n" "files=" >> "$GITHUB_OUTPUT"
else
printf "%s\n" "Reference files found:"
printf "%s\n" "$FILES"
# Replace line breaks with commas for GitHub Action Output
FILES="${FILES//$'\n'/ }"
printf "%s\n" "files=$FILES" >> "$GITHUB_OUTPUT"
fi
cd ${{ steps.store_old_path.outputs.initial-path }} || exit 15 ;
if: ${{ success() }}
- name: "License"
id: show_cpython_license
shell: bash
if: ${{ !cancelled() }}
run: |
cd ${{ inputs.override-path }} || exit 14 ;
if [[ -r LICENSE ]] ; then
printf "\n\n"
cat <LICENSE ;
printf "\n\n"
else
printf "%s\n" "::warning title=UNLICENSED:: This is an UNLICENSED Build for Cpython ${{ inputs.python-version }} on ${{ runner.os }}"
fi
cd ${{ steps.store_old_path.outputs.initial-path }} || exit 15 ;

130 changes: 130 additions & 0 deletions .github/actions/CI-5974-Fetch-RustPython/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
---
name: 'Checkout and Build RustPython'
description: 'checks-out the given Rust-Python commit and builds RustPython'
author: 'Mr. Walls'
branding:
icon: 'download-cloud'
color: 'yellow'
inputs:
override-ref:
description: |
The commit or git ref to checkout and build for. When running this action on github.com,
the default value is sufficient.
required: true
default: ${{ github.server_url == 'https://github.com' && github.sha || 'main' }}
override-repository:
description: |
The GitHub repository to clone RustPython from. When running this action on github.com,
the default value is sufficient. Useful for Forks.
required: true
default: ${{ github.server_url == 'https://github.com' && github.repository || 'RustPython/RustPython' }}
override-rustpython-path:
description: |
override value for path to the Python Lib. The default is to use the value of the environment
variable 'RUSTPYTHONPATH'. Most users will find the default 'Lib' sufficient.
required: true
default: ${{ github.server_url == 'https://github.com' && github.repository || 'Lib' }}
override-path:
description: |
Path to setup. When running this action on github.com, the default value
is sufficient. MUST be a path to a directory named 'rustpython'.
required: true
default: ${{ github.server_url == 'https://github.com' && github.workspace || 'rustpython' }}
github-token:
description: |
The token used to authenticate when fetching RustPython commits from
https://github.com/RustPython/RustPython.git. When running this action on github.com,
the default value is sufficient. When running on GHES, you can pass a personal access
token for github.com if you are experiencing rate limiting.
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
required: true
outputs:
branch-name:
description: "The name of the branch that was checked-out."
value: ${{ steps.output_branch_name.outputs.branch-name || '' }}
sha:
description: "The SHA of the commit checked-out."
value: ${{ steps.output_sha.outputs.sha || 'HEAD' }}
rustpython-version:
description: "The python version that was used in the run."
value: '0.4' # TODO: fix this
rustpython-lib-path:
description: "The python version that was used in the run."
value: ${{ steps.output_rpython_path.output.rustpython-lib-path }}

runs:
using: composite
steps:
- name: Checkout repository
id: rpython
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: ${{ inputs.override-path }}
persist-credentials: false
ref: ${{ inputs.override-ref }}
repository: ${{ inputs.override-repository }}
# fixed settings
fetch-depth: 0
sparse-checkout-cone-mode: false
submodules: true
token: ${{ inputs.github-token }}
- id: store_old_path
if: ${{ !cancelled() }}
shell: bash
run: |
cd ${PWD:-.} ;
export OLD_PWD=$(pwd) ; # only local use for bootstrap
printf "initial-path=%s\n" "${OLD_PWD}" >> "$GITHUB_OUTPUT" ;
if [[ "$RUNNER_DEBUG" == "true" ]] || [[ "$ACTIONS_STEP_DEBUG" == "true" ]]; then
printf "::debug::Return directory now set to '%s'\n" "${OLD_PWD}" ;
printf "::debug::Working directory is set to '%s'\n" '${{ inputs.override-path }}' ;
fi ;
- id: output_branch_name
if: ${{ !cancelled() }}
shell: bash
run: |
cd ${{ inputs.override-path }} || exit 13 ;
printf "branch-name=%s\n" $(git name-rev --name-only HEAD | cut -d~ -f1-1) >> "$GITHUB_OUTPUT"
cd ${{ steps.store_old_path.outputs.initial-path }} || exit 15 ;
- id: output_sha
shell: bash
run: |
cd ${{ inputs.override-path }} || exit 13 ;
printf "sha=%s\n" $(git log -1 --format=%H) >> "$GITHUB_OUTPUT"
cd ${{ steps.store_old_path.outputs.initial-path }} || exit 15 ;
- name: "Setup Cargo"
id: output_cargo_args
shell: bash
run: |
if [[ -n $CARGO_ARGS ]]; then
if [[ "$RUNNER_DEBUG" == "true" ]] || [[ "$ACTIONS_STEP_DEBUG" == "true" ]]; then printf "::debug::CARGO_ARGS already set to '%s'\n" "${CARGO_ARGS}" ; fi ;
# e.g., CARGO_ARGS=${CARGO_ARGS}
else
CARGO_ARGS="--release" ;
if [[ "$RUNNER_DEBUG" == "true" ]] || [[ "$ACTIONS_STEP_DEBUG" == "true" ]]; then printf "::debug::CARGO_ARGS initialized to '%s'\n" "${CARGO_ARGS}" ; fi ;
fi ;
printf "%s\n" "CARGO_ARGS=${CARGO_ARGS}" >> "$GITHUB_ENV" ;
- name: Pre-Test Build check
id: build_rpython
shell: bash
env:
OS: ${{ runner.os }}
if: ${{ !cancelled() }}
run: |
cd ${{ inputs.override-path }} || exit 13 ;
printf "::group::%s\n" "Cargo" ;
if [[ "$RUNNER_DEBUG" == "true" ]] || [[ "$ACTIONS_STEP_DEBUG" == "true" ]]; then printf "::debug::Now Building '%s'\n" "RustPython" ; fi ;
# Execute the testing command in a subshell
(
RUSTPYTHONPATH=${{ inputs.override-rustpython-path }} cargo run $CARGO_ARGS -- --version || printf "::error title='build failure':: Could not pass build step for version check on ${OS}.\n" ;
) ;
printf "::endgroup::%s\n" ;
cd ${{ steps.store_old_path.outputs.initial-path }} || exit 15 ;
- id: output_rpython_path
shell: bash
run: |
cd ${{ inputs.override-path }} || exit 13 ; # in case it is relative
cd ${{ inputs.override-rustpython-path }} || exit 13 ;
printf "RUSTPYTHONPATH=%s\n" $(pwd) >> "$GITHUB_ENV" ;
printf "rustpython-lib-path=%s\n" $(pwd) >> "$GITHUB_OUTPUT" ;
cd ${{ steps.store_old_path.outputs.initial-path }} || exit 15 ;
82 changes: 82 additions & 0 deletions .github/actions/CI-5974-Integrate-CPython/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
name: 'Integrate Reference Implementation'
description: 'Copy Reference Implementation'
author: 'Mr. Walls'
branding:
icon: 'copy'
color: 'purple'
inputs:
into-path:
description: |
Path to Destination. Default is 'rustpython'
required: true
default: 'rustpython'
from-path:
description: |
Path to source. Default is 'cpython'
required: true
default: 'cpython'
files:
description: |
List of paths to copy from source to destination. Default is 'Lib/**/*.py'
required: true
default: 'Lib/**/*.py'
python-version:
description: |
The Cpython version (e.g., any valid release or tag, 3.11, 3.12, 3.13) to override setup.
The default is to use the value of the environment variable 'PYTHON_VERSION'.
default: '3.13'
required: true

# TODO: add verification steps

runs:
using: composite
steps:
- id: output_python
env:
PYTHON_VERSION_INPUT: ${{ inputs.python-version }}
name: "Detect Python"
if: ${{ inputs.files != '' }}
shell: bash
run: |
# check the python version
if [[ -n $PYTHON_VERSION_INPUT ]]; then
printf "python-version=%s\n" "${PYTHON_VERSION_INPUT}" >> "$GITHUB_OUTPUT"
PYTHON_VERSION=${PYTHON_VERSION_INPUT}
else
printf "python-version=%s\n" "${PYTHON_VERSION}" >> "$GITHUB_OUTPUT"
fi
printf "%s\n" "PYTHON_VERSION=${PYTHON_VERSION}" >> "$GITHUB_ENV"
if [[ "$RUNNER_DEBUG" == "true" ]] || [[ "$ACTIONS_STEP_DEBUG" == "true" ]]; then printf "::debug::Targeting Cpython %s.\n" "${PYTHON_VERSION}" ; fi ;
- id: setup_mkdir_option
if: ${{ !cancelled() }}
shell: bash
run: |
# set mkdir options per platform
if [[ ${{ runner.os }} != 'Windows' ]] ; then
printf "mkdir-args=%s\n" "-v -p -m 751" >> "$GITHUB_OUTPUT"
printf "MKDIR_ARGS=%s\n" "-v -p -m 751" >> "$GITHUB_ENV"
else
printf "mkdir-args=%s\n" "-v -p" >> "$GITHUB_OUTPUT"
printf "MKDIR_ARGS=%s\n" "-v -p" >> "$GITHUB_ENV"
fi
- name: "Integrate Cpython Test files"
id: merge_theirs
shell: bash
if: ${{ !cancelled() && inputs.files != '' }}
env:
INPUT_FILES: ${{ inputs.files }}
run: |
printf "::group::%s\n" "Copy Reference Implementation" ;
for reference_file in ${INPUT_FILES}; do
[[ -d $(dirname ${{ inputs.into-path }}/"${reference_file}" ) ]] || mkdir $MKDIR_ARGS $(dirname ${{ inputs.into-path }}/"${reference_file}" ) ;
if [[ "$reference_file" == Lib/test/* ]] ; then
# update patches with lib_updater tool from #6089
${{ inputs.into-path }}/scripts/lib_updater.py --from ${{ inputs.into-path }}/"${reference_file}" --to ${{ inputs.from-path }}/"${reference_file}" -o ${{ inputs.into-path }}/"${reference_file}" || \
printf "::warning file='%s',title='integration failure':: Could not integrate file for Cpython %s on %s.\n" "${reference_file}" '${PYTHON_VERSION}' '${{ runner.os }}' ;
else
cp -vf ${{ inputs.from-path }}/"${reference_file}" ${{ inputs.into-path }}/"${reference_file}" || printf "::warning file='%s',title='integration failure':: Could not integrate file for Cpython %s on %s.\n" "${reference_file}" '${PYTHON_VERSION}' '${{ runner.os }}' ;
fi
done ;
printf "\n::endgroup::\n\n" ;
Loading