Skip to content

Commit 6b24f90

Browse files
committed
[chore, git] make entire pipeline dependent on the result of the clang-format check.
1 parent edce929 commit 6b24f90

File tree

3 files changed

+33
-19
lines changed

3 files changed

+33
-19
lines changed

.github/workflows/build-in-base-env.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
name: Build in UTBot base_env
22

33
on:
4-
pull_request:
5-
branches: [utbot-main]
6-
push:
7-
branches: [utbot-main]
4+
workflow_run:
5+
workflows: ["Clang Format"]
6+
types:
7+
- completed
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1213
container:
1314
image: ghcr.io/unittestbot/utbotcpp/base_env:02-02-2022
1415
credentials:

.github/workflows/build.yaml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
name: CI
33

44
on:
5-
pull_request:
6-
branches: [main, utbot-main]
7-
push:
8-
branches: [main, utbot-main]
5+
workflow_run:
6+
workflows: ["Clang Format"]
7+
types:
8+
- completed
99

1010
# Defaults for building KLEE
1111
env:
@@ -35,6 +35,7 @@ env:
3535
jobs:
3636
Linux:
3737
runs-on: ubuntu-latest
38+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
3839
strategy:
3940
matrix:
4041
name: [
@@ -144,6 +145,7 @@ jobs:
144145

145146
macOS:
146147
runs-on: macos-latest
148+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
147149
env:
148150
BASE: /tmp
149151
SOLVERS: STP
@@ -164,6 +166,7 @@ jobs:
164166

165167
Docker:
166168
runs-on: ubuntu-latest
169+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
167170
steps:
168171
- name: Checkout KLEE Code
169172
uses: actions/checkout@v3
@@ -174,6 +177,7 @@ jobs:
174177

175178
Coverage:
176179
runs-on: ubuntu-latest
180+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
177181
strategy:
178182
matrix:
179183
name: [
@@ -209,14 +213,3 @@ jobs:
209213
- name: Run tests
210214
env: ${{ matrix.env }}
211215
run: scripts/build/run-tests.sh --coverage --upload-coverage --run-docker --debug
212-
213-
clang-format:
214-
runs-on: ubuntu-latest
215-
steps:
216-
- uses: actions/checkout@v3
217-
- uses: actions/setup-python@v4
218-
with:
219-
python-version: 3.x
220-
- uses: pre-commit/[email protected]
221-
- uses: pre-commit-ci/[email protected]
222-
if: always()
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Clang Format
3+
4+
on:
5+
pull_request:
6+
branches: [main, utbot-main]
7+
push:
8+
branches: [main, utbot-main]
9+
10+
jobs:
11+
clang-format:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: 3.x
18+
- uses: pre-commit/[email protected]
19+
- uses: pre-commit-ci/[email protected]
20+
if: always()

0 commit comments

Comments
 (0)