diff --git a/.github/workflows/manual_adhoc_web.yml b/.github/workflows/manual_adhoc_web.yml index 977e79fee043..b0d8a6e9d939 100644 --- a/.github/workflows/manual_adhoc_web.yml +++ b/.github/workflows/manual_adhoc_web.yml @@ -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 diff --git a/.github/workflows/reusable_build_web.yml b/.github/workflows/reusable_build_web.yml index 3b0eaed4b3b3..21b085356689 100644 --- a/.github/workflows/reusable_build_web.yml +++ b/.github/workflows/reusable_build_web.yml @@ -10,6 +10,10 @@ on: required: false type: string default: 'prerelease' + EXTRA_FLAGS: + required: false + type: string + default: '' concurrency: group: ${{ inputs.CONCURRENCY }}-build-web @@ -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 diff --git a/.github/workflows/reusable_upload_web.yml b/.github/workflows/reusable_upload_web.yml index f634e2051d40..41bcd4896d11 100644 --- a/.github/workflows/reusable_upload_web.yml +++ b/.github/workflows/reusable_upload_web.yml @@ -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 @@ -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