@@ -160,32 +160,25 @@ jobs:
160160 path : ./reports/pytest.xml
161161 retention-days : 30
162162
163- # Test zipapp build across Python versions and platforms
164- test-zipapp-build :
165- name : Test zipapp build (Python ${{ matrix.python-version }} on ${{ matrix.os }})
166- runs-on : ${{ matrix.os }}
167- strategy :
168- fail-fast : false
169- matrix :
170- os : [ubuntu-latest, windows-latest, macos-latest]
171- python-version : ['3.10', '3.11', '3.12', '3.13', '3.14']
172-
163+ # Build zipapp once
164+ build-zipapp :
165+ name : Build zipapp
166+ runs-on : ubuntu-latest
173167 steps :
174168 - uses : actions/checkout@v4
175169
176- - name : Set up Python ${{ matrix.python-version }}
170+ - name : Set up Python 3.10
177171 uses : actions/setup-python@v5
178172 with :
179- python-version : ${{ matrix.python-version }}
173+ python-version : ' 3.10 '
180174 cache : ' pip'
181175
182176 - name : Cache PEX dependencies
183177 uses : actions/cache@v4
184178 with :
185179 path : ~/.pex
186- key : pex-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('setup.py', 'requirements.txt') }}
180+ key : pex-${{ runner.os }}-${{ hashFiles('setup.py', 'requirements.txt') }}
187181 restore-keys : |
188- pex-${{ runner.os }}-${{ matrix.python-version }}-
189182 pex-${{ runner.os }}-
190183
191184 - name : Install pex
@@ -203,6 +196,41 @@ jobs:
203196 --python-shebang "/usr/bin/env python3" \
204197 --venv
205198
199+ - name : Upload zipapp artifact
200+ uses : actions/upload-artifact@v4
201+ with :
202+ name : cloudsmith-zipapp
203+ path : cloudsmith-${{ env.VERSION }}.pyz
204+ retention-days : 1
205+
206+ # Test zipapp across Python versions and platforms
207+ test-zipapp :
208+ name : Test zipapp (Python ${{ matrix.python-version }} on ${{ matrix.os }})
209+ needs : build-zipapp
210+ runs-on : ${{ matrix.os }}
211+ strategy :
212+ fail-fast : false
213+ matrix :
214+ os : [ubuntu-latest, windows-latest, macos-latest]
215+ python-version : ['3.10', '3.11', '3.12', '3.13', '3.14']
216+
217+ steps :
218+ - uses : actions/checkout@v4
219+
220+ - name : Set up Python ${{ matrix.python-version }}
221+ uses : actions/setup-python@v5
222+ with :
223+ python-version : ${{ matrix.python-version }}
224+
225+ - name : Get version
226+ id : get_version
227+ run : echo "VERSION=$(cat cloudsmith_cli/data/VERSION)" >> $GITHUB_ENV
228+
229+ - name : Download zipapp artifact
230+ uses : actions/download-artifact@v4
231+ with :
232+ name : cloudsmith-zipapp
233+
206234 - name : Make executable (Unix)
207235 if : runner.os != 'Windows'
208236 run : chmod +x cloudsmith-${{ env.VERSION }}.pyz
0 commit comments