Skip to content

Commit ee08618

Browse files
committed
ci(gha): add gcc job workflows and action updates
- also clean up concurrency group and naming convention Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
1 parent 7843370 commit ee08618

File tree

9 files changed

+195
-34
lines changed

9 files changed

+195
-34
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

.github/workflows/vpp-checkstyle.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,23 @@ permissions:
6262

6363
concurrency:
6464
# yamllint disable-line rule:line-length
65-
group: required-verify-${{ github.workflow }}-${{ inputs.GERRIT_BRANCH }}-${{ inputs.GERRIT_CHANGE_ID || github.run_id }}
65+
group: required-${{ github.workflow }}-${{ inputs.GERRIT_CHANGE_NUMBER }}
6666
cancel-in-progress: true
6767

6868
jobs:
6969
checkstyle:
70-
name: vpp-checkstyle-${{ inputs.GERRIT_BRANCH }}-${{ matrix.os }}-${{ matrix.executor_arch }}
70+
name: ${{ github.workflow }}-${{ inputs.GERRIT_BRANCH }}-release-ubuntu2404-x86_64
7171
if: ${{ inputs.GERRIT_EVENT_TYPE == 'patchset-created' }}
7272
runs-on:
7373
- self-hosted
7474
- nomad
75-
- fdio:arch=${{ matrix.executor_arch }}
75+
- fdio:arch=x86_64
7676
- fdio:class=builder
7777
- fdio:namespace=sandbox
78-
- fdio:os=${{ matrix.os }}
78+
- fdio:os=ubuntu2404
7979
env:
8080
TUI_LINE: "*******************************************************************"
8181

82-
strategy:
83-
matrix:
84-
os: [ubuntu2404]
85-
executor_arch: [x86_64]
86-
8782
steps:
8883
- name: "Show Nomad Attributes"
8984
uses: pmikus/.github/.github/actions/show-nomad-attributes@main

.github/workflows/vpp-merge-docs.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ defaults:
5555
run:
5656
shell: bash
5757

58-
concurrency:
59-
group: merge-docs-${{ github.workflow }}-${{ inputs.GERRIT_BRANCH }}-${{ inputs.GERRIT_CHANGE_ID }}
60-
cancel-in-progress: true
61-
6258
permissions:
6359
contents: read
6460
actions: read
6561

62+
concurrency:
63+
group: required-${{ github.workflow }}-${{ inputs.GERRIT_CHANGE_NUMBER }}
64+
cancel-in-progress: true
65+
6666
jobs:
67-
merge-docs:
68-
name: vpp-merge-docs-${{ inputs.GERRIT_BRANCH }}
67+
vpp-merge-docs:
68+
name: vpp-merge-docs-${{ inputs.GERRIT_BRANCH }}-release-ubuntu2404-x86_64
6969
if: ${{ inputs.GERRIT_EVENT_TYPE == 'change-merged' }}
7070
runs-on:
7171
- self-hosted
@@ -77,6 +77,10 @@ jobs:
7777

7878
env:
7979
WORKSPACE: ${{ github.workspace }}
80+
GERRIT_BRANCH: ""
81+
GERRIT_CHANGE_URL: ""
82+
GERRIT_PROJECT: ""
83+
GERRIT_REFSPEC: ""
8084
TUI_LINE: "*******************************************************************"
8185

8286
steps:
@@ -90,6 +94,7 @@ jobs:
9094
uses: pmikus/.github/.github/actions/show-nomad-dockerfile@main
9195

9296
- name: Gerrit Checkout
97+
# yamllint disable-line rule:line-length
9398
uses: lfreleng-actions/checkout-gerrit-change-action@54d751e8bd167bc91f7d665dabe33fae87aaaa63 # v0.9
9499
with:
95100
gerrit-refspec: ${{ env.GERRIT_REFSPEC }}
@@ -108,8 +113,8 @@ jobs:
108113
109114
- name: Upload Documentation Artifacts
110115
if: always()
111-
uses: actions/upload-artifact@v4
116+
uses: actions/upload-artifact@v5
112117
with:
113-
name: vpp-docs-${{ inputs.GERRIT_BRANCH }}
118+
name: vpp-docs-${{ github.event.workflow_run.head_branch }}
114119
path: build-root/docs/
115120
retention-days: 7

.github/workflows/vpp-merge-make-test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ permissions:
6060
actions: read
6161

