build-h264-x11 #2
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: 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 | |
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 | |
run: make -C build ${{ matrix.name }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: libwebrtc-${{ matrix.name }}-h264-x11.tar.xz | |
path: package/libwebrtc-${{ matrix.name }}-h264-x11.tar.xz | |
build-macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- macos-arm64 | |
- macos-x64 | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: make -C build USE_CCACHE=0 ${{ matrix.name }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: libwebrtc-${{ matrix.name }}-h264-x11.tar.xz | |
path: package/libwebrtc-${{ matrix.name }}-h264-x11.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 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate Version Output | |
id: generate_version_output | |
run: echo "::set-output name=version::$(cat VERSION)" | |
shell: bash | |
- name: Print Version Information | |
run: echo "Version ${{ steps.generate_version_output.outputs.version }}" | |
shell: bash | |
- name: Create Release | |
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: | |
strategy: | |
fail-fast: false | |
max-parallel: 1 | |
matrix: | |
name: | |
- linux-arm64 | |
- linux-x64 | |
- macos-arm64 | |
- macos-x64 | |
include: | |
- name: linux-arm64 | |
ext: tar.xz | |
type: application/x-xz | |
- name: linux-x64 | |
ext: tar.xz | |
type: application/x-xz | |
- name: macos-arm64 | |
ext: tar.xz | |
type: application/x-xz | |
- name: macos-x64 | |
ext: tar.xz | |
type: application/x-xz | |
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 }}-h264-x11.${{ matrix.ext }} | |
uses: actions/download-artifact@v3 | |
with: | |
name: libwebrtc-${{ matrix.name }}-h264-x11.${{ matrix.ext }} | |
- name: Upload Release ${{ matrix.name }} | |
id: upload-release-asset | |
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 }}-h264-x11.${{ matrix.ext }} | |
asset_name: libwebrtc-${{ matrix.name }}-h264-x11.${{ matrix.ext }} | |
asset_content_type: ${{ matrix.type }} | |