Skip to content

Commit

Permalink
Add ability to manually run a web build to upload to an adhoc name (#…
Browse files Browse the repository at this point in the history
…1966)

* Add ability to manually run a web build to upload to an adhoc name

* Pass through ADHOC_NAME

* Add a concurrency criteria for the new adhoc job

* Make input description more explicit
  • Loading branch information
jleibs authored Apr 26, 2023
1 parent 174f3ff commit d6be388
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 8 deletions.
48 changes: 41 additions & 7 deletions .github/workflows/manual_adhoc_web.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,48 @@
name: Run on adhoc web build
name: Run an adhoc web build

on:
workflow_dispatch:
inputs:
EXTRA_FLAGS:
type: string
description: 'Extra flags to pass to `re_build_web_viewer`'
required: false
default: ''
ADHOC_NAME:
type: string
description: 'Name of the stored adhoc build'
required: true

jobs:

run-adhoc-web:
runs-on: ubuntu-latest
steps:
- name: Adhoc web
run: |
echo "TODO(jleibs): Run adhoc web"
min-test-wheel:
name: 'Minimum Test Wheel'
# The upload-web job uses the min-test-wheel to get the RRD
uses: ./.github/workflows/reusable_build_and_test_wheels.yml
with:
CONCURRENCY: adhoc-web-${{ github.event.inputs.ADHOC_NAME }}
PLATFORM: linux
MATURIN_FEATURE_FLAGS: '--no-default-features --features extension-module'
WHEEL_ARTIFACT_NAME: ''
RRD_ARTIFACT_NAME: linux-rrd-fast
secrets: inherit

build-web-adhoc:
name: 'Build Web'
uses: ./.github/workflows/reusable_build_web.yml
with:
CONCURRENCY: adhoc-web-${{ github.event.inputs.ADHOC_NAME }}
EXTRA_FLAGS: ${{ github.event.inputs.EXTRA_FLAGS }}
secrets: inherit

upload-web:
name: 'Upload Web'
needs: [min-test-wheel, build-web-adhoc]
uses: ./.github/workflows/reusable_upload_web.yml
with:
CONCURRENCY: adhoc-web-${{ github.event.inputs.ADHOC_NAME }}
MARK_PRERELEASE_FOR_MAINLINE: false
MARK_TAGGED_VERSION: false
ADHOC_NAME: ${{ github.event.inputs.ADHOC_NAME }}
RRD_ARTIFACT_NAME: linux-rrd-fast
secrets: inherit
6 changes: 5 additions & 1 deletion .github/workflows/reusable_build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
required: false
type: string
default: 'prerelease'
EXTRA_FLAGS:
required: false
type: string
default: ''

concurrency:
group: ${{ inputs.CONCURRENCY }}-build-web
Expand Down Expand Up @@ -81,7 +85,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: run
args: --locked -p re_build_web_viewer -- --release
args: --locked -p re_build_web_viewer -- --release ${{ inputs.EXTRA_FLAGS }}

- name: Upload web assets
uses: actions/upload-artifact@v3
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/reusable_upload_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
CONCURRENCY:
required: true
type: string
ADHOC_NAME:
type: string
required: false
default: ''
MARK_PRERELEASE_FOR_MAINLINE:
required: false
type: boolean
Expand Down Expand Up @@ -121,3 +125,19 @@ jobs:
path: "rrd"
destination: "rerun-example-rrd/version/${{inputs.RELEASE_VERSION}}"
parent: false

- name: "Upload web-viewer (adhoc)"
if: ${{ inputs.ADHOC_NAME != '' }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_viewer"
destination: "rerun-web-viewer/adhoc/${{inputs.ADHOC_NAME}}"
parent: false

- name: "Upload RRD (adhoc)"
if: ${{ inputs.ADHOC_NAME != '' }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "rrd"
destination: "rerun-example-rrd/adhoc/${{inputs.ADHOC_NAME}}"
parent: false

0 comments on commit d6be388

Please sign in to comment.