1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- # Postsubmit checks that run on the `main` branch after merge.
1615name : " main"
1716
1817on :
1918 workflow_dispatch :
19+ pull_request :
2020 push :
2121 branches :
2222 - main
2323
2424concurrency :
2525 group : ${{ github.workflow }}.${{ github.ref }}
26+ cancel-in-progress : ${{ github.event_name == 'pull_request' }}
2627
2728env :
2829 # Recommended here: https://github.com/bazelbuild/bazelisk/issues/88#issuecomment-625178467
3334
3435jobs :
3536 # TODO(OND-616): use remote execution and caching for all CI Runner jobs.
36- bazel-builder :
37- runs-on :
38- - self-hosted
39- - os=linux
40- - arch=x64
41- - " engflow-cluster=glass"
42- - " engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian12-dind-x64@sha256:0a8ee2164b24a0bcfffa95a071967e1495cd524a8eb52a1bcf168e52199e86b0"
43- - " engflow-pool=ci_sysbox_x64"
44- - " engflow-runtime=sysbox-runc"
45- - " engflow-runner-id=${{ github.repository_id }}_bazel-builder_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}"
46- - " engflow-run-id=${{ github.run_id }}"
37+ build-and-test :
38+ runs-on : ${{ matrix.runner }}
4739 timeout-minutes : 30
48-
49- env :
50- ARCH : " x64"
51- OS : " linux"
52-
53- steps :
54- - uses : actions/checkout@v4
55-
56- - name : Log in
57- run : infra/login.sh
58-
59- - name : Run all tests
60- if : success()
61- run : |
62- bazel test --config=noninteractive --config=engflow --config=remote_linux_x64 //...
63-
64- - name : Log out
65- run : infra/logout.sh
66-
67- golang-builder :
68- runs-on :
69- - self-hosted
70- - " purpose=github-actions"
71- - " os=${{ matrix.os }}"
72- - " arch=${{ matrix.arch }}"
73- - " os_distribution=${{ matrix.os_distribution }}"
74- - " os_version=${{ matrix.os_version }}"
75- - " revision=${{ matrix.revision }}"
76- timeout-minutes : 10
7740 strategy :
7841 fail-fast : false
7942 matrix :
43+ # Use remote execution on Linux, remote cache for others. macOS and Windows
44+ # are sensitive to the C++ toolchain installed on the runner, and it may not
45+ # match what's installed on the remote worker.
8046 include :
47+ - os : " linux"
48+ arch : " x64"
49+ runner : " ubuntu-latest"
50+ ef_config : " engflow"
51+
8152 - os : " macos"
8253 arch : " arm64"
83- os_distribution : " sonoma"
84- os_version : " 14"
85- revision : " c12cc4655257fcf7da86fe06e87542b7e6814a1f"
54+ runner : " macos-14"
55+ ef_config : " engflow_cache"
8656
8757 - os : " windows"
8858 arch : " x64"
89- os_distribution : " server"
90- os_version : " 2022"
91- revision : " c12cc4655257fcf7da86fe06e87542b7e6814a1f"
59+ runner : " windows-2022"
60+ ef_config : " engflow_cache"
9261
9362 env :
9463 ARCH : " ${{ matrix.arch }}"
@@ -97,66 +66,29 @@ jobs:
9766 steps :
9867 - uses : actions/checkout@v4
9968
100- - name : Log in
69+ - name : " Log in"
10170 shell : bash
10271 run : infra/login.sh
10372
104- - name : Run all tests
73+ - name : " Bazel tests"
10574 if : success()
10675 shell : bash
10776 run : |
108- # TODO(CUS-345): Enable remote execution
109- bazel run --config=noninteractive --config=engflow_bes @rules_go//go -- test ./...
110- bazel run --config=noninteractive --config=engflow_bes @rules_go//go -- clean -cache -modcache
111-
112- - name : Log out
113- shell : bash
114- run : infra/logout.sh
115-
116- golang-builder-ci-runners :
117- runs-on :
118- - self-hosted
119- - os=linux
120- - arch=x64
121- - " engflow-cluster=glass"
122- - " engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian12-dind-x64@sha256:0a8ee2164b24a0bcfffa95a071967e1495cd524a8eb52a1bcf168e52199e86b0"
123- - " engflow-pool=ci_sysbox_x64"
124- - " engflow-runtime=sysbox-runc"
125- - " engflow-runner-id=${{ github.repository_id }}_golang-builder-ci-runners_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}"
126- - " engflow-run-id=${{ github.run_id }}"
127- timeout-minutes : 10
128-
129- env :
130- ARCH : " x64"
131- OS : " linux"
132-
133- steps :
134- - uses : actions/checkout@v4
77+ bazel test --config=noninteractive --config=${{ matrix.ef_config }} --config=remote_${{ matrix.os }}_${{ matrix.arch }} //...
13578
136- - name : Log in
137- run : infra/login.sh
138-
139- - name : Run all tests
79+ - name : " Go tests"
14080 if : success()
81+ shell : bash
14182 run : |
142- # TODO(CUS-345): Enable remote execution
14383 bazel run --config=noninteractive --config=engflow_bes @rules_go//go -- test ./...
14484 bazel run --config=noninteractive --config=engflow_bes @rules_go//go -- clean -cache -modcache
14585
14686 - name : Log out
87+ shell : bash
14788 run : infra/logout.sh
14889
14990 copyright-headers-check :
150- runs-on :
151- - self-hosted
152- - os=linux
153- - arch=x64
154- - " engflow-cluster=glass"
155- - " engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian12-dind-x64@sha256:0a8ee2164b24a0bcfffa95a071967e1495cd524a8eb52a1bcf168e52199e86b0"
156- - " engflow-pool=ci_sysbox_x64"
157- - " engflow-runtime=sysbox-runc"
158- - " engflow-runner-id=${{ github.repository_id }}_copyright-headers-check_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}"
159- - " engflow-run-id=${{ github.run_id }}"
91+ runs-on : ubuntu-latest
16092 timeout-minutes : 10
16193
16294 env :
0 commit comments