Debian Codegraph @

.github/workflows/rpython-unit-tests.yml

raw symbols SCIP
1 name: Rpython Unit Tests
2 # === Implementation notes ===
3 # Since the test suite is too large to run in a reasonable amount of time
4 # we split this into tests by sub-folder within the rpython folder
5
6 # Note: this action will only run if there are changes to one of:
7 # - rpython folder
8 # - .github folder
9 # - pytest.py
10 # add more items to `paths` if we missed some!
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 # Limit tests to latest commit on branches other than main
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 # FIXME: jit tests hang for 6 hours under pypy + linux
63 # Possibly enable cpython + linux tests as a half-way house?
64 # test-jit-x86:
65 # runs-on: ${{ matrix.os }}
66 # strategy:
67 # fail-fast: false
68 # matrix:
69 # os: [ubuntu-24.04]
70
71 # steps:
72 # - uses: actions/checkout@v6
73 # - uses: actions/setup-python@v6
74 # with:
75 # python-version: "pypy2.7-7.3.17"
76 # - run: |
77 # echo "Install requirements"
78 # sudo apt-get install -y libgc-dev
79 # pypy2 -m pip install --user hypothesis==4.39.3
80 # - name: Test Jit - X86
81 # run: pypy2 pytest.py -v rpython/jit/backend/x86
82
83 # test-jit-other:
84 # runs-on: ${{ matrix.os }}
85 # strategy:
86 # fail-fast: false
87 # matrix:
88 # os: [ubuntu-24.04]
89
90 # steps:
91 # - uses: actions/checkout@v6
92 # - uses: actions/setup-python@v6
93 # with:
94 # python-version: "pypy2.7-7.3.17"
95 # - run: |
96 # echo "Install requirements"
97 # sudo apt-get install -y libgc-dev
98 # pypy2 -m pip install --user hypothesis==4.39.3
99 # - name: Test Jit - Other
100 # run: pypy2 pytest.py -v rpython/jit --ignore=rpython/jit/backend/x86
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 # Note we split out test_rlist.py due to occasional segfaults
158 # with test_memoryerror that only occur when run with the full
159 # test suite
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