Skip to content

Ci: Add basic smoke test workflow for self-hosted runners #411

Ci: Add basic smoke test workflow for self-hosted runners

Ci: Add basic smoke test workflow for self-hosted runners #411

Workflow file for this run

name: Base Build
on:
push:
branches: ["main"]
paths-ignore:
- "**/*.md"
- "tests/**"
- "docs/**"
- "LICENSE"
- ".gitignore"
- ".editorconfig"
pull_request:
branches: ["main"]
paths-ignore:
- "**/*.md"
- "tests/**"
- "docs/**"
- "LICENSE"
- ".gitignore"
- ".editorconfig"
workflow_dispatch:
env:
BUILD_TYPE: Release
BUILD_DIR: "${{ github.workspace }}/_build"
DEBIAN_FRONTEND: noninteractive
MTL_BUILD_DISABLE_PCAPNG: true
PREFIX_DIR: "${{ github.workspace }}/_install"
defaults:
run:
shell: bash
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
build-baremetal-ubuntu:
runs-on: "ubuntu-22.04"
timeout-minutes: 120
steps:
- name: "Harden Runner"
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- name: "Checkout repository"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: "Install OS level dependencies"
run: eval 'source scripts/setup_build_env.sh && install_package_dependencies'
- name: "Check local dependencies build cache"
id: load-local-dependencies-cache
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ${{ env.BUILD_DIR }}
key: ${{ runner.os }}-${{ hashFiles('versions.env') }}-${{ hashFiles('scripts/setup*.sh') }}
- name: "Download, unpack and patch build dependencies"
if: steps.load-local-dependencies-cache.outputs.cache-hit != 'true'
run: eval 'source scripts/setup_build_env.sh && get_download_unpack_dependencies'
- name: "Clone and patch ffmpeg 6.1 and 7.0"
if: steps.load-local-dependencies-cache.outputs.cache-hit != 'true'
run: |
ffmpeg-plugin/clone-and-patch-ffmpeg.sh "6.1"
ffmpeg-plugin/clone-and-patch-ffmpeg.sh "7.0"
- name: "Build and Install xdp and libbpf"
run: eval 'source scripts/setup_build_env.sh && lib_install_xdp_bpf_tools'
- name: "Build and Install libfabric"
run: eval 'source scripts/setup_build_env.sh && lib_install_fabrics'
- name: "Build and Install the DPDK"
run: eval 'source scripts/setup_build_env.sh && lib_install_dpdk'
- name: "Build and Install the MTL"
run: eval 'source scripts/setup_build_env.sh && lib_install_mtl'
- name: "Build and Install JPEG XS"
run: eval 'source scripts/setup_build_env.sh && lib_install_jpeg_xs'
- name: "Build and Install JPEG XS ffmpeg plugin"
run: eval 'source scripts/setup_build_env.sh && lib_install_mtl_jpeg_xs_plugin'
- name: "Build gRPC and dependencies"
run: eval 'source scripts/setup_build_env.sh && lib_install_grpc'
- name: "Build MCM SDK and Media Proxy"
run: eval 'source scripts/common.sh && ./build.sh "${PREFIX_DIR}"'
- name: "Build FFmpeg 6.1 with MCM plugin"
working-directory: ${{ github.workspace }}/ffmpeg-plugin
run: |
./configure-ffmpeg.sh "6.1" --disable-doc --disable-debug && \
./build-ffmpeg.sh "6.1"
- name: "Build FFmpeg 7.0 with MCM plugin"
working-directory: ${{ github.workspace }}/ffmpeg-plugin
run: |
./configure-ffmpeg.sh "7.0" --disable-doc --disable-debug && \
./build-ffmpeg.sh "7.0"
- name: "upload media-proxy and mcm binaries"
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: mcm-build
path: |
${{ env.BUILD_DIR }}/mcm/bin/media_proxy
${{ env.BUILD_DIR }}/mcm/bin/mesh-agent
${{ env.BUILD_DIR }}/mcm/lib/libmcm_dp.so.*
${{ env.BUILD_DIR }}/ffmpeg-6-1/ffmpeg
${{ env.BUILD_DIR }}/ffmpeg-7-0/ffmpeg