From 5cc980bef578827ed7fe1110aebe5f409c51f5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Linkiewicz?= Date: Fri, 7 Feb 2025 13:46:08 +0100 Subject: [PATCH] Update ubuntu_build_with_gtest.yml --- .github/workflows/ubuntu_build_with_gtest.yml | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ubuntu_build_with_gtest.yml b/.github/workflows/ubuntu_build_with_gtest.yml index 2aa689abb..b120b685b 100644 --- a/.github/workflows/ubuntu_build_with_gtest.yml +++ b/.github/workflows/ubuntu_build_with_gtest.yml @@ -3,6 +3,13 @@ name: gtest-bare-metal on: # allow manually trigger workflow_dispatch: + inputs: + branch-to-checkout: + type: string + default: 'main' + required: false + description: 'Branch name to use' + push: branches: - main @@ -18,20 +25,21 @@ concurrency: env: # Customize the env if - BUILD_TYPE: Release - DPDK_VERSION: 23.11 - TEST_PF_PORT_P: "0000:49:00.0" - TEST_PF_PORT_R: "0000:49:00.0" - TEST_PORT_P: "0000:49:01.2" - TEST_PORT_R: "0000:49:01.3" - TEST_DMA_PORT_P: 0000:80:04.0 - TEST_DMA_PORT_R: 0000:80:04.1 + BUILD_TYPE: 'Release' + DPDK_VERSION: '23.11' + TEST_PF_PORT_P: '0000:49:00.0' + TEST_PF_PORT_R: '0000:49:00.1' + TEST_PORT_P: '0000:49:01.2' + TEST_PORT_R: '0000:49:01.3' + TEST_DMA_PORT_P: '0000:6a:01.0' + TEST_DMA_PORT_R: '0000:6f:01.0' permissions: contents: read jobs: gtest-check-for-changes: + if: github.event_name != 'workflow_dispatch' runs-on: ubuntu-22.04 permissions: pull-requests: read @@ -47,7 +55,7 @@ jobs: gtest-build-mtl: needs: gtest-check-for-changes - if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.gtest-check-for-changes.outputs.changed == 'true' }} + if: github.repository == 'OpenVisualCloud/Media-Transport-Library' && (needs.gtest-check-for-changes.outputs.changed == 'true' || github.event_name == 'workflow_dispatch') runs-on: [Linux, self-hosted, DPDK] timeout-minutes: 60 @@ -59,13 +67,15 @@ jobs: - name: Checkout MTL uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + with: + ref: '${{ inputs.branch-to-checkout || github.head_ref || github.ref }}' - name: Checkout DPDK uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: repository: 'DPDK/dpdk' - ref: v${{ env.DPDK_VERSION }} - path: dpdk + ref: 'v${{ env.DPDK_VERSION }}' + path: 'dpdk' - name: Install the build dependency run: | @@ -91,7 +101,7 @@ jobs: gtest-perform-tests: needs: [gtest-check-for-changes, gtest-build-mtl] - if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.gtest-check-for-changes.outputs.changed == 'true' }} + if: github.repository == 'OpenVisualCloud/Media-Transport-Library' && (needs.gtest-check-for-changes.outputs.changed == 'true' || github.event_name == 'workflow_dispatch') runs-on: [Linux, self-hosted, DPDK] steps: - name: Harden Runner