Skip to content

build-h264-x11

build-h264-x11 #17

name: build-h264-x11
on:
workflow_dispatch:
inputs:
fail_fast:
description: "Should stop the workflow as soon as one configuration fails"
required: false
type: boolean
default: false
permissions:
contents: write
jobs:
build-linux:
strategy:
fail-fast: false
matrix:
name:
- linux-arm64
- linux-x64
build-type:
- debug
- release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Disk Cleanup
run: ./disk_cleanup.sh
- name: Setup
run: sudo scripts/apt_install.sh
- name: Build-Release
run: make -C build USE_H264=1 USE_X11=1 IS_DEBUG=0 ${{ matrix.name }}
if: matrix.build-type == 'release'
- name: Build-Debug
run: make -C build USE_H264=1 USE_X11=1 IS_DEBUG=1 ${{ matrix.name }}
if: matrix.build-type == 'debug'
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: libwebrtc-${{ matrix.name }}-h264-x11-${{ matrix.build-type }}.tar.xz
path: package/libwebrtc-${{ matrix.name }}-h264-x11-${{ matrix.build-type }}.tar.xz
build-macos:
strategy:
fail-fast: false
matrix:
name:
- macos-arm64
- macos-x64
build-type:
- debug
- release
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Build-Release ${{ matrix.name }}
run: make -C build USE_H264=1 IS_DEBUG=0 USE_CCACHE=0 ${{ matrix.name }}
if: matrix.build-type == 'release'
- name: Build-Debug ${{ matrix.name }}
run: make -C build USE_H264=1 IS_DEBUG=1 USE_CCACHE=0 ${{ matrix.name }}
if: matrix.build-type == 'debug'
- name: Upload artifact ${{ matrix.name }}
uses: actions/upload-artifact@v3
with:
name: libwebrtc-${{ matrix.name }}-h264-${{ matrix.build-type }}.tar.xz
path: package/libwebrtc-${{ matrix.name }}-h264-${{ matrix.build-type }}.tar.xz
build-windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Disk Cleanup
run: .\disk_cleanup.bat
- name: Build
run: powershell -NoProfile -ExecutionPolicy Unrestricted .\build.windows.ps1
shell: pwsh
- name: Upload artifact x64
uses: actions/upload-artifact@v3
with:
name: libwebrtc-win-x64.7z
path: package/libwebrtc-win-x64.7z
- name: Upload artifact x86
uses: actions/upload-artifact@v3
with:
name: libwebrtc-win-x86.7z
path: package/libwebrtc-win-x86.7z
create-release:
runs-on: ubuntu-latest
needs:
- build-linux
- build-macos
- build-windows
steps:
- uses: actions/checkout@v4
- name: Generate Version Output
id: generate_version_output
run: echo "::set-output name=version::$(cat VERSION | grep WEBRTC_SEMANTIC_VERSION | cut -d'=' -f2)"
shell: bash
- name: Print Version Information
run: echo "Version ${{ steps.generate_version_output.outputs.version }}"
shell: bash
- name: Create Release ${{ steps.generate_version_output.outputs.version }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.generate_version_output.outputs.version }}
release_name: webrtc-native-build-${{ steps.generate_version_output.outputs.version }}
body: |
Latest build of webrtc-native-build
- This is a prerelease, use at your own risks.
draft: true
prerelease: true
- name: Output Release URL File
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- name: Save Release URL File for publish
uses: actions/upload-artifact@v2
with:
name: release_url
path: release_url.txt
release-linux-mac:
strategy:
fail-fast: false
max-parallel: 1
matrix:
name:
- linux-arm64
- linux-x64
- macos-arm64
- macos-x64
build-type:
- debug
- release
include:
- name: linux-arm64
ext: tar.xz
options: h264-x11
type: application/x-xz
- name: linux-x64
ext: tar.xz
options: h264-x11
type: application/x-xz
- name: macos-arm64
ext: tar.xz
options: h264
type: application/x-xz
- name: macos-x64
options: h264
ext: tar.xz
type: application/x-xz
name: Release ${{ matrix.name }}-${{ matrix.options }}-${{ matrix.build-type }}.${{ matrix.ext }}
needs:
- create-release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: release_url
- name: Get Upload URL
id: get_release_info
run: |
echo "::set-output name=upload_url::$(cat release_url.txt)"
ls -l
cat release_url.txt
- name: Download ${{ matrix.name }}-${{ matrix.options }}-${{ matrix.build-type }}.${{ matrix.ext }}
uses: actions/download-artifact@v3
with:
name: libwebrtc-${{ matrix.name }}-${{ matrix.options }}-${{ matrix.build-type }}.${{ matrix.ext }}
if: matrix.name == 'linux-arm64' || matrix.name == 'linux-x64' || matrix.name == 'macos-arm64' || matrix.name == 'macos-x64'
- name: Upload Release ${{ matrix.name }}-${{ matrix.options }}-${{ matrix.build-type }}.${{ matrix.ext }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: libwebrtc-${{ matrix.name }}-${{ matrix.options }}-${{ matrix.build-type }}.${{ matrix.ext }}
asset_name: libwebrtc-${{ matrix.name }}-${{ matrix.options }}-${{ matrix.build-type }}.${{ matrix.ext }}
asset_content_type: ${{ matrix.type }}
release-windows:
strategy:
fail-fast: false
max-parallel: 1
matrix:
name:
- win-x64
- win-x86
include:
- name: win-x64
ext: 7z
type: application/x-7z-compressed
- name: win-x86
ext: 7z
type: application/x-7z-compressed
name: Release ${{ matrix.name }}
needs:
- create-release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: release_url
- name: Get Upload URL
id: get_release_info
run: |
echo "::set-output name=upload_url::$(cat release_url.txt)"
ls -l
cat release_url.txt
- name: Download ${{ matrix.name }}.${{ matrix.ext }}
uses: actions/download-artifact@v3
with:
name: libwebrtc-${{ matrix.name }}.${{ matrix.ext }}
- name: Upload Release ${{ matrix.name }}.${{ matrix.ext }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: libwebrtc-${{ matrix.name }}.${{ matrix.ext }}
asset_name: libwebrtc-${{ matrix.name }}.${{ matrix.ext }}
asset_content_type: ${{ matrix.type }}