[VIDEO-3095] Facilitate removal of setup-gstreamer by splitting gstreamer action into pieces #115
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows | |
on: | |
push: | |
branches: ['*.*-lldc'] | |
tags: ['*.*.*-lldc*'] | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
cerbero-repo: | |
description: 'Cerbero repository to use (defaults to the current repository)' | |
required: false | |
cerbero-ref: | |
description: 'Cerbero ref to use (defaults to the current ref)' | |
required: false | |
runner: | |
description: 'Runner labels to use' | |
required: false | |
type: choice | |
options: | |
- '["floor-to-ceiling-windows-latest-runner"]' | |
- '["self-hosted", "Windows", "X64", "cerbero"]' | |
default: '["self-hosted", "Windows", "X64", "cerbero"]' | |
force-build: | |
description: 'Force the build' | |
required: false | |
type: boolean | |
default: false | |
no-cache: | |
description: 'Do not use cache when building' | |
required: false | |
type: boolean | |
default: false | |
jobs: | |
build: | |
name: Build GStreamer Windows - ${{ (contains(inputs.runner, 'self-hosted') || inputs.runner == '') && 'Self-hosted' || 'GitHub-hosted' }} | |
runs-on: ${{ fromJSON(inputs.runner || '["self-hosted", "Windows", "X64", "cerbero"]') }} | |
steps: | |
- name: Get GStreamer installer S3 prefix | |
id: s3-prefix | |
if: vars.GSTREAMER_S3_UPLOAD_PREFIX | |
shell: bash | |
run: | | |
prefix="${{ vars.GSTREAMER_S3_UPLOAD_PREFIX }}/${GITHUB_HEAD_REF:-${GITHUB_REF_NAME:-${GITHUB_REF##*/}}}" | |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
prefix="${prefix}-${{ github.run_number }}" | |
fi | |
echo "prefix=${prefix}" | tee -a $GITHUB_OUTPUT | |
- name: Configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.DEV_AWS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.DEV_AWS_KEY_SECRET }} | |
aws-region: 'us-east-1' | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
.github/actions/** | |
sparse-checkout-cone-mode: false | |
- id: setup-gstreamer | |
name: Setup GStreamer | |
uses: ./.github/actions/setup-gstreamer | |
with: | |
cerbero-repo: ${{ inputs.cerbero-repo || github.repository }} | |
cerbero-ref: ${{ inputs.cerbero-ref || github.ref }} | |
cerbero-args: --clocktime --timestamps -v visualstudio,noasserts,nochecks | |
gst-plugins-rs-repo: 'https://github.com/blinemedical/gst-plugins-rs' | |
gst-plugins-rs-ref: '0.12.11-lldc.1' | |
force: ${{ inputs.force-build == true }} | |
no-cache: ${{ inputs.no-cache == true }} | |
bootstrap-system: true | |
s3-download-paths: >- | |
${{ vars.GSTREAMER_S3_UPLOAD_BUCKET && vars.GSTREAMER_S3_UPLOAD_PREFIX && format('s3://{0}/{1}', vars.GSTREAMER_S3_UPLOAD_BUCKET, vars.GSTREAMER_S3_UPLOAD_PREFIX) || '' }} | |
${{ vars.GSTREAMER_S3_UPLOAD_BUCKET && steps.s3-prefix.outcome != 'skipped' && format('s3://{0}/{1}', vars.GSTREAMER_S3_UPLOAD_BUCKET, steps.s3-prefix.outputs.prefix) || '' }} | |
s3-upload-path: >- | |
${{ vars.GSTREAMER_S3_UPLOAD_BUCKET && vars.GSTREAMER_S3_UPLOAD_PREFIX && format('s3://{0}/{1}', vars.GSTREAMER_S3_UPLOAD_BUCKET, vars.GSTREAMER_S3_UPLOAD_PREFIX) || '' }} | |
- name: Annotate workflow run with GStreamer version | |
if: steps.setup-gstreamer.outputs.gstreamer-version | |
run: | | |
echo "::notice title=Built GStreamer version ${{ steps.build-gstreamer.outputs.gstreamer-version }}::Created installer with Cerbero short sha ${{ steps.build-gstreamer.outputs.cerbero-short-sha }}" |