66 pull_request :
77 workflow_dispatch :
88 release :
9- types : [ released ]
9+ types : [released]
1010permissions : read-all
1111jobs :
1212 lint :
13- name : Lint code
13+ name : Lint codebase
1414 runs-on : ubuntu-latest
1515 strategy :
1616 fail-fast : false
@@ -23,14 +23,16 @@ jobs:
2323 steps :
2424 - name : Checkout the Git repository
2525 uses : actions/checkout@v6
26- - name : Setup Python
27- uses : actions/setup-python@v6
26+ - uses : actions/setup-python@v6
2827 with :
2928 python-version : ${{ matrix.python }}
30- cache : " pip"
31- - name : Lint code
32- shell : bash
33- run : make lint format
29+ cache : pip
30+ - &install-emake
31+ name : Install emake
32+ run : pip install emake
33+ - name : Run lint
34+ run : emake lint
35+
3436 test-image :
3537 name : Generate test ext4 image
3638 runs-on : ubuntu-latest
@@ -57,10 +59,11 @@ jobs:
5759 test64.ext4.tmp
5860 test_htree.ext4
5961 if-no-files-found : error
62+
6063 test :
61- name : Test on ${{ matrix.os }} python ${{ matrix.python }}
64+ name : Test
6265 runs-on : ${{ matrix.os }}
63- needs : [ test-image ]
66+ needs : test-image
6467 strategy :
6568 fail-fast : false
6669 matrix :
@@ -72,19 +75,20 @@ jobs:
7275 steps :
7376 - name : Checkout the Git repository
7477 uses : actions/checkout@v6
78+ - uses : actions/setup-python@v6
79+ with :
80+ python-version : ${{ matrix.python }}
81+ cache : pip
82+ - *install-emake
7583 - name : Download test.ext4
7684 uses : actions/download-artifact@v8
7785 with :
7886 name : test.ext4
7987 path : .
80- - name : Setup Python
81- uses : actions/setup-python@v6
82- with :
83- python-version : ${{ matrix.python }}
84- cache : " pip"
85- - name : Run test
88+ - name : Run tests
8689 shell : bash
87- run : make test
90+ run : emake test
91+
8892 fuzz :
8993 name : Fuzz
9094 runs-on : ubuntu-latest
@@ -104,55 +108,55 @@ jobs:
104108 with :
105109 python-version : ${{ matrix.python }}
106110 cache : " pip"
111+ - *install-emake
107112 - name : Run test
108113 shell : bash
109114 run : make fuzz
115+
110116 build-sdist :
111- name : Build pip package
117+ name : Build sdist
118+ needs : &build-needs
119+ - lint
120+ - test
112121 runs-on : ubuntu-latest
113- needs : [ test, lint ]
114122 steps :
115123 - name : Checkout the Git repository
116124 uses : actions/checkout@v6
117- - name : Setup Python
118- uses : actions/setup-python@v6
119- with :
120- python-version : " 3.11"
121- cache : " pip"
122- - name : Install build tool
123- run : pip install build
124- - name : Building package
125- run : make release
125+ - *install-emake
126+ - name : Building sdist
127+ run : emake build --sdist
126128 - uses : actions/upload-artifact@v6
127129 with :
128130 name : pip-sdist
129131 path : dist/*
130132 if-no-files-found : error
133+
131134 build-any-wheel :
132135 name : Build wheel
136+ needs : *build-needs
133137 runs-on : ubuntu-latest
134- needs : [ test, lint ]
135138 steps :
136139 - name : Checkout the Git repository
137140 uses : actions/checkout@v6
138- - name : Setup Python
139- uses : actions/setup-python@v6
141+ - *install-emake
142+ - name : Building wheel
143+ run : emake build --wheel
144+ - name : Download test.ext4
145+ uses : actions/download-artifact@v8
140146 with :
141- python-version : " 3.11"
142- cache : " pip"
143- - name : Install build tool
144- run : pip install build
145- - name : Building package
146- run : make wheel
147+ name : test.ext4
148+ path : .
149+ - name : Test wheel
150+ run : emake test --wheel
147151 - uses : actions/upload-artifact@v6
148152 with :
149153 name : pip-wheel-none-any
150154 path : dist/*
151155 if-no-files-found : error
156+
152157 build-wheel :
153158 name : Build wheel
154- # if: github.repository == 'Eeems/python-ext4' && github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
155- needs : [ lint, test, test-image ]
159+ needs : *build-needs
156160 runs-on : ubuntu-latest
157161 strategy :
158162 fail-fast : false
@@ -169,43 +173,49 @@ jobs:
169173 libc :
170174 - glibc
171175 - musl
176+ exclude :
177+ - arch : i686 # segfaults currently
178+ python : " 3.14"
179+ libc : glibc
172180 steps :
173181 - name : Checkout the Git repository
174182 uses : actions/checkout@v6
183+ - *install-emake
175184 - name : Building wheel
176- run : ./wheel.sh
177- env :
178- python : ${{ matrix.python }}
179- arch : ${{ matrix.arch }}
180- libc : ${{ matrix.libc }}
185+ run : |
186+ emake build \
187+ --native-wheel \
188+ --arch ${{ matrix.arch }} \
189+ --libc ${{ matrix.libc }} \
190+ --python ${{ matrix.python }}
181191 - name : Download test.ext4
182192 uses : actions/download-artifact@v8
183193 with :
184194 name : test.ext4
185195 path : .
186196 - name : Testing wheel
187- run : ./test-wheel.sh
188- env :
189- python : ${{ matrix.python }}
190- arch : ${{ matrix.arch }}
191- libc : ${{ matrix.libc }}
197+ run : |
198+ emake test \
199+ --wheel \
200+ --arch ${{ matrix.arch }} \
201+ --libc ${{ matrix.libc }} \
202+ --python ${{ matrix.python }}
192203 - uses : actions/upload-artifact@v6
193204 with :
194205 name : pip-wheel-${{ matrix.python }}-${{ matrix.arch }}-${{ matrix.libc }}
195- path : wheelhouse /*
206+ path : dist /*
196207 if-no-files-found : error
208+
197209 publish :
198210 name : Publish to PyPi
199211 if : github.repository == 'Eeems/python-ext4' && github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
200212 needs : &release-needs
201213 - build-sdist
202214 - build-any-wheel
203215 - build-wheel
204- - fuzz
205216 runs-on : ubuntu-latest
206217 permissions :
207218 id-token : write
208- contents : write
209219 environment :
210220 name : pypi
211221 url : https://pypi.org/p/ext4
@@ -216,17 +226,15 @@ jobs:
216226 with :
217227 pattern : pip-*
218228 merge-multiple : true
219- path : artifacts
229+ path : dist
220230 - name : Publish package distributions to PyPI
221231 uses : pypa/gh-action-pypi-publish@release/v1
222232 with :
223233 packages-dir : ${{ steps.download.outputs.download-path }}
224234 skip-existing : true
225- print-hash : " false"
226- print_hash : " false"
227- verbose : " false"
235+
228236 release :
229- name : Add pip to release
237+ name : Add release artifacts
230238 if : github.repository == 'Eeems/python-ext4' && github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
231239 needs : *release-needs
232240 runs-on : ubuntu-latest
@@ -235,19 +243,13 @@ jobs:
235243 steps :
236244 - name : Checkout the Git repository
237245 uses : actions/checkout@v6
238- - name : Download pip packages
246+ - name : Download artifact
239247 id : download
240248 uses : actions/download-artifact@v8
241249 with :
242250 pattern : pip-*
243251 merge-multiple : true
244- path : artifacts
245- - name : Download pip packages
246- uses : actions/download-artifact@v8
247- with :
248- pattern : test.ext4
249- merge-multiple : true
250- path : artifacts
252+ path : dist
251253 - name : Upload to release
252254 run : find . -type f | xargs -rI {} gh release upload "$TAG" {} --clobber
253255 env :
0 commit comments