Skip to content

Commit 412ce30

Browse files
committed
ci(gha): add gcc job workflows and action updates
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
1 parent 7843370 commit 412ce30

File tree

3 files changed

+145
-6
lines changed

3 files changed

+145
-6
lines changed

.github/actions/vpp-build/action.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ inputs:
1919
required: false
2020
default: "false"
2121
type: string
22+
USE_GCC:
23+
description: "Use GCC as the compiler"
24+
required: false
25+
default: "false"
26+
type: string
2227
TUI_LINE:
2328
description: "Delimiter line for TUI output"
2429
required: false
@@ -34,11 +39,17 @@ runs:
3439
MAKE_PARALLEL_JOBS: ${{ inputs.MAKE_PARALLEL_JOBS }}
3540
BUILD_TYPE: ${{ inputs.BUILD_TYPE }}
3641
BUILD_HST: ${{ inputs.BUILD_HST }}
42+
USE_GCC: ${{ inputs.USE_GCC }}
3743
TUI_LINE: ${{ inputs.TUI_LINE }}
3844
run: |
3945
set -euo pipefail
4046
41-
BUILD_RESULT="SUCCESSFULLY COMPLETED"
47+
if [ "$USE_GCC" == "true" ] ; then
48+
BUILD_RESULT="(GCC) "
49+
else
50+
BUILD_RESULT=""
51+
fi
52+
BUILD_RESULT+="SUCCESSFULLY COMPLETED"
4253
BUILD_ERROR=""
4354
RETVAL="0"
4455
@@ -52,8 +63,20 @@ runs:
5263
fi
5364
fi
5465
if [ "$BUILD_TYPE" == "debug" ] ; then
55-
if ! make UNATTENDED=yes MAKE_PARALLEL_JOBS=${MAKE_PARALLEL_JOBS} build ; then
56-
BUILD_ERROR="FAILED 'make UNATTENDED=yes MAKE_PARALLEL_JOBS=${MAKE_PARALLEL_JOBS} build'"
66+
if [ "$USE_GCC" == "true" ] ; then
67+
if ! make UNATTENDED=yes CC=gcc MAKE_PARALLEL_JOBS=${MAKE_PARALLEL_JOBS} build ; then
68+
BUILD_ERROR="FAILED 'make UNATTENDED=yes CC=gcc MAKE_PARALLEL_JOBS=${MAKE_PARALLEL_JOBS} build'"
69+
return
70+
fi
71+
else
72+
if ! make UNATTENDED=yes MAKE_PARALLEL_JOBS=${MAKE_PARALLEL_JOBS} build ; then
73+
BUILD_ERROR="FAILED 'make UNATTENDED=yes MAKE_PARALLEL_JOBS=${MAKE_PARALLEL_JOBS} build'"
74+
return
75+
fi
76+
fi
77+
elif [ "$USE_GCC" == "true" ] ; then
78+
if ! make UNATTENDED=yes CC=${CC} MAKE_PARALLEL_JOBS=${MAKE_PARALLEL_JOBS} pkg-verify ; then
79+
BUILD_ERROR="FAILED 'make UNATTENDED=yes CC=${CC} MAKE_PARALLEL_JOBS=${MAKE_PARALLEL_JOBS} pkg-verify'"
5780
return
5881
fi
5982
else

