Skip to content

Commit 7091c9c

Browse files
honglookercopybara-github
authored andcommitted
hpb/oss: add ci for hpb!
PiperOrigin-RevId: 807679219
1 parent 6b76f34 commit 7091c9c

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

.github/workflows/test_hpb.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: hpb tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
safe-checkout:
7+
required: true
8+
description: "The SHA key for the commit we want to run over"
9+
type: string
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
# hpb tests are always run on presubmit
16+
linux:
17+
strategy:
18+
fail-fast: false # Don't cancel all jobs if one fails.
19+
matrix:
20+
config:
21+
- { name: Optimized, flags: --config=opt }
22+
23+
include:
24+
- targets: "//hpb/... //hpb_generator/..."
25+
- image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:8.0.1-e78301df86b3e4c46ec9ac4d98be00e19305d8f3"
26+
- bazel_cmd: "test"
27+
28+
name: Linux ${{ matrix.config.name }}
29+
runs-on: ubuntu-22-4core
30+
steps:
31+
- name: Checkout pending changes
32+
uses: protocolbuffers/protobuf-ci/checkout@v4
33+
with:
34+
ref: ${{ inputs.safe-checkout }}
35+
- name: Run tests
36+
uses: protocolbuffers/protobuf-ci/bazel-docker@v4
37+
with:
38+
image: ${{ matrix.image }}
39+
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
40+
bazel-cache: hpb_linux
41+
bazel: >-
42+
${{ matrix.bazel_cmd }} --cxxopt=-Wno-trigraphs
43+
${{ matrix.targets }} ${{ matrix.config.flags }}

.github/workflows/test_runner.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,14 @@ jobs:
236236
continuous-prefix: ${{ needs.set-vars.outputs.continuous-prefix }}
237237
secrets: inherit
238238

239+
hpb:
240+
name: hpb
241+
needs: [set-vars]
242+
uses: ./.github/workflows/test_hpb.yml
243+
with:
244+
safe-checkout: ${{ needs.set-vars.outputs.checkout-sha }}
245+
secrets: inherit
246+
239247
staleness:
240248
name: Staleness
241249
needs: [set-vars]
@@ -250,7 +258,7 @@ jobs:
250258
# This test depends on all blocking tests and indicates whether they all suceeded.
251259
all-blocking-tests:
252260
name: All Blocking Tests${{ github.event_name == 'pull_request_target' && ' (fork)' || ''}}
253-
needs: [set-vars, validate-yaml, bazel, cpp, java, python, ruby, php, php-ext, csharp, objectivec, rust, upb, staleness]
261+
needs: [set-vars, validate-yaml, bazel, cpp, java, python, ruby, php, php-ext, csharp, objectivec, rust, upb, hpb, staleness]
254262
runs-on: ubuntu-latest
255263
steps:
256264
- name: Check test results

0 commit comments

Comments
 (0)