2222 # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
2323 NPROC : 4
2424 DEVELOPER_BUILD : ${{ github.event.inputs.developer_build || 'ON' }}
25- GCE_CLI_GHA_VERSION : ' 416.0.0' # Fixed to avoid dependency on API changes
2625
2726jobs :
2827 MacOS :
@@ -104,11 +103,12 @@ jobs:
104103 - name : Build Open3D viewer app
105104 if : ${{ env.BUILD_SHARED_LIBS == 'OFF' }}
106105 run : |
106+ OPEN3D_VERSION_FULL="$(grep -F OPEN3D_VERSION_FULL build/CMakeCache.txt | cut -f2 -d'=')"
107107 PATH=/usr/local/var/homebrew/linked/ccache/libexec:$PATH
108108 pushd build
109109 make -j${NPROC} Open3DViewer
110110 pushd bin
111- zip -rv open3d-app-macosx-10_15-${{ runner.arch}}.zip Open3D.app
111+ zip -rv " open3d-${OPEN3D_VERSION_FULL}- app-macosx-10_15-${{ runner.arch }}.zip" Open3D.app
112112 ccache -s
113113
114114 - name : Upload package
@@ -119,38 +119,29 @@ jobs:
119119 path : build/package/${{ env.DEVEL_PKG_NAME }}
120120 if-no-files-found : error
121121
122- - name : GCloud CLI auth
123- if : ${{ github.ref == 'refs/heads/main' && env.BUILD_SHARED_LIBS == 'ON' }}
124- uses : ' google-github-actions/auth@v2'
125- with :
126- project_id : ${{ secrets.GCE_PROJECT }}
127- credentials_json : ' ${{ secrets.GCE_SA_KEY_GPU_CI }}'
128- - name : GCloud CLI setup
129- if : ${{ github.ref == 'refs/heads/main' && env.BUILD_SHARED_LIBS == 'ON' }}
130- uses : google-github-actions/setup-gcloud@v2
131- with :
132- version : ${{ env.GCE_CLI_GHA_VERSION }}
133- project_id : ${{ secrets.GCE_PROJECT }}
134-
135- - name : Upload package to GCS bucket
122+ - name : Update package devel release
136123 if : ${{ github.ref == 'refs/heads/main' && env.BUILD_SHARED_LIBS == 'ON' }}
124+ env :
125+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
137126 run : |
138- gsutil cp build/package/${{ env.DEVEL_PKG_NAME }} gs://open3d-releases/devel/
139- echo "Download devel package at: https://storage.googleapis.com/open3d-releases/ devel/${{ env.DEVEL_PKG_NAME }}"
127+ gh release upload main-devel build/package/${{ env.DEVEL_PKG_NAME }} --clobber
128+ gh release view main- devel
140129
141130 - name : Upload Open3D viewer app
142131 uses : actions/upload-artifact@v4
143132 if : ${{ env.BUILD_SHARED_LIBS == 'OFF' }}
144133 with :
145134 name : open3d-app-macosx-10_15-${{ runner.arch}}
146- path : build/bin/open3d-app-macosx-10_15-${{ runner.arch}}.zip
135+ path : build/bin/open3d-*- app-macosx-10_15-${{ runner.arch }}.zip
147136 if-no-files-found : error
148137
149138 fuse-viewer :
150139 name : Fuse x64 and ARM64 viewer app
151140 runs-on : [macos-12]
152141 needs : [MacOS]
153142 steps :
143+ - name : Checkout source code # for gh release upload
144+ uses : actions/checkout@v4
154145 - name : Download viewer apps
155146 uses : actions/download-artifact@v4
156147 with :
@@ -159,22 +150,35 @@ jobs:
159150
160151 - name : Fuse x64 and arm64 viewer apps
161152 run : |
162- unzip open3d-app-macosx-10_15-X64.zip -d x64
163- unzip open3d-app-macosx-10_15-ARM64.zip -d arm64
153+ unzip open3d-*-app-macosx-10_15-X64.zip -d x64
154+ unzip open3d-*-app-macosx-10_15-ARM64.zip -d arm64
155+ APP_NAME=$(ls open3d-*-app-macosx-10_15-X64.zip)
156+ APP_NAME=${APP_NAME/-X64/-universal2} # includes version
164157 for i in arm64/Open3D.app/Contents/MacOS/*; do
165158 filepath=Open3D.app/Contents/MacOS/$(basename $i)
166159 lipo -create arm64/${filepath} x64/${filepath} -output arm64/${filepath}
167160 done
168161 mv arm64/Open3D.app Open3D.app
169- zip -rv open3d-app-macosx-10_15-universal2.zip Open3D.app
162+ zip -rv "${APP_NAME}" Open3D.app
170163
171164 - name : Upload Open3D viewer app
172165 uses : actions/upload-artifact@v4
173166 with :
174167 name : open3d-app-macosx-10_15-universal2
175- path : open3d-app-macosx-10_15-universal2.zip
168+ path : open3d-*- app-macosx-10_15-universal2.zip
176169 if-no-files-found : error
177170
171+ - name : Checkout source code
172+ uses : actions/checkout@v4
173+ - name : Update viewer devel release
174+ if : ${{ github.ref == 'refs/heads/main' }}
175+ env :
176+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
177+ run : |
178+ gh release upload main-devel open3d-*-app-macosx-10_15-universal2.zip --clobber
179+ gh release view main-devel
180+
181+
178182 build-wheel :
179183 name : Build wheel
180184 runs-on : ${{ matrix.os }}
@@ -282,28 +286,6 @@ jobs:
282286 path : build/lib/python_package/pip_package/${{ env.PIP_PKG_NAME }}
283287 if-no-files-found : error
284288
285- - name : GCloud CLI auth
286- if : ${{ github.ref == 'refs/heads/main' }}
287- uses : ' google-github-actions/auth@v2'
288- with :
289- project_id : ${{ secrets.GCE_PROJECT }}
290- credentials_json : ' ${{ secrets.GCE_SA_KEY_GPU_CI }}'
291- - name : GCloud CLI setup
292- if : ${{ github.ref == 'refs/heads/main' }}
293- uses : google-github-actions/setup-gcloud@v2
294- with :
295- version : ${{ env.GCE_CLI_GHA_VERSION }}
296- project_id : ${{ secrets.GCE_PROJECT }}
297-
298- - name : Upload wheel to GCS bucket
299- if : ${{ github.ref == 'refs/heads/main' }}
300- env :
301- python_version : ${{ matrix.python_version }}
302- run : |
303- PYTAG="-cp$(echo ${{ env.python_version }} | tr -d '.')"
304- gsutil cp build/lib/python_package/pip_package/${{ env.PIP_PKG_NAME }} gs://open3d-releases/python-wheels/
305- echo "Download pip package at: https://storage.googleapis.com/open3d-releases/python-wheels/${{ env.PIP_PKG_NAME }}"
306-
307289 fuse-wheel :
308290 name : Fuse universal2 wheel
309291 runs-on : [macos-12]
@@ -319,66 +301,56 @@ jobs:
319301 - is_main : false
320302 python_version : ' 3.10'
321303 steps :
304+ - name : Checkout source code # for gh release upload
305+ uses : actions/checkout@v4
322306 - name : Set up Python
323307 uses : actions/setup-python@v5
324308 with :
325309 python-version : ${{ matrix.python_version }}
310+
326311 - name : Download X64 wheels
327312 uses : actions/download-artifact@v4
328313 with :
329314 pattern : open3d-*macosx*_x86_64.whl
330315 path : x64_wheels
331316 merge-multiple : true
317+
332318 - name : Download ARM64 wheels
333319 uses : actions/download-artifact@v4
334320 with :
335321 pattern : open3d-*macosx*_arm64.whl
336322 path : arm64_wheels
337323 merge-multiple : true
324+
338325 - name : Fuse x64 and ARM64 wheels
339326 env :
340327 python_version : ${{ matrix.python_version }}
341328 run : |
342329 PYTAG="-cp$(echo ${{ env.python_version }} | tr -d '.')"
343330 mkdir universal_wheels
344-
345331 pip install delocate
346332 delocate-fuse -v x64_wheels/open3d-*${PYTAG}*.whl arm64_wheels/open3d-*${PYTAG}*.whl
347-
348333 # Normalize file name as delocate-fuse doesn't update it
349334 OLD_WHL_NAME=$(basename x64_wheels/open3d-*${PYTAG}*.whl)
350335 NEW_WHL_NAME=${OLD_WHL_NAME/x86_64/universal2}
351336 mv x64_wheels/${OLD_WHL_NAME} universal_wheels/${NEW_WHL_NAME}
352-
353337 echo "PIP_PKG_NAME=$NEW_WHL_NAME" >> $GITHUB_ENV
338+
354339 - name : Upload merged wheels
355340 uses : actions/upload-artifact@v4
356341 with :
357342 name : ${{ env.PIP_PKG_NAME }}
358343 path : universal_wheels/${{ env.PIP_PKG_NAME }}
359344 if-no-files-found : error
360345
361- - name : GCloud CLI auth
362- if : ${{ github.ref == 'refs/heads/main' }}
363- uses : ' google-github-actions/auth@v2'
364- with :
365- project_id : ${{ secrets.GCE_PROJECT }}
366- credentials_json : ' ${{ secrets.GCE_SA_KEY_GPU_CI }}'
367- - name : GCloud CLI setup
368- if : ${{ github.ref == 'refs/heads/main' }}
369- uses : google-github-actions/setup-gcloud@v2
370- with :
371- version : ${{ env.GCE_CLI_GHA_VERSION }}
372- project_id : ${{ secrets.GCE_PROJECT }}
373-
374- - name : Upload wheel to GCS bucket
346+ - name : Update devel release
375347 if : ${{ github.ref == 'refs/heads/main' }}
376348 env :
377- python_version : ${{ matrix.python_version }}
349+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
378350 run : |
379- gsutil cp universal_wheels/${{ env.PIP_PKG_NAME }} gs://open3d-releases/python-wheels/
380- echo "Download pip package at: https://storage.googleapis.com/open3d-releases/python-wheels/${{ env.PIP_PKG_NAME }}"
381-
351+ gh release upload main-devel universal_wheels/${{ env.PIP_PKG_NAME }} --clobber
352+ gh release view main-devel
353+
382354 test-wheel :
383355 name : Test wheel
384356 runs-on : ${{ matrix.os }}
@@ -432,45 +404,8 @@ jobs:
432404 pi_tag=$(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')")
433405 test_wheel open3d*-"$pi_tag"-*_$(uname -m).whl
434406
435- - name : Run Python unit tests (benchmarks)
407+ - name : Run Python unit tests
436408 run : |
437409 source util/ci_utils.sh
438410 echo "Running Open3D python tests..."
439411 run_python_tests
440-
441- ready-docs :
442- name : Ready docs archive
443- # no need to run on macOS
444- runs-on : ubuntu-latest
445- if : ${{ github.ref == 'refs/heads/main' }}
446- needs : [fuse-wheel, MacOS]
447- steps :
448- - name : GCloud CLI auth
449- uses : ' google-github-actions/auth@v2'
450- with :
451- project_id : ${{ secrets.GCE_PROJECT }}
452- credentials_json : ' ${{ secrets.GCE_SA_KEY_GPU_CI }}'
453- - name : GCloud CLI setup
454- uses : google-github-actions/setup-gcloud@v2
455- with :
456- version : ${{ env.GCE_CLI_GHA_VERSION }}
457- project_id : ${{ secrets.GCE_PROJECT }}
458- - name : Check wheels and ready documentation archive
459- run : |
460- touch marker_file
461- gsutil cp marker_file gs://open3d-docs/${{ github.sha }}_ready_macos
462- if [ $(gsutil ls gs://open3d-docs/${{ github.sha }}_ready* | wc -l)\
463- -eq 4 ]; then
464- echo "All wheels and docs available. Making docs ready."
465- # Remove all marker files: Note _ at end of pattern.
466- gsutil rm gs://open3d-docs/${{ github.sha }}_ready_*
467- # Rename docs archive:
468- gsutil mv gs://open3d-docs/${{ github.sha }}_ready.tar.gz \
469- gs://open3d-docs/${{ github.sha }}.tar.gz
470- # Set holds on new artifacts, release on old
471- gsutil retention temp release gs://open3d-releases/*
472- gsutil retention temp set gs://open3d-releases/python-wheels/*${GITHUB_SHA:0:7}*.whl
473- gsutil retention temp set gs://open3d-releases/devel/*${GITHUB_SHA:0:7}*
474- else
475- echo "All wheels / docs not available yet. Docs not ready."
476- fi
0 commit comments