Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 the build'
jleibs marked this conversation as resolved.
Show resolved Hide resolved
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