Skip to content

Commit

Permalink
[ci, SiVal] Publish bazel result to a gcp bucket
Browse files Browse the repository at this point in the history
Signed-off-by: Douglas Reis <[email protected]>
  • Loading branch information
engdoreis committed Nov 4, 2024
1 parent f2934f9 commit 1453b4e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@ on:
required: true
type: string

permissions:
id-token: write
contents: read

jobs:
FPGA-CW310-SiVal-Nightly:
name: Fpga cw310 sival tests
runs-on: [ubuntu-20.04-fpga, cw310]

env:
GS_PATH: gs://opentitan-test-results
BAZEL_TEST_RESULTS: test_results.xml

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -27,6 +36,12 @@ jobs:
- name: Install dependencies
uses: ./.github/actions/install-deps

- uses: google-github-actions/auth@v2
with:
project_id: lowrisc-cloud-compute
workload_identity_provider: projects/281751345158/locations/global/workloadIdentityPools/github-actions/providers/github-actions
- uses: google-github-actions/setup-gcloud@v2

- name: Update hyperdebug
# We run the update command twice to workaround an issue with udev on the container.
# Where rusb cannot dynamically update its device list in CI (udev is not completely
Expand Down Expand Up @@ -60,3 +75,12 @@ jobs:
| grep -v penetrationtests \
> "$bazel_tests"
./bazelisk.sh test --build_tests_only --target_pattern_file="$bazel_tests"
- name: Publish bazel test results
if: success() || failure()
run: |
# Bazel produce one xml for each test. So we merge them together.
find -L bazel-out -name "test.xml" | xargs merge-junit -o $BAZEL_TEST_RESULTS
GS_FULL_PATH=$GS_PATH/job/${{ github.job }}/branch/${{ github.ref_name }}/$(date +%Y-%m-%d-%H%M%S)_$BAZEL_TEST_RESULTS
gcloud storage cp $BAZEL_TEST_RESULTS "$GS_FULL_PATH"

0 comments on commit 1453b4e

Please sign in to comment.