|
| 1 | +# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 |
| 2 | +# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt |
| 3 | + |
| 4 | +name: "Python Nightly TSAN Tests" |
| 5 | + |
| 6 | +on: |
| 7 | + pull_request: |
| 8 | + push: |
| 9 | + branches: |
| 10 | + - "**/*nightly*" |
| 11 | + schedule: |
| 12 | + # Run at 2:22am early every morning Eastern time (6/7:22 UTC) |
| 13 | + # so that we get tips of CPython development tested. |
| 14 | + # https://crontab.guru/#22_7_%2a_%2a_%2a |
| 15 | + - cron: "22 7 * * *" |
| 16 | + workflow_dispatch: |
| 17 | + |
| 18 | +defaults: |
| 19 | + run: |
| 20 | + shell: bash |
| 21 | + |
| 22 | +env: |
| 23 | + PIP_DISABLE_PIP_VERSION_CHECK: 1 |
| 24 | + COVERAGE_IGOR_VERBOSE: 1 |
| 25 | + |
| 26 | +permissions: |
| 27 | + contents: read |
| 28 | + |
| 29 | +concurrency: |
| 30 | + group: "${{ github.workflow }}-${{ github.ref }}" |
| 31 | + cancel-in-progress: true |
| 32 | + |
| 33 | +jobs: |
| 34 | + tsan: |
| 35 | + name: "${{ matrix.python-version }} TSAN" |
| 36 | + container: |
| 37 | + image: ghcr.io/nascheme/cpython-tsan:${{ matrix.python-version }} |
| 38 | + runs-on: "ubuntu-latest" |
| 39 | + # If it doesn't finish in an hour, it's not going to. Don't spin for six |
| 40 | + # hours needlessly. |
| 41 | + timeout-minutes: 60 |
| 42 | + |
| 43 | + strategy: |
| 44 | + matrix: |
| 45 | + python-version: |
| 46 | + - "3.14t" |
| 47 | + - "3.15t-dev" |
| 48 | + |
| 49 | + fail-fast: false |
| 50 | + |
| 51 | + steps: |
| 52 | + - name: "Check out the repo" |
| 53 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 54 | + with: |
| 55 | + persist-credentials: false |
| 56 | + |
| 57 | + - name: "Show diagnostic info" |
| 58 | + run: | |
| 59 | + set -xe |
| 60 | + python -VV |
| 61 | + python -m site |
| 62 | + python -m sysconfig |
| 63 | + python -c "import sys; print('GIL:', getattr(sys, '_is_gil_enabled', lambda: True)())" |
| 64 | + python -m coverage debug sys |
| 65 | + python -m coverage debug pybehave |
| 66 | + env | sort |
| 67 | +
|
| 68 | + - name: "Install dependencies" |
| 69 | + run: | |
| 70 | + python -m pip install pytest pytest-run-parallel hypothesis |
| 71 | +
|
| 72 | + - name: "Run tests" |
| 73 | + run: | |
| 74 | + python -m pip install -e. -v |
| 75 | + python igor.py zip_mods |
| 76 | + python igor.py test_with_core ctrace -sv --parallel-threads=4 |
0 commit comments