Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/isl-org/Open3D into realsense
Browse files Browse the repository at this point in the history
  • Loading branch information
ssheorey committed Jun 6, 2024
2 parents 5987980 + 525c4e6 commit b5107c4
Show file tree
Hide file tree
Showing 76 changed files with 1,609 additions and 779 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/clean-gcloud-profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@
# happens, run this workflow manually to clean up the login profiles.

name: Clean GCloud Profiles
permissions:
contents: read

on:
workflow_dispatch:
# push:
# branches:
# - main
# pull_request:
# types: [opened, reopened, synchronize]

env:
GCE_GPU_CI_SA: ${{ secrets.GCE_GPU_CI_SA }}
Expand Down
83 changes: 40 additions & 43 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Documentation
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand All @@ -17,9 +20,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
GCE_CLI_GHA_VERSION: '416.0.0' # Fixed to avoid dependency on API changes

jobs:
headless-docs:
# Build headless and docs
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.11'

- name: Install dependencies
env:
Expand Down Expand Up @@ -87,46 +87,43 @@ jobs:
path: docs/_out/html
if-no-files-found: error

- name: GCloud CLI auth
if: ${{ github.ref == 'refs/heads/main' }}
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GCE_PROJECT }}
credentials_json: '${{ secrets.GCE_SA_KEY_GPU_CI }}'
- name: GCloud CLI setup
if: ${{ github.ref == 'refs/heads/main' }}
uses: google-github-actions/setup-gcloud@v2
with:
version: ${{ env.GCE_CLI_GHA_VERSION }}
project_id: ${{ secrets.GCE_PROJECT }}

- name: Deploy docs
- name: Deploy docs if all artifacts available
if: ${{ github.ref == 'refs/heads/main' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
# Compress and upload the docs, only for main branch
docs_out_dir="docs/_out" # Docs in ${docs_out_dir}/html
tar_file="${{ github.sha }}_ready.tar.gz"
tar_file="open3d-${GITHUB_SHA}-docs.tar.gz"
rm -rf ${tar_file}
tar -C ${docs_out_dir} -czvf ${tar_file} html
gsutil cp ${tar_file} gs://open3d-docs/${tar_file}
echo "Docs archive uploaded to:"
echo "https://storage.googleapis.com/open3d-docs/${tar_file}"
# Docs in docs/_out/html
tar -C docs/_out -cvzf ${tar_file} html
- name: Check wheels and ready documentation archive
if: ${{ github.ref == 'refs/heads/main' }}
run: |
if [ $(gsutil ls gs://open3d-docs/${{ github.sha }}_ready* | wc -l)\
-eq 4 ]; then
echo "All wheels and docs available. Making docs ready."
# Remove all marker files: Note _ at end of pattern.
gsutil rm gs://open3d-docs/${{ github.sha }}_ready_*
# Rename docs archive:
gsutil mv gs://open3d-docs/${{ github.sha }}_ready.tar.gz \
gs://open3d-docs/${{ github.sha }}.tar.gz
# Set holds on new artifacts, release on old
gsutil retention temp release gs://open3d-releases/*
gsutil retention temp set gs://open3d-releases/python-wheels/*${GITHUB_SHA:0:7}*.whl
gsutil retention temp set gs://open3d-releases/devel/*${GITHUB_SHA:0:7}*
else
echo "All wheels / docs not available yet."
fi
echo "Waiting for other release assets..."
this_sha=$(echo ${GITHUB_SHA} | cut -c 1-6)
n_this_sha_assets=$(gh release view main-devel --json assets --jq ".assets | map(select(.name | contains(\"${this_sha}\"))) | length")
# Total assets from each main branch commmit:
# Python wheels (4x4) + Viewer (3) + C++ libs (4+2+2) = 27,
while ((n_this_sha_assets < 27)); do
sleep 60
echo -n "."
n_this_sha_assets=$(gh release view main-devel --json assets --jq ".assets | map(select(.name | contains(\"${this_sha}\"))) | length")
done
gh release upload main-devel ${tar_file} --clobber
gh release view main-devel
echo "\nAll assets ready. Removing release assets except from last 3 commits: ${last_shas[@]}"
release_assets=($(gh release view main-devel --json assets --jq '.assets[] | .name'))
last_shas=($(git log --pretty=format:%h --abbrev-commit -n 3))
for relass in "${release_assets[@]}"; do
found=false
for last_sha in "${last_shas[@]}"; do
if [[ $relass == *${last_sha}* ]]; then
found=true
fi
done
if [ $found == false ]; then
set -x
gh release delete-asset main-devel $relass
set +x
fi
done
gh release view main-devel
Loading

0 comments on commit b5107c4

Please sign in to comment.