.github/actions/vpp-make-test/action.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ inputs:
3434
required: false
3535
default: "2"
3636
type: string
37+
MAKE_TEST_SUITES:
38+
description: "Specific set of test suites to run"
39+
required: false
40+
default: ""
41+
type: string
3742
TUI_LINE:
3843
description: "Delimiter line for TUI output"
3944
required: false
@@ -46,6 +51,7 @@ runs:
4651
- name: VPP Make Test
4752
shell: bash
4853
env:
54+
MAKE_TEST_SUITES: ${{ inputs.MAKE_TEST_SUITES }}
4955
TEST_JOBS: ${{ inputs.TEST_JOBS }}
5056
TEST_RETRIES: ${{ inputs.TEST_RETRIES }}
5157
MAKE_TEST_OS: ${{ inputs.MAKE_TEST_OS }}
@@ -72,9 +78,9 @@ runs:
7278
fi
7379
fi
7480
if grep -q "${OS_ID}-${OS_VERSION_ID}" <<< "${MAKE_TEST_OS}"; then
75-
if ! make COMPRESS_FAILED_TEST_LOGS=yes TEST_JOBS="$TEST_JOBS" RETRIES=3 test ; then
76-
BUILD_ERROR+="\n* FAILED 'make COMPRESS_FAILED_TEST_LOGS=yes TEST_JOBS=$TEST_JOBS "
77-
BUILD_ERROR+="RETRIES=3 test'"
81+
if ! make COMPRESS_FAILED_TEST_LOGS=yes TEST="\"$MAKE_TEST_SUITES\"" TEST_JOBS="$TEST_JOBS" RETRIES=3 test ; then
82+
BUILD_ERROR+="\n* FAILED 'make COMPRESS_FAILED_TEST_LOGS=yes TEST=\"$MAKE_TEST_SUITES\" "
83+
BUILD_ERROR+="TEST_JOBS=$TEST_JOBS RETRIES=3 test'"
7884
return
7985
fi
8086
else
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: vpp-verify-gcc
2+
3+
on:
4+
workflow_run:
5+
workflows: ["vpp-checkstyle"]
6+
types:
7+
- completed
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
permissions:
14+
contents: read
15+
actions: read
16+
17+
jobs:
18+
vpp-verify-gcc:
19+
name: vpp-verify-gcc-${{ github.event.workflow_run.head_branch }}-${{ matrix.os }}-${{ matrix.executor_arch }}
20+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
21+
runs-on:
22+
- self-hosted
23+
- nomad
24+
- fdio:arch=${{ matrix.executor_arch }}
25+
- fdio:class=builder
26+
- fdio:namespace=sandbox
27+
- fdio:os=${{ matrix.os }}
28+
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
os: ['ubuntu2404', 'ubuntu2204']
33+
executor_arch: ['x86_64']
34+
build-type: ['debug', 'release']
35+
36+
env:
37+
CACHE_DATE: ${{ github.run_id }}
38+
CCACHE_DIR: /scratch/ccache/${{ matrix.os }}-${{ matrix.executor_arch }}
39+
MAKE_PARALLEL_JOBS: 16
40+
MAKE_TEST_SUITES: "vlib vppinfra vpe_api vapi cli bihash"
41+
TEST_JOBS: 16
42+
TEST_RETRIES: 3
43+
MAKE_TEST_OS: ${{ matrix.os == 'ubuntu2204' && 'ubuntu-22.04' || 'ubuntu-24.04' }}
44+
MAKE_TEST_MULTIWORKER_OS: 'debian-12'
45+
VPPAPIGEN_TEST_OS: ${{ matrix.os == 'ubuntu2204' && 'ubuntu-22.04' || 'ubuntu-24.04' }}
46+
SHM_SIZE: ${{ matrix.executor_arch == 'aarch64' && '4096M' || '2048M' }}
47+
WORKSPACE: ${{ github.workspace }}
48+
GERRIT_BRANCH: ""
49+
GERRIT_CHANGE_URL: ""
50+
GERRIT_PROJECT: ""
51+
GERRIT_REFSPEC: ""
52+
TUI_LINE: "*******************************************************************"
53+
54+
steps:
55+
- name: Actions Checkout
56+
uses: actions/checkout@v5
57+
58+
- name: "Show Nomad Attributes"
59+
uses: pmikus/.github/.github/actions/show-nomad-attributes@main
60+
61+
- name: "Show Nomad Dockerfile"
62+
uses: pmikus/.github/.github/actions/show-nomad-dockerfile@main
63+
64+
- name: Restore VPP Gerrit Environment Variables
65+
uses: pmikus/.github/.github/actions/gerrit-env-vars-restore@main
66+
with:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
69+
- name: Gerrit Checkout
70+
# yamllint disable-line rule:line-length
71+
uses: lfreleng-actions/checkout-gerrit-change-action@54d751e8bd167bc91f7d665dabe33fae87aaaa63 # v0.9
72+
with:
73+
gerrit-refspec: ${{ env.GERRIT_REFSPEC }}
74+
gerrit-project: ${{ env.GERRIT_PROJECT }}
75+
gerrit-url: ${{ env.GERRIT_CHANGE_URL }}
76+
ref: refs/heads/${{ env.GERRIT_BRANCH }}
77+
fetch-depth: 0
78+
delay: "0s"
79+
80+
- name: Setup Environment
81+
uses: pmikus/.github/.github/actions/setup-executor-env@main
82+
83+
- name: Setup Docker VPP Runtime Environment for 'make test'
84+
uses: pmikus/vpp/.github/actions/vpp-docker-runtime-setup@master
85+
with:
86+
SHM_SIZE: ${{ env.SHM_SIZE }}
87+
88+
- name: Install VPP dependencies
89+
uses: pmikus/vpp/.github/actions/vpp-install-deps@master
90+
91+
- name: Install VPP external dependencies
92+
uses: pmikus/vpp/.github/actions/vpp-install-ext-deps@master
93+
94+
- name: Build VPP
95+
uses: pmikus/vpp/.github/actions/vpp-build@master
96+
with:
97+
MAKE_PARALLEL_JOBS: ${{ env.MAKE_PARALLEL_JOBS }}
98+
BUILD_TYPE: ${{ matrix['build-type'] }}
99+
USE_GCC: "true"
100+
101+
- name: VPP Make Test
102+
uses: pmikus/vpp/.github/actions/vpp-make-test@master
103+
timeout-minutes: 60
104+
with:
105+
MAKE_TEST_SUITES: ${{ env.MAKE_TEST_SUITES }}
106+
TEST_JOBS: ${{ env.TEST_JOBS }}
107+
TEST_RETRIES: ${{ env.TEST_RETRIES }}
108+
MAKE_TEST_OS: ${{ env.MAKE_TEST_OS }}
109+
MAKE_TEST_MULTIWORKER_OS: ${{ env.MAKE_TEST_MULTIWORKER_OS }}
110+
VPPAPIGEN_TEST_OS: ${{ env.VPPAPIGEN_TEST_OS }}

0 commit comments

Comments
 (0)