6262
jobs:
63-
merge-make-test:
64-
name: vpp-merge-make-test-${{ inputs.GERRIT_BRANCH }}-${{ matrix.os }}-${{ matrix.executor_arch }}
63+
vpp-merge-make-test:
64+
name: ${{ github.workflow }}-${{ inputs.GERRIT_BRANCH }}-${{ matrix.build-type }}-${{ matrix.os }}-${{ matrix.executor_arch }}
6565
if: ${{ inputs.GERRIT_EVENT_TYPE == 'change-merged' }}
6666
runs-on:
6767
- self-hosted
@@ -76,13 +76,14 @@ jobs:
7676
matrix:
7777
os: ['ubuntu2404', 'ubuntu2204', 'debian12']
7878
executor_arch: ['x86_64', 'aarch64']
79+
build-type: ['release']
7980
exclude:
8081
# Exclude debian12 on aarch64 for all builds
8182
- os: 'debian12'
8283
executor_arch: 'aarch64'
8384

8485
env:
85-
BUILD_TYPE: 'release'
86+
BUILD_TYPE: ${{ matrix.build-type }}
8687
CACHE_DATE: ${{ github.run_id }}
8788
CCACHE_DIR: /scratch/ccache/${{ matrix.os }}-${{ matrix.executor_arch }}
8889
MAKE_PARALLEL_JOBS: 16

.github/workflows/vpp-verify-docs.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ defaults:
1010
run:
1111
shell: bash
1212

