Skip to content

Commit

Permalink
[VIDEO-2683] - Build Windows GST from source (#164)
Browse files Browse the repository at this point in the history
* [VIDEO-2683] - Modified the action script to build gstreamer for windows from source. TODO: Add caching lookup and store

* [VIDEO-2683] - Re-enabled libav after local testing ensured it worked and did not interfere with libsoup build and install

* [VIDEO-2683] - Ran npm prepare

* [VIDEO-2683] - Fixed action input syntax and usage to conform to string only input variables

* [VIDEO-2683] - Updated test workflow to install Meson and Ninja for windows builds

* [VIDEO-2683] - Fixed usage of pathing for cwd option in windows builds

* [VIDEO-2683] - Updated test workflow to make sure all needed python dependencies for the gstreamer build on Windows are present

* [VIDEO-2683] - Fixed up syntax erro in shell command

* [VIDEO-2683]
 - Added missing input environment variable for windows to unit tests

* [VIDEO-2683] - Fixed and added environment variables in support of functional testing

* [VIDEO-2683] - Updated dist

* [VIDEO-2683] - Reran prepare to fix apparent issue with dist

* [VIDEO-2683] - Added buildSource option so that Windows can alternatively install from binary packages or build from source. Fixed up yaml auto formatting back to original. Reverted unit tests to only do binaries. Added matrix options for build from source and excluded the invalid options

* [VIDEO-2683] - Reran prepare to fix up after merge conflicts on rebase from commit

* [VIDEO-2683] - Further clean up

* [VIDEO-2683] - Reran prepare - apparently Node 18 prepare produces results that fail the dist check in GH

* [VIDEO-2683] - Added buildSource option to test options from matrix

* [VIDEO-2683] - Added returns to break processing if conditions merit failing the action

* [VIDEO-2386] - Fixed copy pasta for source directorypath that would have tried to clone to the install directory if the environment variable was set

* [VIDEO-2683] - Update action.yml per suggestion

Co-authored-by: Jeff Wilson <[email protected]>

* [VIDEO-2683] - Updated build options handling and source build flag option per suggestions from PR

* [VIDEO-2683] - Ran the forgotten npm prepare

* [VIDEO-2683] - Updated environment variable name to match change in option name

* [VIDEO0-2683] - Updated option mapping on test matrix for forceBuildFromSource option

* [VIDEO-2683] - Updated handling of the multiline input for build arguments based on review of yaml safeload and github actions docs

* [VIDEO-2683] - Minor changes for debugging failing test of windows build from source

* [VIDEO-2683] - Fixed multi line input handling and splitting from further investigation of correct technique

* [VIDEO-2683] - Change to use the getMultilineInput function rather than doing our own splitting

Co-authored-by: Jeff Wilson <[email protected]>

* [VIDEO-2683] - Ran npm prepare for github committed change to index.js

* [VIDEO-2684] - Added auto version tag updating on minor releases

---------

Co-authored-by: Jeff Wilson <[email protected]>
  • Loading branch information
lyramcmillan and jawilson authored Jan 24, 2024
1 parent 57147f7 commit 2eabc32
Show file tree
Hide file tree
Showing 7 changed files with 255 additions and 63 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/auto-update-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Auto Update Version
run-name: Move to ${{ github.ref_name }}

on:
push:
tags:
- v*

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: update version
id: update-version
uses: blinemedical/action-update-version@v1
with:
target: ${{ github.ref_name }}
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,35 @@ jobs:
matrix:
os: ['windows-2019', 'windows-2022', 'macos-12', 'ubuntu-20.04']
arch: ['x86', 'x86_64']
buildSource: [true, false]
exclude:
- os: 'macos-12'
arch: 'x86'
- os: 'ubuntu-20.04'
arch: 'x86'
- os: 'macos-12'
buildSource: true
- os: 'ubuntu-20.04'
buildSource: false

steps:
- uses: actions/checkout@v4

- name: Install Python for Windows
if: matrix.os == 'windows-2019' || matrix.os == 'windows-2022'
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install Meson and Ninja Dependencies for Windows
if: matrix.os == 'windows-2019' || matrix.os == 'windows-2022'
run: pip install setuptools meson ninja

- name: Setup GStreamer with default version
uses: ./
with:
arch: ${{ matrix.arch }}
forceBuildFromSource: ${{ matrix.buildSource }}

- name: Run gst-inspect --version
run: |
Expand Down
28 changes: 28 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,34 @@ inputs:
description: 'the location of the source repository'
required: false
default: 'https://gitlab.freedesktop.org/gstreamer/gstreamer.git'
forceBuildFromSource:
description: 'whether to force building from source instead of using installer package'
required: false
default: false
gstreamerOptions:
description: 'The option configuration string for buliding GStreamer from source'
required: false
default: |-
-Dlibnice:tests=disabled
-Dlibnice:examples=disabled
-Dopenh264:tests=disabled
-Dpygobject:tests=false
-Dpython=enabled
-Dlibav=enabled
-Dugly=enabled
-Dbad=enabled
-Ddevtools=enabled
-Dges=enabled
-Drtsp_server=enabled
-Dvaapi=enabled
-Dsharp=disabled
-Dgpl=enabled
-Dpython=disabled
-Dvaapi=disabled
-Dgst-plugins-base:pango=enabled
-Dgst-plugins-good:cairo=enabled
-Dgst-plugins-good:soup=enabled
-Dgst-plugins-good:soup-lookup-dep=true
outputs:
gstreamerPath:
description: 'Installation path'
Expand Down
123 changes: 94 additions & 29 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 2eabc32

Please sign in to comment.