Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add CI job to run tests sequentially #133556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
Loading
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions 8 .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,14 @@ jobs:
- name: SSL tests
run: ./python Lib/test/ssltests.py

build-sequential:
name: 'Sequential'
needs: build-context
if: needs.build-context.outputs.run-tests == 'true'
uses: ./.github/workflows/reusable-sequential.yml
with:
config_hash: ${{ needs.build-context.outputs.config-hash }}

build-wasi:
name: 'WASI'
needs: build-context
Expand Down
56 changes: 56 additions & 0 deletions 56 .github/workflows/reusable-sequential.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Reusable sequential

on:
workflow_call:
inputs:
config_hash:
required: true
type: string

env:
FORCE_COLOR: 1

jobs:
build-sequential:
name: test sequential (ubuntu-24.04)
runs-on: ubuntu-24.04
timeout-minutes: 60
env:
OPENSSL_VER: 3.0.15
PYTHONSTRICTEXTENSIONBUILD: 1
TERM: linux
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Runner image version
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
- name: Restore config.cache
uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
- name: Install dependencies
run: sudo ./.github/workflows/posix-deps-apt.sh
- name: Add ccache to PATH
run: |
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1.2
with:
save: ${{ github.event_name == 'push' }}
max-size: "200M"
- name: Configure CPython
run: >-
./configure
--config-cache
--prefix=/opt/python-dev
- name: Build CPython
run: make --jobs 4
- name: Install
run: make install --jobs 4
- name: Display build info
run: make pythoninfo
- name: Tests
run: ./bin/python3 -m test -uall
working-directory: /opt/python-dev
11 changes: 1 addition & 10 deletions 11 Lib/test/test_gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,27 +1161,18 @@ def make_ll(depth):
return head

head = make_ll(1000)
count = 1000

# There will be some objects we aren't counting,
# e.g. the gc stats dicts. This test checks
# that the counts don't grow, so we try to
# correct for the uncounted objects
# This is just an estimate.
CORRECTION = 20

enabled = gc.isenabled()
gc.enable()
olds = []
initial_heap_size = _testinternalcapi.get_tracked_heap_size()
for i in range(20_000):
newhead = make_ll(20)
count += 20
newhead.surprise = head
olds.append(newhead)
if len(olds) == 20:
new_objects = _testinternalcapi.get_tracked_heap_size() - initial_heap_size
self.assertLess(new_objects, 27_000, f"Heap growing. Reached limit after {i} iterations")
self.assertLess(new_objects, 27_500, f"Heap growing. Reached limit after {i} iterations")
del olds[:]
if not enabled:
gc.disable()
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.