Skip to content

Commit e1e23bc

Browse files
committed
[ci] upload nightly FPGA test results to gcloud bucket
Signed-off-by: Alice Ziuziakowska <[email protected]>
1 parent b1fe995 commit e1e23bc

File tree

3 files changed

+44
-6
lines changed

3 files changed

+44
-6
lines changed

.github/actions/publish-bazel-test-results/action.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ description: Merge Bazel test results and publish the report
77

88
inputs:
99
merged-results:
10-
description: Path to place merged JUnit report
10+
description: Path to place merged JUnit report.
1111
default: test_results.xml
1212
artifact-name:
1313
description: Name of uploaded artifact. Leave empty to skip upload.
1414
default: ''
15-
bucket-destination:
16-
description: GCP bucket destination to upload report to.
17-
default: ''
15+
upload-to-bucket:
16+
description: Whether to upload results to the Google Cloud Bucket.
17+
default: "false"
18+
branch:
19+
description: Branch name.
20+
default: "${{ github.ref }}"
1821

1922
runs:
2023
using: composite
@@ -45,10 +48,12 @@ runs:
4548
overwrite: true
4649

4750
- name: Upload report to Google Cloud
48-
if: inputs.bucket-destination != ''
51+
if: inputs.upload-to-bucket
4952
shell: bash
5053
run: |
51-
gcloud storage cp "${{ inputs.merged-results }}" "gs://${{ inputs.bucket-destination }}"
54+
BUCKET_PATH=opentitan-test-results/job/${{ github.job }}/branch/${{ inputs.branch }}/$(date +%Y-%m-%d-%H%M%S)_test_results.xml
55+
echo "BUCKET_PATH=$BUCKET_PATH" >> $GITHUB_OUTPUT
56+
gcloud storage cp "${{ inputs.merged-results }}" "gs://${BUCKET_PATH}"
5257
5358
- name: Publish job summary
5459
uses: mikepenz/action-junit-report@ec3a351c13e080dc4fa94c49ab7ad5bf778a9668 # v5

.github/workflows/fpga.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ on:
1818
required: true
1919
type: string
2020
description: FPGA board to use
21+
branch:
22+
default: "${{ github.ref }}"
23+
type: string
24+
description: Branch to checkout
2125
interface:
2226
required: true
2327
type: string
@@ -45,6 +49,10 @@ on:
4549
default: true
4650
type: boolean
4751
description: Skip tests that previously passed and were cached by Bazel
52+
upload_to_bucket:
53+
default: false
54+
type: boolean
55+
description: Whether to upload FPGA results to Google Cloud Bucket
4856

4957
jobs:
5058
fpga:
@@ -54,6 +62,7 @@ jobs:
5462
steps:
5563
- uses: actions/checkout@v4
5664
with:
65+
ref: ${{ inputs.branch }}
5766
fetch-depth: 0
5867
- name: Prepare environment
5968
uses: ./.github/actions/prepare-env
@@ -103,6 +112,8 @@ jobs:
103112
if: ${{ !cancelled() }}
104113
with:
105114
artifact-name: ${{ inputs.job_name }}-test-results
115+
upload-to-bucket: ${{ inputs.upload_to_bucket }}
116+
branch: ${{ input.branch }}
106117

107118
- name: Upload target pattern file
108119
if: ${{ !cancelled() }}

.github/workflows/nightly.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ jobs:
5959
tag_filters: cw310_test_rom,-broken,-manual
6060
add_default_filters: false
6161
cache_test_results: false
62+
upload_to_bucket: true
63+
branch: "${{ inputs.branch }}"
6264

6365
execute_fpga_cw310_rom_tests:
6466
name: CW310 ROM Tests
@@ -74,6 +76,8 @@ jobs:
7476
add_default_filters: false
7577
cache_test_results: false
7678
timeout: 240
79+
upload_to_bucket: true
80+
branch: "${{ inputs.branch }}"
7781

7882
execute_fpga_cw310_rom_ext_tests:
7983
name: CW310 ROM_EXT Tests
@@ -88,6 +92,8 @@ jobs:
8892
tag_filters: cw310_rom_ext,-broken,-manual
8993
add_default_filters: false
9094
cache_test_results: false
95+
upload_to_bucket: true
96+
branch: "${{ inputs.branch }}"
9197

9298
execute_fpga_cw310_sival_tests:
9399
name: CW310 SiVal Tests
@@ -102,6 +108,8 @@ jobs:
102108
tag_filters: cw310_sival,-broken,-manual
103109
add_default_filters: false
104110
cache_test_results: false
111+
upload_to_bucket: true
112+
branch: "${{ inputs.branch }}"
105113

106114
execute_fpga_cw310_sival_rom_ext_tests:
107115
name: CW310 SiVal ROM_EXT Tests
@@ -116,6 +124,8 @@ jobs:
116124
tag_filters: cw310_sival_rom_ext,-broken,-manual
117125
add_default_filters: false
118126
cache_test_results: false
127+
upload_to_bucket: true
128+
branch: "${{ inputs.branch }}"
119129

120130
execute_fpga_cw310_bob_tests:
121131
name: CW310 BoB (SPI and I2C) Tests
@@ -131,6 +141,8 @@ jobs:
131141
tag_filters: cw310_sival_rom_ext_no_hyper,-broken,-manual
132142
add_default_filters: false
133143
cache_test_results: false
144+
upload_to_bucket: true
145+
branch: "${{ inputs.branch }}"
134146

135147
execute_fpga_cw340_test_rom_tests:
136148
name: CW340 SiVal Test ROM Tests
@@ -145,6 +157,8 @@ jobs:
145157
tag_filters: cw340_test_rom,-broken,-manual
146158
add_default_filters: false
147159
cache_test_results: false
160+
upload_to_bucket: true
161+
branch: "${{ inputs.branch }}"
148162

149163
execute_fpga_cw340_rom_tests:
150164
name: CW340 SiVal ROM Tests
@@ -159,6 +173,8 @@ jobs:
159173
tag_filters: cw340_rom_with_fake_keys,-broken,-manual
160174
add_default_filters: false
161175
cache_test_results: false
176+
upload_to_bucket: true
177+
branch: "${{ inputs.branch }}"
162178

163179
execute_fpga_cw340_rom_ext_tests:
164180
name: CW340 SiVal ROM_EXT Tests
@@ -173,6 +189,8 @@ jobs:
173189
tag_filters: cw340_rom_ext,-broken,-manual
174190
add_default_filters: false
175191
cache_test_results: false
192+
upload_to_bucket: true
193+
branch: "${{ inputs.branch }}"
176194

177195
execute_fpga_cw340_sival_tests:
178196
name: CW340 SiVal Tests
@@ -187,6 +205,8 @@ jobs:
187205
tag_filters: cw340_sival,-broken,-manual
188206
add_default_filters: false
189207
cache_test_results: false
208+
upload_to_bucket: true
209+
branch: "${{ inputs.branch }}"
190210

191211
execute_fpga_cw340_sival_rom_ext_tests:
192212
name: CW340 SiVal ROM_EXT Tests
@@ -202,6 +222,8 @@ jobs:
202222
add_default_filters: false
203223
cache_test_results: false
204224
timeout: 90
225+
upload_to_bucket: true
226+
branch: "${{ inputs.branch }}"
205227

206228
slow_otbn_crypto_tests:
207229
name: Slow OTBN Crypto Tests

0 commit comments

Comments
 (0)