3535 - name : Run style checks
3636 uses : j178/prek-action@6ad80277337ad479fe43bd70701c3f7f8aa74db3 # v2.0.3
3737
38+ editable_install :
39+ needs : [style]
40+ name : editable-install-smoke
41+ runs-on : ubuntu-latest
42+ permissions :
43+ contents : read
44+ steps :
45+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
46+ with :
47+ persist-credentials : false
48+ submodules : recursive
49+
50+ - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
51+ with :
52+ python-version : " 3.14"
53+
54+ - name : Set up Go toolchain
55+ id : setup-go
56+ uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
57+ with :
58+ go-version : " 1.26.1"
59+ cache : false
60+ check-latest : true
61+
62+ - name : Restore Hugo builder cache
63+ uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
64+ with :
65+ path : ~/.cache/hugo-go
66+ key : editable-install-hugo-${{ runner.os }}-${{ steps.setup-go.outputs.go-version }}
67+
68+ - name : Install Python dependencies
69+ run : python -m pip install nox[uv]
70+
71+ - name : Smoke test editable install entry points
72+ run : nox -s editable
73+
3874 build_wheels :
3975 needs : [style]
4076 name : ${{ matrix.runs-on }}-python-${{ matrix.python-version }}
79115 - name : Restore Hugo builder cache
80116 uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
81117 with :
82- path : ./hugo_cache/
118+ path : ~/.cache/hugo-go
83119 key : ${{ matrix.runs-on }}-hugo-${{ steps.setup-go.outputs.go-version }}
84120
85121 - name : Install Python dependencies
@@ -136,40 +172,41 @@ jobs:
136172 - name : Restore Hugo builder cache
137173 uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
138174 with :
139- path : ./hugo_cache/
175+ path : ~/.cache/hugo-go
140176 key : zig-${{ matrix.runs-on }}-${{ matrix.architecture}}-hugo-experimental-${{ steps.setup-go.outputs.go-version }}
141177
142178 - name : Install Python dependencies
143179 run : python -m pip install build virtualenv nox auditwheel
144180
145181 - name : Build binary distribution (wheel) on Linux
146182 if : matrix.runs-on == 'ubuntu-latest'
147- # Cross-compile for arm64 target via Zig toolchain
148- env :
149- USE_ZIG : 1
150- GOOS : linux
151- GOARCH : arm64
152- run : |
153- python -m build --wheel . --outdir wheelhouse/
183+ run : python -m build --wheel . --outdir wheelhouse -Csetup-args=--cross-file="$GITHUB_WORKSPACE/meson_cross_files/linux-arm64.ini"
154184 # can't repair arm64 wheels on Linux x86_64 right now
155185 # auditwheel repair --plat manylinux_2_28_aarch64 -w wheelhouse/ dist/*.whl
156186
187+ - name : Resolve Windows Meson cross file
188+ if : matrix.runs-on == 'windows-latest'
189+ id : meson-cross-file
190+ shell : pwsh
191+ env :
192+ MATRIX_ARCH : ${{ matrix.architecture }}
193+ run : |
194+ $crossFileName = if ($env:MATRIX_ARCH -eq 'arm64') { 'windows-arm64.ini' } else { 'windows-386.ini' }
195+ $crossFile = (Resolve-Path (Join-Path $env:GITHUB_WORKSPACE "meson_cross_files/$crossFileName")).Path -replace '\\', '/'
196+ "path=$crossFile" >> $env:GITHUB_OUTPUT
197+
157198 - name : Build binary distribution (wheel) on Windows (arm64)
158199 if : matrix.runs-on == 'windows-latest' && matrix.architecture == 'arm64'
159- # We need to use cibuildwheel because it has experimental support for cross-compiling
160- # to arm64 and setup-python does not have arm64 support on Windows right now
200+ # TODO: FIXME: use windows-11-arm runners as they're available now, and drop this
161201 uses : pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
162202 with :
163203 package-dir : .
164204 output-dir : wheelhouse
165- # Cross-compile for arm64 target via Zig toolchain
166205 env :
167- USE_ZIG : " 1"
168- GOOS : windows
169- GOARCH : arm64
170206 CIBW_BUILD : " cp312-*"
171207 CIBW_ARCHS_WINDOWS : ARM64
172208 CIBW_BEFORE_BUILD_WINDOWS : " pip install delvewheel"
209+ CIBW_CONFIG_SETTINGS_WINDOWS : " setup-args=--cross-file=${{ steps.meson-cross-file.outputs.path }}"
173210 CIBW_REPAIR_WHEEL_COMMAND_WINDOWS : delvewheel repair -w {dest_dir} {wheel}
174211 CIBW_TEST_SKIP : " *-win_arm64"
175212
@@ -181,14 +218,11 @@ jobs:
181218 with :
182219 package-dir : .
183220 output-dir : wheelhouse
184- # Cross-compile for i686 target via Zig toolchain
185221 env :
186- USE_ZIG : " 1"
187- GOOS : windows
188- GOARCH : 386
189222 CIBW_BUILD : " cp312-*"
190223 CIBW_ARCHS_WINDOWS : x86
191224 CIBW_BEFORE_BUILD_WINDOWS : " pip install delvewheel"
225+ CIBW_CONFIG_SETTINGS_WINDOWS : " setup-args=--cross-file=${{ steps.meson-cross-file.outputs.path }}"
192226 CIBW_REPAIR_WHEEL_COMMAND_WINDOWS : delvewheel repair -w {dest_dir} {wheel}
193227 CIBW_TEST_COMMAND : |
194228 hugo version
0 commit comments