@@ -5,8 +5,22 @@ on: [push, pull_request]
55
66jobs :
77 check_if_output_files_changed :
8- name : Check if output files changed
9- runs-on : ubuntu-latest
8+ name : Check if output files changed (Python ${{ matrix.py_version }})
9+ runs-on : ubuntu-22.04
10+ strategy :
11+ fail-fast : false
12+ matrix :
13+ py_version :
14+ - ' 3.7'
15+ - ' 3.8'
16+ - ' 3.9'
17+ - ' 3.10'
18+ - ' 3.11'
19+ - ' 3.12'
20+ - ' 3.13'
21+ - ' 3.14'
22+ - ' 3.14t'
23+ - ' 3.x' # Explicit latest
1024
1125 steps :
1226 - name : Checkout reposistory
@@ -15,16 +29,31 @@ jobs:
1529 - name : Setup Rust toolchain
1630 uses : dtolnay/rust-toolchain@stable
1731
18- - name : Setup requirements
32+ - name : Set up Python ${{ matrix.py_version }}
33+ uses : actions/setup-python@main
34+ with :
35+ python-version : ${{ matrix.py_version }}
36+
37+ - name : Install uv
38+ uses : astral-sh/setup-uv@v7
39+
40+ - name : Setup venv ${{ matrix.py_version }}
41+ if : ${{ matrix.py_version != '3.x' }}
42+ run : |
43+ uv venv --python ${{ matrix.py_version }}
44+ # `--python 3 --managed-python` makes uv to install the latest python version available
45+ - name : Setup venv 3.x
46+ if : ${{ matrix.py_version == '3.x' }}
1947 run : |
20- python3 -m pip install -U -r requirements.txt
21- python3 -m pip install -U maturin
48+ uv venv --python 3 --managed-python
2249
23- - name : Install local mapfile_parser
24- run : python3 -m pip install .
50+ - name : Sync venv
51+ run : |
52+ uv sync
2553
2654 - name : Update tests outputs
27- run : python3 tests/update_outputs.py
55+ run : |
56+ uv run tests/update_outputs.py
2857
2958 - name : Check if there are any changes in the test cases
3059 id : tests_changes
3867 exit 1
3968
4069 check_progress_nonmatchings :
41- name : Check progress by NON_MATCHING symbols
42- runs-on : ubuntu-latest
70+ name : Check progress by NON_MATCHING symbols (Python ${{ matrix.py_version }})
71+ runs-on : ubuntu-22.04
72+ strategy :
73+ fail-fast : false
74+ matrix :
75+ py_version :
76+ - ' 3.7'
77+ - ' 3.8'
78+ - ' 3.9'
79+ - ' 3.10'
80+ - ' 3.11'
81+ - ' 3.12'
82+ - ' 3.13'
83+ - ' 3.14'
84+ - ' 3.14t'
85+ - ' 3.x' # Explicit latest
4386
4487 steps :
4588 - name : Checkout reposistory
@@ -48,20 +91,40 @@ jobs:
4891 - name : Setup Rust toolchain
4992 uses : dtolnay/rust-toolchain@stable
5093
51- - name : Setup requirements
52- run : |
53- python3 -m pip install -U -r requirements.txt
54- python3 -m pip install -U maturin
94+ - name : Set up Python ${{ matrix.py_version }}
95+ uses : actions/setup-python@main
96+ with :
97+ python-version : ${{ matrix.py_version }}
5598
56- - name : Install local mapfile_parser
57- run : python3 -m pip install .
99+ - name : Install uv
100+ uses : astral-sh/setup-uv@v7
101+
102+ - name : Setup project
103+ run : |
104+ uv venv --python ${{ matrix.py_version }}
105+ uv sync
58106
59107 - name : Update tests outputs
60- run : python3 tests/check_progress_nonmatchings.py
108+ run : |
109+ uv run tests/check_progress_nonmatchings.py
61110
62111 check_frontends :
63- name : Check frontends aren't broken
64- runs-on : ubuntu-latest
112+ name : Check frontends aren't broken (Python ${{ matrix.py_version }})
113+ runs-on : ubuntu-22.04
114+ strategy :
115+ fail-fast : false
116+ matrix :
117+ py_version :
118+ - ' 3.7'
119+ - ' 3.8'
120+ - ' 3.9'
121+ - ' 3.10'
122+ - ' 3.11'
123+ - ' 3.12'
124+ - ' 3.13'
125+ - ' 3.14'
126+ - ' 3.14t'
127+ - ' 3.x' # Explicit latest
65128
66129 steps :
67130 - name : Checkout reposistory
@@ -70,37 +133,42 @@ jobs:
70133 - name : Setup Rust toolchain
71134 uses : dtolnay/rust-toolchain@stable
72135
73- - name : Setup requirements
74- run : |
75- python3 -m pip install -U -r requirements.txt
76- python3 -m pip install -U maturin
136+ - name : Set up Python ${{ matrix.py_version }}
137+ uses : actions/setup-python@main
138+ with :
139+ python-version : ${{ matrix.py_version }}
140+
141+ - name : Install uv
142+ uses : astral-sh/setup-uv@v7
77143
78- - name : Install local mapfile_parser
79- run : python3 -m pip install .
144+ - name : Setup project
145+ run : |
146+ uv venv --python ${{ matrix.py_version }}
147+ uv sync
80148
81149 - name : bss_check
82- run : python3 -m mapfile_parser bss_check tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map
150+ run : uv run mapfile_parser bss_check tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map
83151
84152 - name : first_diff
85- run : python3 -m mapfile_parser first_diff tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map
153+ run : uv run mapfile_parser first_diff tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map
86154
87155 - name : jsonify
88- run : python3 -m mapfile_parser jsonify tests/maps/gnuld/n64/drmario64.us.map
156+ run : uv run mapfile_parser jsonify tests/maps/gnuld/n64/drmario64.us.map
89157
90158 - name : objdiff_report
91- run : python3 -m mapfile_parser objdiff_report tests/maps/gnuld/n64/drmario64.us.map objdiff_report.json
159+ run : uv run mapfile_parser objdiff_report tests/maps/gnuld/n64/drmario64.us.map objdiff_report.json
92160
93161 - name : pj64_syms
94- run : python3 -m mapfile_parser pj64_syms tests/maps/gnuld/n64/drmario64.us.map
162+ run : uv run mapfile_parser pj64_syms tests/maps/gnuld/n64/drmario64.us.map
95163
96164 - name : progress
97- run : python3 -m mapfile_parser progress tests/maps/gnuld/n64/drmario64.us.map asm asm/nonmatchings
165+ run : uv run mapfile_parser progress tests/maps/gnuld/n64/drmario64.us.map asm asm/nonmatchings
98166
99167 - name : sym_info
100- run : python3 -m mapfile_parser sym_info tests/maps/gnuld/n64/drmario64.us.map entrypoint
168+ run : uv run mapfile_parser sym_info tests/maps/gnuld/n64/drmario64.us.map entrypoint
101169
102170 - name : symbol_sizes_csv
103- run : python3 -m mapfile_parser symbol_sizes_csv tests/maps/gnuld/n64/drmario64.us.map
171+ run : uv run mapfile_parser symbol_sizes_csv tests/maps/gnuld/n64/drmario64.us.map
104172
105173 - name : upload_frogress
106- run : python3 -m mapfile_parser upload_frogress tests/maps/gnuld/n64/drmario64.us.map asm asm/nonmatchings drmario64 us code --verbose --dry-run
174+ run : uv run mapfile_parser upload_frogress tests/maps/gnuld/n64/drmario64.us.map asm asm/nonmatchings drmario64 us code --verbose --dry-run
0 commit comments