Skip to content

Commit

Permalink
Fix manual release/dispatch workflows (#2230)
Browse files Browse the repository at this point in the history
<!--
Open the PR up as a draft until you feel it is ready for a proper
review.

Do not make PR:s from your own `main` branch, as that makes it difficult
for reviewers to add their own fixes.

Add any improvements to the branch as new commits to make it easier for
reviewers to follow the progress. All commits will be squashed to a
single commit once the PR is merged into `main`.

Make sure you mention any issues that this PR closes in the description,
as well as any other related issues.

To get an auto-generated PR description you can put "copilot:summary" or
"copilot:walkthrough" anywhere.
-->

### What

- `manual_build_release` now includes
`reusable_build_web_demo`/`reusable_upload_web_demo`
- `manual_release` now uploads the the commit from
`rerun-demo/commit/<commit>` to `/version/latest`
- bandaid for breaking `manual_dispatch`: changed `BUILD_WEB` input in
`manual_dispatch` to accept a string instead of a bool (example values:
`app`, `demo`, `app,demo`), and removed `BUILD_WEB_DEMO`
- without this the number of inputs exceeds 10 and the workflow is
invalid and cannot be used
- bandaid to ensure `adhoc_web` will not overwrite the latest commit
build: added `UPLOAD_COMMIT` input to `upload_web` and `upload_web_demo`
which is on by default, and set it to false in `manual_adhoc_web`

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [ ] I've included a screenshot or gif (if applicable)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2230
  • Loading branch information
jprochazk authored and emilk committed Jun 15, 2023
1 parent 44db91e commit 47fdfc1
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/manual_adhoc_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
MARK_TAGGED_VERSION: false
ADHOC_NAME: ${{ github.event.inputs.ADHOC_NAME }}
RRD_ARTIFACT_NAME: linux-rrd-fast
UPLOAD_COMMIT: false
secrets: inherit

build-web-demo-adhoc:
Expand All @@ -65,4 +66,5 @@ jobs:
MARK_PRERELEASE_FOR_MAINLINE: false
MARK_TAGGED_VERSION: false
ADHOC_NAME: ${{ github.event.inputs.ADHOC_NAME }}
UPLOAD_COMMIT: false
secrets: inherit
20 changes: 20 additions & 0 deletions .github/workflows/manual_build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,26 @@ jobs:
RRD_ARTIFACT_NAME: linux-rrd
RELEASE_VERSION: ${{ github.event.inputs.RELEASE_VERSION }}
secrets: inherit

build-web-demo:
name: 'Build Web Demo'
needs: [build-linux, build-web]
uses: ./.github/workflows/reusable_build_web_demo.yml
with:
CONCURRENCY: manual-dispatch-${{ github.run_id}}
WHEEL_ARTIFACT_NAME: linux-wheel
secrets: inherit

upload-web-demo:
name: 'Upload Web'
needs: [build-web-demo]
uses: ./.github/workflows/reusable_upload_web_demo.yml
with:
CONCURRENCY: manual-dispatch-${{ github.run_id}}
MARK_PRERELEASE_FOR_MAINLINE: false
MARK_TAGGED_VERSION: true
RELEASE_VERSION: ${{ github.event.inputs.RELEASE_VERSION }}
secrets: inherit

generate-wheel-index:
name: 'Generate Pip Index'
Expand Down
20 changes: 7 additions & 13 deletions .github/workflows/manual_dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,10 @@ on:
default: 'linux'

BUILD_WEB:
description: 'Run reusable_build_web'
type: boolean
required: false
default: true

BUILD_WEB_DEMO:
description: 'Run reusable_build_web'
type: boolean
description: 'Run reusable_build_web/reusable_build_web_demo (Full build: app,demo)'
type: string
required: false
default: true
default: 'app,demo'

RELEASE_VERSION:
description: 'Release Version Number (Must match Cargo.toml)'
Expand Down Expand Up @@ -218,7 +212,7 @@ jobs:

build-web:
name: 'Build Web'
if: ${{ github.event.inputs.BUILD_WEB == 'true'}}
if: ${{ contains(github.event.inputs.BUILD_WEB, 'app') }}
uses: ./.github/workflows/reusable_build_web.yml
with:
CONCURRENCY: manual-dispatch-${{ github.run_id}}
Expand All @@ -228,7 +222,7 @@ jobs:
upload-web:
name: 'Upload Web'
needs: [min-test-wheel, build-web]
if: ${{ (github.event.inputs.BUILD_WEB == 'true') && (github.event.inputs.UPLOAD_GCLOUD == 'true') }}
if: ${{ contains(github.event.inputs.BUILD_WEB, 'app') && (github.event.inputs.UPLOAD_GCLOUD == 'true') }}
uses: ./.github/workflows/reusable_upload_web.yml
with:
CONCURRENCY: manual-dispatch-${{ github.run_id}}
Expand All @@ -240,7 +234,7 @@ jobs:
build-web-demo:
name: 'Build Web Demo'
needs: [min-test-wheel, build-web]
if: ${{ github.event.inputs.BUILD_WEB_DEMO == 'true'}}
if: ${{ contains(github.event.inputs.BUILD_WEB, 'demo') }}
uses: ./.github/workflows/reusable_build_web_demo.yml
with:
CONCURRENCY: manual-dispatch-${{ github.run_id}}
Expand All @@ -250,7 +244,7 @@ jobs:
upload-web-demo:
name: 'Upload Web Demo'
needs: [build-web-demo]
if: ${{ (github.event.inputs.BUILD_WEB_DEMO == 'true') && (github.event.inputs.UPLOAD_GCLOUD == 'true') }}
if: ${{ contains(github.event.inputs.BUILD_WEB, 'demo') && (github.event.inputs.UPLOAD_GCLOUD == 'true') }}
uses: ./.github/workflows/reusable_upload_web_demo.yml
with:
CONCURRENCY: manual-dispatch-${{ github.run_id}}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/manual_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,8 @@ jobs:
generateReleaseNotes: true
allowUpdates: true
draft: true

- name: Release Web Demo
run: |
gsutil -m cp -r "gs://rerun-demo/commit/${{ env.SHORT_SHA }}/*" "gs://rerun-demo/version/latest/"
2 changes: 1 addition & 1 deletion .github/workflows/on_push_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
secrets: inherit

upload-web-demo:
name: 'Upload Web'
name: 'Upload Web Demo'
needs: [build-web-demo]
uses: ./.github/workflows/reusable_upload_web_demo.yml
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/reusable_upload_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ on:
required: false
type: string
default: ''
UPLOAD_COMMIT:
required: false
type: boolean
default: true

concurrency:
group: ${{ inputs.CONCURRENCY }}-upload-web
Expand Down Expand Up @@ -80,13 +84,15 @@ jobs:
echo "SHORT_SHA=$(echo $USED_SHA | cut -c1-7)" >> $GITHUB_ENV
- name: "Upload web-viewer (commit)"
if: ${{ inputs.UPLOAD_COMMIT }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_viewer"
destination: "rerun-web-viewer/commit/${{env.SHORT_SHA}}"
parent: false

- name: "Upload RRD (commit)"
if: ${{ inputs.UPLOAD_COMMIT }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "rrd"
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/reusable_upload_web_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ on:
required: false
type: string
default: ''
UPLOAD_COMMIT:
required: false
type: boolean
default: true

concurrency:
group: ${{ inputs.CONCURRENCY }}-upload-web-demo
Expand Down Expand Up @@ -69,6 +73,7 @@ jobs:
echo "SHORT_SHA=$(echo $USED_SHA | cut -c1-7)" >> $GITHUB_ENV
- name: "Upload web demo (commit)"
if: ${{ inputs.UPLOAD_COMMIT }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_demo"
Expand All @@ -90,14 +95,6 @@ jobs:
path: "web_demo"
destination: "rerun-demo/version/${{inputs.RELEASE_VERSION}}"
parent: false

- name: "Upload web demo (latest)"
if: inputs.MARK_TAGGED_VERSION
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_demo"
destination: "rerun-demo/version/latest"
parent: false

- name: "Upload web demo (adhoc)"
if: ${{ inputs.ADHOC_NAME != '' }}
Expand Down

0 comments on commit 47fdfc1

Please sign in to comment.