Fix: Improve format-coding.sh execution time #1398
This file contains hidden or 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: Base Build | |
| on: | |
| # allow manually trigger | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - 'maint-**' | |
| pull_request: | |
| branches: | |
| - main | |
| - 'maint-**' | |
| env: | |
| MTL_BUILD_AND_INSTALL: 1 | |
| SETUP_ENVIRONMENT: 1 | |
| CICD_BUILD: 1 | |
| SETUP_BUILD_AND_INSTALL_ICE_DRIVER: 0 | |
| CICD_BUILD_BUILD_ICE_DRIVER: 0 | |
| SETUP_BUILD_AND_INSTALL_DPDK: 1 | |
| SETUP_BUILD_AND_INSTALL_EBPF_XDP: 0 | |
| SETUP_BUILD_AND_INSTALL_GPU_DIRECT: 1 | |
| HOOK_RUST: 1 | |
| HOOK_PYTHON: 1 | |
| ECOSYSTEM_BUILD_AND_INSTALL_FFMPEG_PLUGIN: 1 | |
| ECOSYSTEM_BUILD_AND_INSTALL_GSTREAMER_PLUGIN: 1 | |
| ECOSYSTEM_BUILD_AND_INSTALL_RIST_PLUGIN: 1 | |
| ECOSYSTEM_BUILD_AND_INSTALL_OBS_PLUGIN: 1 | |
| TOOLS_BUILD_AND_INSTALL_MTL_MONITORS: 0 | |
| TOOLS_BUILD_AND_INSTALL_MTL_READCAP: 1 | |
| TOOLS_BUILD_AND_INSTALL_MTL_CPU_EMULATOR: 1 | |
| permissions: | |
| contents: read | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| pull-requests: read | |
| outputs: | |
| # https://stackoverflow.com/questions/70326569/github-workflow-how-to-conditionally-setup-env-for-all-subsequent-jobs | |
| ubuntu_build: ${{ steps.filter.outputs.ubuntu_build == 'true' }} | |
| manager_build: ${{ steps.filter.outputs.manager_build == 'true' }} | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v2 | |
| id: filter | |
| with: | |
| filters: .github/path_filters.yml | |
| ubuntu-build: | |
| needs: changes | |
| if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' }} | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Build Release | |
| if: ${{ needs.changes.outputs.ubuntu_build == 'true' }} | |
| run: sudo -E .github/scripts/setup_environment.sh | |
| - name: 'upload release build artifacts' | |
| if: ${{ needs.changes.outputs.ubuntu_build == 'true' }} | |
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
| with: | |
| name: mtl-release-bin | |
| path: '${{ github.workspace }}/build/' | |
| ubuntu-ebpf-xdp-build: | |
| needs: changes | |
| if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' }} | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: ebpf-xdp build | |
| if: ${{ needs.changes.outputs.ubuntu_build == 'true' }} | |
| run: sudo -E .github/scripts/setup_environment.sh | |
| env: | |
| SETUP_BUILD_AND_INSTALL_EBPF_XDP: 1 | |
| TOOLS_BUILD_AND_INSTALL_MTL_MONITORS: 1 |