13-
concurrency:
14-
group: verify-docs-${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
15-
cancel-in-progress: true
16-
1713
permissions:
1814
contents: read
1915
actions: read
2016

17+
concurrency:
18+
group: required-${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}-${{ github.event.workflow_run.id }}
19+
cancel-in-progress: true
20+
2121
jobs:
2222
vpp-verify-docs:
23-
name: vpp-verify-docs-${{ github.event.workflow_run.head_branch }}
23+
name: ${{ github.workflow }}--${{ matrix.build-type }}-${{ matrix.os }}-${{ matrix.executor_arch }}
2424
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2525
runs-on:
2626
- self-hosted
@@ -30,12 +30,21 @@ jobs:
3030
- fdio:namespace=sandbox
3131
- fdio:os=ubuntu2404
3232

33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
os: ['ubuntu2204']
37+
executor_arch: ['x86_64']
38+
build-type: ['release']
39+
3340
env:
3441
WORKSPACE: ${{ github.workspace }}
3542
GERRIT_BRANCH: ""
3643
GERRIT_CHANGE_URL: ""
3744
GERRIT_PROJECT: ""
3845
GERRIT_REFSPEC: ""
46+
GERRIT_CHANGE_NUMBER: ""
47+
GERRIT_PATCHSET_NUMBER: ""
3948
TUI_LINE: "*******************************************************************"
4049

4150
steps:
@@ -76,6 +85,6 @@ jobs:
7685
if: always()
7786
uses: actions/upload-artifact@v5
7887
with:
79-
name: vpp-docs-${{ github.event.workflow_run.head_branch }}
88+
name: vpp-docs-${{ env.GERRIT_BRANCH }}-${{ env.GERRIT_CHANGE_NUMBER }}-${{ env.GERRIT_PATCHSET_NUMBER }}
8089
path: build-root/docs/
8190
retention-days: 7
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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+
concurrency:
18+
group: required-${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}-${{ github.event.workflow_run.id }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
vpp-verify-gcc:
23+
name: ${{ github.workflow }}--${{ matrix.build-type }}-${{ matrix.os }}-${{ matrix.executor_arch }}
24+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
25+
runs-on:
26+
- self-hosted
27+
- nomad
28+
- fdio:arch=${{ matrix.executor_arch }}
29+
- fdio:class=builder
30+
- fdio:namespace=sandbox
31+
- fdio:os=${{ matrix.os }}
32+
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
os: ['ubuntu2404', 'ubuntu2204']
37+
executor_arch: ['x86_64']
38+
build-type: ['debug', 'release']
39+
40+
env:
41+
CACHE_DATE: ${{ github.run_id }}
42+
CCACHE_DIR: /scratch/ccache/${{ matrix.os }}-${{ matrix.executor_arch }}
43+
MAKE_PARALLEL_JOBS: 16
44+
MAKE_TEST_SUITES: "vlib vppinfra vpe_api vapi cli bihash"
45+
TEST_JOBS: 16
46+
TEST_RETRIES: 3
47+
MAKE_TEST_OS: ${{ matrix.os == 'ubuntu2204' && 'ubuntu-22.04' || 'ubuntu-24.04' }}
48+
MAKE_TEST_MULTIWORKER_OS: 'debian-12'
49+
VPPAPIGEN_TEST_OS: ${{ matrix.os == 'ubuntu2204' && 'ubuntu-22.04' || 'ubuntu-24.04' }}
50+
SHM_SIZE: ${{ matrix.executor_arch == 'aarch64' && '4096M' || '2048M' }}
51+
WORKSPACE: ${{ github.workspace }}
52+
GERRIT_BRANCH: ""
53+
GERRIT_CHANGE_URL: ""
54+
GERRIT_PROJECT: ""
55+
GERRIT_REFSPEC: ""
56+
TUI_LINE: "*******************************************************************"
57+
58+
steps:
59+
- name: Actions Checkout
60+
uses: actions/checkout@v5
61+
62+
- name: "Show Nomad Attributes"
63+
uses: pmikus/.github/.github/actions/show-nomad-attributes@main
64+
65+
- name: "Show Nomad Dockerfile"
66+
uses: pmikus/.github/.github/actions/show-nomad-dockerfile@main
67+
68+
- name: Restore VPP Gerrit Environment Variables
69+
uses: pmikus/.github/.github/actions/gerrit-env-vars-restore@main
70+
with:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
73+
- name: Gerrit Checkout
74+
# yamllint disable-line rule:line-length
75+
uses: lfreleng-actions/checkout-gerrit-change-action@54d751e8bd167bc91f7d665dabe33fae87aaaa63 # v0.9
76+
with:
77+
gerrit-refspec: ${{ env.GERRIT_REFSPEC }}
78+
gerrit-project: ${{ env.GERRIT_PROJECT }}
79+
gerrit-url: ${{ env.GERRIT_CHANGE_URL }}
80+
ref: refs/heads/${{ env.GERRIT_BRANCH }}
81+
fetch-depth: 0
82+
delay: "0s"
83+
84+
- name: Setup Environment
85+
uses: pmikus/.github/.github/actions/setup-executor-env@main
86+
87+
- name: Setup Docker VPP Runtime Environment for 'make test'
88+
uses: pmikus/vpp/.github/actions/vpp-docker-runtime-setup@master
89+
with:
90+
SHM_SIZE: ${{ env.SHM_SIZE }}
91+
92+
- name: Install VPP dependencies
93+
uses: pmikus/vpp/.github/actions/vpp-install-deps@master
94+
95+
- name: Install VPP external dependencies
96+
uses: pmikus/vpp/.github/actions/vpp-install-ext-deps@master
97+
98+
- name: Build VPP
99+
uses: pmikus/vpp/.github/actions/vpp-build@master
100+
with:
101+
MAKE_PARALLEL_JOBS: ${{ env.MAKE_PARALLEL_JOBS }}
102+
BUILD_TYPE: ${{ matrix['build-type'] }}
103+
USE_GCC: "true"
104+
105+
- name: VPP Make Test
106+
uses: pmikus/vpp/.github/actions/vpp-make-test@master
107+
timeout-minutes: 60
108+
with:
109+
MAKE_TEST_SUITES: ${{ env.MAKE_TEST_SUITES }}
110+
TEST_JOBS: ${{ env.TEST_JOBS }}
111+
TEST_RETRIES: ${{ env.TEST_RETRIES }}
112+
MAKE_TEST_OS: ${{ env.MAKE_TEST_OS }}
113+
MAKE_TEST_MULTIWORKER_OS: ${{ env.MAKE_TEST_MULTIWORKER_OS }}
114+
VPPAPIGEN_TEST_OS: ${{ env.VPPAPIGEN_TEST_OS }}

.github/workflows/vpp-verify-hst.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ permissions:
1414
contents: read
1515
actions: read
1616

17+
concurrency:
18+
group: required-${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}-${{ github.event.workflow_run.id }}
19+
cancel-in-progress: true
20+
1721
jobs:
1822
vpp-verify-hst:
19-
name: vpp-verify-hst-${{ github.event.workflow_run.head_branch }}-${{ matrix.os }}-${{ matrix.executor_arch }}
23+
name: ${{ github.workflow }}--${{ matrix.build-type }}-${{ matrix.os }}-${{ matrix.executor_arch }}
2024
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2125
runs-on:
2226
- self-hosted

.github/workflows/vpp-verify-make-test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ permissions:
1414
contents: read
1515
actions: read
1616

17+
concurrency:
18+
group: required-${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}-${{ github.event.workflow_run.id }}
19+
cancel-in-progress: true
20+
1721
jobs:
1822
vpp-verify-make-test:
19-
name: vpp-verify-make-test-${{ github.event.workflow_run.head_branch }}-${{ matrix.os }}-${{ matrix.executor_arch }}
23+
name: ${{ github.workflow }}--${{ matrix.build-type }}-${{ matrix.os }}-${{ matrix.executor_arch }}
2024
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2125
runs-on:
2226
- self-hosted

0 commit comments

Comments
 (0)