3636 if : steps.cache.outputs.cache-hit != 'true'
3737 run : ./third_party/install_android.sh
3838 - name : Configure Bazel
39- run : LCE_SET_ANDROID_WORKSPACE=1 ANDROID_SDK_HOME="/tmp/lce_android" ANDROID_NDK_HOME="/tmp/lce_android/ndk/21.4.7075529" ./configure.py
39+ run : LCE_SET_ANDROID_WORKSPACE=1 ANDROID_SDK_HOME="/tmp/lce_android" ANDROID_API_LEVEL=30 ANDROID_NDK_HOME="/tmp/lce_android/ndk/25.2.9519653" ANDROID_NDK_API_LEVEL=30 ANDROID_BUILD_TOOLS_VERSION=31.0.0 ./configure.py
4040 shell : bash
4141 - run : mkdir benchmark-binaries
4242 - name : Build Benchmark utility for AArch64
@@ -108,7 +108,7 @@ jobs:
108108 if : steps.cache.outputs.cache-hit != 'true'
109109 run : ./third_party/install_android.sh
110110 - name : Configure Bazel
111- run : LCE_SET_ANDROID_WORKSPACE=1 ANDROID_SDK_HOME="/tmp/lce_android" ANDROID_NDK_HOME="/tmp/lce_android/ndk/21.4.7075529" ./configure.py
111+ run : LCE_SET_ANDROID_WORKSPACE=1 ANDROID_SDK_HOME="/tmp/lce_android" ANDROID_API_LEVEL=30 ANDROID_NDK_HOME="/tmp/lce_android/ndk/25.2.9519653" ANDROID_NDK_API_LEVEL=30 ANDROID_BUILD_TOOLS_VERSION=31.0.0 ./configure.py
112112 shell : bash
113113 - name : Build LCE AAR
114114 run : BUILDER=bazelisk ./larq_compute_engine/tflite/java/build_lce_aar.sh
@@ -134,10 +134,10 @@ jobs:
134134
135135 macos-release-wheel :
136136 name : Build release wheels for macOS
137- runs-on : macos-latest
137+ runs-on : macos-13
138138 strategy :
139139 matrix :
140- python-version : [3.9, "3.10", 3.11]
140+ python-version : ["3.10", 3.11]
141141 fail-fast : false
142142 steps :
143143 - uses : actions/checkout@v4
@@ -154,33 +154,35 @@ jobs:
154154 python -m pip install delocate wheel setuptools numpy six --no-cache-dir
155155
156156 ./configure.py
157- export MACOSX_DEPLOYMENT_TARGET=10.14
157+ # This matches `release_macox_x86` in .tensorflow.bazelrc
158+ export MACOSX_DEPLOYMENT_TARGET=10.15
158159
159160 if [[ -n $GOOGLE_APPLICATION_CREDENTIALS ]]; then
160- echo -e 'build --remote_http_cache =https://storage.googleapis.com/plumerai-bazel-cache/lce-release-macos-python${{ matrix.python-version }}' >> .bazelrc.user
161+ echo -e 'build --remote_cache =https://storage.googleapis.com/plumerai-bazel-cache/lce-release-macos-python${{ matrix.python-version }}' >> .bazelrc.user
161162 echo -e 'build --google_default_credentials' >> .bazelrc.user
162163 fi
163164
164- bazelisk build :build_pip_pkg --copt=-fvisibility=hidden --copt=-mavx --linkopt=-dead_strip --distinct_host_configuration=false
165- bazel-bin/build_pip_pkg artifacts --plat-name macosx_10_14_x86_64
165+ bazelisk build :build_pip_pkg --config=release_macos_x86 --config=release_cpu_macos --copt=-fvisibility=hidden --linkopt=-dead_strip
166+ bazel-bin/build_pip_pkg artifacts --plat-name macosx_10_15_x86_64
166167
167168 for f in artifacts/*.whl; do
168169 delocate-wheel -w wheelhouse $f
169170 done
170171 env :
171172 LCE_RELEASE_VERSION : ${{ github.event.inputs.version }}
173+ TF_PYTHON_VERSION : ${{ matrix.python-version }}
172174 shell : bash
173175 - uses : actions/upload-artifact@v4
174176 with :
175- name : ${{ runner.os }}-wheels
177+ name : ${{ runner.os }}-wheels-${{ matrix.python-version }}
176178 path : wheelhouse
177179
178180 macos-arm-release-wheel :
179181 name : Build release arm wheels for macOS
180- runs-on : macos-11
182+ runs-on : macos-14
181183 strategy :
182184 matrix :
183- python-version : [3.9, "3.10", 3.11]
185+ python-version : ["3.10", 3.11]
184186 fail-fast : false
185187 steps :
186188 - uses : actions/checkout@v4
@@ -197,33 +199,35 @@ jobs:
197199 python -m pip install delocate wheel setuptools numpy six --no-cache-dir
198200
199201 ./configure.py
200- export MACOSX_DEPLOYMENT_TARGET=11.0
202+ # This matches `release_macox_arm64` in .tensorflow.bazelrc
203+ export MACOSX_DEPLOYMENT_TARGET=12.0
201204
202205 if [[ -n $GOOGLE_APPLICATION_CREDENTIALS ]]; then
203- echo -e 'build --remote_http_cache =https://storage.googleapis.com/plumerai-bazel-cache/lce-release-macos-arm-python${{ matrix.python-version }}' >> .bazelrc.user
206+ echo -e 'build --remote_cache =https://storage.googleapis.com/plumerai-bazel-cache/lce-release-macos-arm-python${{ matrix.python-version }}' >> .bazelrc.user
204207 echo -e 'build --google_default_credentials' >> .bazelrc.user
205208 fi
206209
207- bazelisk build :build_pip_pkg --copt=-fvisibility=hidden --linkopt=-dead_strip --config=macos_arm64
208- bazel-bin/build_pip_pkg artifacts --plat-name macosx_11_0_arm64
210+ bazelisk build :build_pip_pkg --config=release_macos_arm64 -- copt=-fvisibility=hidden --linkopt=-dead_strip
211+ bazel-bin/build_pip_pkg artifacts --plat-name macosx_12_0_arm64
209212
210213 for f in artifacts/*.whl; do
211214 delocate-wheel -w wheelhouse $f
212215 done
213216 env :
214217 LCE_RELEASE_VERSION : ${{ github.event.inputs.version }}
218+ TF_PYTHON_VERSION : ${{ matrix.python-version }}
215219 shell : bash
216220 - uses : actions/upload-artifact@v4
217221 with :
218- name : ${{ runner.os }}-arm-wheels
222+ name : ${{ runner.os }}-arm-wheels-${{ matrix.python-version }}
219223 path : wheelhouse
220224
221225 manylinux-release-wheel :
222226 name : Build release wheels for manylinux2014
223227 runs-on : ubuntu-latest
224228 strategy :
225229 matrix :
226- python-version : [3.9, "3.10", 3.11]
230+ python-version : ["3.10", 3.11]
227231 fail-fast : false
228232 steps :
229233 - uses : actions/checkout@v4
@@ -237,15 +241,17 @@ jobs:
237241 - name : Build manylinux2014 wheels
238242 run : |
239243 if [[ -n $GOOGLE_APPLICATION_CREDENTIALS ]]; then
240- echo -e 'build --remote_http_cache =https://storage.googleapis.com/plumerai-bazel-cache/lce-release-manylinux-python${{ matrix.python-version }}' >> .bazelrc.user
244+ echo -e 'build --remote_cache =https://storage.googleapis.com/plumerai-bazel-cache/lce-release-manylinux-python${{ matrix.python-version }}' >> .bazelrc.user
241245 echo -e 'build --google_default_credentials' >> .bazelrc.user
242246 fi
243247
244248 docker run -e LCE_RELEASE_VERSION=${{ github.event.inputs.version }} \
245249 -e GOOGLE_APPLICATION_CREDENTIALS=/tmp/gcloud-credentials.json \
250+ -e TF_PYTHON_VERSION=${{ matrix.python-version }} \
246251 -v $GOOGLE_APPLICATION_CREDENTIALS:/tmp/gcloud-credentials.json:ro \
247252 -v ${PWD}:/compute-engine -w /compute-engine \
248- tensorflow/build:2.13-python${{ matrix.python-version }} \
253+ -v /mnt:/github_disk \
254+ tensorflow/build:2.16-python${{ matrix.python-version }} \
249255 .github/tools/release_linux.sh
250256
251257 sudo apt-get -y -qq install patchelf --no-install-recommends
@@ -258,15 +264,15 @@ jobs:
258264 ls -al wheelhouse/
259265 - uses : actions/upload-artifact@v4
260266 with :
261- name : ${{ runner.os }}-wheels
267+ name : ${{ runner.os }}-wheels-${{ matrix.python-version }}
262268 path : wheelhouse
263269
264270 windows-release-wheel :
265271 name : Build release wheels for Windows
266272 runs-on : windows-2019
267273 strategy :
268274 matrix :
269- python-version : [3.9, "3.10", 3.11]
275+ python-version : ["3.10", 3.11]
270276 fail-fast : false
271277 steps :
272278 - name : Configure Pagefile
@@ -294,18 +300,24 @@ jobs:
294300 $Env:CC_OPT_FLAGS = "/O2"
295301
296302 python --version
297- python -m pip install wheel setuptools numpy six --no-cache-dir
303+ python -m pip install wheel setuptools numpy six pip-tools --no-cache-dir
304+ # This is needed because the requirements on windows are different than on other systems
305+ pip-compile --strip-extras --no-emit-index-url --allow-unsafe larq_compute_engine/requirements.in
306+
307+ # Fix for path length limit: replace workspace name by 'lce'
308+ (Get-Content WORKSPACE).Replace('workspace(name = "larq_compute_engine")', 'workspace(name = "lce")') | Set-Content WORKSPACE
298309
299310 "" | python configure.py
300311
301- bazelisk --output_base=C:\build_output build :build_pip_pkg --enable_runfiles --local_ram_resources=4096 --remote_http_cache =https://storage.googleapis.com/plumerai-bazel-cache/lce-release-windows-python${{ matrix.python-version }} --google_default_credentials
312+ bazelisk --output_base=C:\bzl build :build_pip_pkg --enable_runfiles --local_ram_resources=4096 --remote_cache =https://storage.googleapis.com/plumerai-bazel-cache/lce-release-windows-python${{ matrix.python-version }} --google_default_credentials
302313 bazel-bin/build_pip_pkg wheelhouse
303314 env :
304315 LCE_RELEASE_VERSION : ${{ github.event.inputs.version }}
316+ TF_PYTHON_VERSION : ${{ matrix.python-version }}
305317 shell : pwsh
306318 - uses : actions/upload-artifact@v4
307319 with :
308- name : ${{ runner.os }}-wheels
320+ name : ${{ runner.os }}-wheels-${{ matrix.python-version }}
309321 path : wheelhouse
310322
311323 upload-wheels :
@@ -322,31 +334,11 @@ jobs:
322334 steps :
323335 - uses : actions/download-artifact@v4
324336 with :
325- name : Linux-wheels
326- path : Linux-wheels
327- if : ${{ needs.manylinux-release-wheel.result == 'success' }}
328- - uses : actions/download-artifact@v4
329- with :
330- name : macOS-wheels
331- path : macOS-wheels
332- if : ${{ needs.macos-release-wheel.result == 'success' }}
333- - uses : actions/download-artifact@v4
334- with :
335- name : macOS-arm-wheels
336- path : macOS-arm-wheels
337- if : ${{ needs.macos-arm-release-wheel.result == 'success' }}
338- - uses : actions/download-artifact@v4
339- with :
340- name : Windows-wheels
341- path : Windows-wheels
342- if : ${{ needs.windows-release-wheel.result == 'success' }}
337+ pattern : " *wheels*"
338+ path : dist
339+ merge-multiple : true
343340 - run : |
344341 set -x
345- mkdir -p dist
346- cp Linux-wheels/*.whl dist/ || true
347- cp macOS-wheels/*.whl dist/ || true
348- cp macOS-arm-wheels/*.whl dist/ || true
349- cp Windows-wheels/*.whl dist/ || true
350342 ls -la dist/
351343 sha256sum dist/*.whl
352344 - uses : pypa/gh-action-pypi-publish@master
0 commit comments