Skip to content

Commit 5ba935e

Browse files
committed
Split out bento save job
1 parent b97826d commit 5ba935e

1 file changed

Lines changed: 41 additions & 12 deletions

File tree

.github/workflows/main.yml

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,12 @@ jobs:
7171
- self-hosted
7272
- "os=linux"
7373
- "arch=x64"
74-
- "remote_execution=${{ matrix.remote_execution }}"
7574
- "engflow-bento-name=example-gh-x64"
7675
- "engflow-cluster=glass"
77-
- "engflow-job-name=ci-runners-test-matrix-${{matrix.remote_execution}}_${{matrix.allow_bento_snapshot}}"
76+
- "engflow-job-name=linux-test-matrix-${{matrix.execution_type}}"
7877
- "engflow-job-type=${{github.event_name}}-${{github.ref_name}}"
7978
- "engflow-run-id=${{ github.run_id }}"
80-
# To avoid a race condition, among all the jobs that use the same Bento in the same repo, only
81-
# one should specify "engflow-bento-allow-save=true".
82-
# In this case, it is linux-test-matrix(cpp, true, true)
83-
- "engflow-bento-allow-save=${{ matrix.allow_bento_snapshot }}"
79+
- "engflow-bento-allow-save=false"
8480

8581
timeout-minutes: 10
8682
strategy:
@@ -100,12 +96,45 @@ jobs:
10096
- swift
10197
- typescript
10298
execution_type: [remote, local]
103-
allow_bento_snapshot: [false]
104-
include:
105-
- test_package: cpp
106-
execution_type: remote
107-
# Only one job from the matrix should set allow_bento_snapshot.
108-
allow_bento_snapshot: true
99+
100+
steps:
101+
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd"
102+
103+
- name: Set up authentication
104+
shell: bash
105+
run: cp infra/bazelrc .bazelrc.user
106+
107+
- name: Generate python requirements lock
108+
shell: bash
109+
run: bazel run //python:requirements.update
110+
111+
- name: Build and test
112+
env:
113+
ARCH: x64
114+
OS: linux
115+
EXECUTION_TYPE: ${{ matrix.execution_type }}
116+
run: python3 infra/test-all.py --package=${{ matrix.test_package }}
117+
118+
bento-snapshot:
119+
runs-on:
120+
- self-hosted
121+
- "os=linux"
122+
- "arch=x64"
123+
- "remote_execution=true"
124+
- "engflow-bento-name=example-gh-x64"
125+
- "engflow-cluster=glass"
126+
- "engflow-job-name=bento-snapshot"
127+
- "engflow-job-type=${{github.event_name}}-${{github.ref_name}}"
128+
- "engflow-run-id=${{ github.run_id }}"
129+
# To avoid a race condition, among all the jobs that use the same Bento in the same repo, only
130+
# one should specify "engflow-bento-allow-save=true".
131+
- "engflow-bento-allow-save=true"
132+
133+
timeout-minutes: 10
134+
strategy:
135+
fail-fast: false
136+
test_package: cpp
137+
execution_type: remote
109138

110139
steps:
111140
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd"

0 commit comments

Comments
 (0)