From 45409320d45d80cca3376a82db51f57487d54b18 Mon Sep 17 00:00:00 2001 From: Frank Du Date: Thu, 11 Jan 2024 16:28:08 +0800 Subject: [PATCH] ci: add python binding build Signed-off-by: Frank Du --- .github/path_filters.yml | 10 +-- .github/workflows/{obs.yml => ecosystem.yml} | 14 +++- .github/workflows/rist.yml | 76 -------------------- 3 files changed, 15 insertions(+), 85 deletions(-) rename .github/workflows/{obs.yml => ecosystem.yml} (85%) delete mode 100644 .github/workflows/rist.yml diff --git a/.github/path_filters.yml b/.github/path_filters.yml index b35f0c59b..ab4050b56 100644 --- a/.github/path_filters.yml +++ b/.github/path_filters.yml @@ -33,15 +33,11 @@ ffmpeg_plugin: &ffmpeg_plugin - 'ecosystem/ffmpeg_plugin/**' - .github/workflows/ffmpeg_plugin.yml -librist: &librist - - *api - - "ecosystem/librist/**" - - .github/workflows/rist.yml - -obs_plugin: &obs_plugin +ecosystem: &ecosystem - *api + - .github/workflows/ecosystem.yml - 'ecosystem/obs_mtl/**' - - .github/workflows/obs.yml + - "ecosystem/librist/**" dpdk_patches: &dpdk_patches - 'patches/dpdk/**' diff --git a/.github/workflows/obs.yml b/.github/workflows/ecosystem.yml similarity index 85% rename from .github/workflows/obs.yml rename to .github/workflows/ecosystem.yml index 20ff761b1..b13a62e5e 100644 --- a/.github/workflows/obs.yml +++ b/.github/workflows/ecosystem.yml @@ -1,4 +1,4 @@ -name: OBS build +name: ecosystem build checker on: push: @@ -24,7 +24,7 @@ jobs: permissions: pull-requests: read outputs: - changed: ${{ steps.filter.outputs.obs_plugin == 'true' }} + changed: ${{ steps.filter.outputs.ecosystem == 'true' }} steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -58,6 +58,7 @@ jobs: apt-get install -y sudo git gcc meson python3 python3-pip pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libsdl2-dev libsdl2-ttf-dev libssl-dev apt-get install -y dpdk-dev apt-get install -y libobs-dev + apt-get install -y swig - name: Install the python package run: pip install pyelftools==0.29 ninja==1.11.1 @@ -74,3 +75,12 @@ jobs: - name: Build obs plugin run: | ./script/build_obs_plugin.sh + + - name: Build librist with mtl + run: | + cd ecosystem/librist/ + ./build_librist_mtl.sh + + - name: Build python binding + run: | + ./script/build_python.sh \ No newline at end of file diff --git a/.github/workflows/rist.yml b/.github/workflows/rist.yml deleted file mode 100644 index 3e09b09e7..000000000 --- a/.github/workflows/rist.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: rist with mtl - -on: - push: - branches: - - main - - 'maint-**' - pull_request: - branches: - - main - - 'maint-**' - -env: - # Customize the env if - # Disable since mtl patched dpdk pcapng and this job use prebuilt pkg - MTL_BUILD_DISABLE_PCAPNG: true - -permissions: - contents: read - -jobs: - changes: - runs-on: ubuntu-latest - permissions: - pull-requests: read - outputs: - changed: ${{ steps.filter.outputs.librist == 'true' }} - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2 - id: filter - with: - filters: .github/path_filters.yml - - build: - needs: changes - if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.changes.outputs.changed == 'true' }} - runs-on: ${{ matrix.os }} - timeout-minutes: 60 - container: - image: ubuntu:latest - strategy: - matrix: - os: [ubuntu-latest] - - steps: - - name: Harden Runner - uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 - with: - egress-policy: audit - - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Install the build dependency - run: | - apt-get update -y - apt-get install -y sudo git gcc meson python3 python3-pip pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libsdl2-dev libsdl2-ttf-dev libssl-dev - apt-get install -y dpdk-dev - - - name: Install the python package - run: pip install pyelftools==0.29 ninja==1.11.1 - - - name: Git config - run: | - git config --global user.email "you@example.com" - git config --global user.name "Your Name" - - - name: Build - run: | - ./build.sh - - - name: Build librist with mtl - run: | - cd ecosystem/librist/ - ./build_librist_mtl.sh