| 1 |
name: Rpython Unit Tests |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
on: |
| 13 |
push: |
| 14 |
branches: [ "main", "py3.[0-9]+" ] |
| 15 |
paths: |
| 16 |
- "rpython/**/*" |
| 17 |
- "pytest.py" |
| 18 |
- ".github/**/*" |
| 19 |
pull_request: |
| 20 |
branches: [ "main", "py3.[0-9]+" ] |
| 21 |
paths: |
| 22 |
- "rpython/**/*" |
| 23 |
- "pytest.py" |
| 24 |
- ".github/**/*" |
| 25 |
workflow_dispatch: |
| 26 |
|
| 27 |
|
| 28 |
concurrency: |
| 29 |
group: ${{ github.ref }} |
| 30 |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
| 31 |
|
| 32 |
|
| 33 |
permissions: |
| 34 |
contents: read |
| 35 |
|
| 36 |
jobs: |
| 37 |
test-misc: |
| 38 |
runs-on: ${{ matrix.os }} |
| 39 |
strategy: |
| 40 |
fail-fast: false |
| 41 |
matrix: |
| 42 |
os: [ubuntu-24.04] |
| 43 |
|
| 44 |
steps: |
| 45 |
- uses: actions/checkout@v6 |
| 46 |
- uses: actions/setup-python@v6 |
| 47 |
with: |
| 48 |
python-version: "pypy2.7-7.3.17" |
| 49 |
- run: | |
| 50 |
echo "Install requirements" |
| 51 |
sudo apt-get install -y libgc-dev |
| 52 |
pypy2 -m pip install --user hypothesis==4.39.3 |
| 53 |
- name: Test Annotator |
| 54 |
run: pypy2 pytest.py rpython/annotator |
| 55 |
- name: Test Config |
| 56 |
run: pypy2 pytest.py rpython/config |
| 57 |
- name: Test Flowspace |
| 58 |
run: pypy2 pytest.py rpython/flowspace |
| 59 |
- name: Test Tool |
| 60 |
run: pypy2 pytest.py rpython/tool |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
test-memory: |
| 103 |
runs-on: ${{ matrix.os }} |
| 104 |
strategy: |
| 105 |
fail-fast: false |
| 106 |
matrix: |
| 107 |
os: [ubuntu-24.04] |
| 108 |
|
| 109 |
steps: |
| 110 |
- uses: actions/checkout@v6 |
| 111 |
- uses: actions/setup-python@v6 |
| 112 |
with: |
| 113 |
python-version: "pypy2.7-7.3.17" |
| 114 |
- run: | |
| 115 |
echo "Install requirements" |
| 116 |
sudo apt-get install -y libgc-dev |
| 117 |
pypy2 -m pip install --user hypothesis==4.39.3 |
| 118 |
- name: Test Memory |
| 119 |
run: pypy2 pytest.py rpython/memory |
| 120 |
|
| 121 |
test-rlib: |
| 122 |
runs-on: ${{ matrix.os }} |
| 123 |
strategy: |
| 124 |
fail-fast: false |
| 125 |
matrix: |
| 126 |
os: [ubuntu-22.04] |
| 127 |
|
| 128 |
steps: |
| 129 |
- uses: actions/checkout@v6 |
| 130 |
- uses: actions/setup-python@v6 |
| 131 |
with: |
| 132 |
python-version: "pypy2.7-7.3.17" |
| 133 |
- run: | |
| 134 |
echo "Install requirements" |
| 135 |
sudo apt-get install -y libgc-dev |
| 136 |
pypy2 -m pip install --user hypothesis==4.39.3 vmprof enum34>=1.1.2 |
| 137 |
- name: Test RLib |
| 138 |
run: pypy2 pytest.py rpython/rlib -v -m "not flaky" |
| 139 |
|
| 140 |
test-rtyper: |
| 141 |
runs-on: ${{ matrix.os }} |
| 142 |
strategy: |
| 143 |
fail-fast: false |
| 144 |
matrix: |
| 145 |
os: [ubuntu-24.04] |
| 146 |
|
| 147 |
steps: |
| 148 |
- uses: actions/checkout@v6 |
| 149 |
- uses: actions/setup-python@v6 |
| 150 |
with: |
| 151 |
python-version: "pypy2.7-7.3.17" |
| 152 |
- run: | |
| 153 |
echo "Install requirements" |
| 154 |
sudo apt-get install -y libgc-dev |
| 155 |
pypy2 -m pip install --user hypothesis==4.39.3 |
| 156 |
- name: Test RTyper |
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
run: | |
| 161 |
pypy2 pytest.py rpython/rtyper --ignore=rpython/rtyper/test/test_rlist.py |
| 162 |
pypy2 pytest.py -v rpython/rtyper/test/test_rlist.py |
| 163 |
|
| 164 |
test-translator: |
| 165 |
runs-on: ${{ matrix.os }} |
| 166 |
strategy: |
| 167 |
fail-fast: false |
| 168 |
matrix: |
| 169 |
os: [ubuntu-24.04] |
| 170 |
|
| 171 |
steps: |
| 172 |
- uses: actions/checkout@v6 |
| 173 |
- uses: actions/setup-python@v6 |
| 174 |
with: |
| 175 |
python-version: "pypy2.7-7.3.17" |
| 176 |
- run: | |
| 177 |
echo "Install requirements" |
| 178 |
sudo apt-get install -y libgc-dev |
| 179 |
pypy2 -m pip install --user hypothesis==4.39.3 |
| 180 |
- name: Test Translator |
| 181 |
run: | |
| 182 |
# we don't need to run test_typed.py, because test_backendoptimized.py |
| 183 |
# runs the same tests, just with more optimizations |
| 184 |
pypy2 pytest.py rpython/translator --ignore=rpython/translator/c/test/test_typed.py --ignore=rpython/translator/c/test/test_newgc.py |
| 185 |
# only run the tests for the incminimark GC, the one that we always use |
| 186 |
# in practice |
| 187 |
pypy2 pytest.py rpython/translator/c/test/test_newgc.py -k TestIncrementalMiniMarkGC |