Skip to content

Commit

Permalink
[chore, git] make entire pipeline dependent on the result of the clan…
Browse files Browse the repository at this point in the history
…g-format check.
  • Loading branch information
S1eGa committed Feb 27, 2024
1 parent edce929 commit 6b24f90
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 19 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build-in-base-env.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: Build in UTBot base_env

on:
pull_request:
branches: [utbot-main]
push:
branches: [utbot-main]
workflow_run:
workflows: ["Clang Format"]
types:
- completed

jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
container:
image: ghcr.io/unittestbot/utbotcpp/base_env:02-02-2022
credentials:
Expand Down
23 changes: 8 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
name: CI

on:
pull_request:
branches: [main, utbot-main]
push:
branches: [main, utbot-main]
workflow_run:
workflows: ["Clang Format"]
types:
- completed

# Defaults for building KLEE
env:
Expand Down Expand Up @@ -35,6 +35,7 @@ env:
jobs:
Linux:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
name: [
Expand Down Expand Up @@ -144,6 +145,7 @@ jobs:

macOS:
runs-on: macos-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
env:
BASE: /tmp
SOLVERS: STP
Expand All @@ -164,6 +166,7 @@ jobs:

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

Coverage:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
name: [
Expand Down Expand Up @@ -209,14 +213,3 @@ jobs:
- name: Run tests
env: ${{ matrix.env }}
run: scripts/build/run-tests.sh --coverage --upload-coverage --run-docker --debug

clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: pre-commit/[email protected]
- uses: pre-commit-ci/[email protected]
if: always()
20 changes: 20 additions & 0 deletions .github/workflows/clang-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Clang Format

on:
pull_request:
branches: [main, utbot-main]
push:
branches: [main, utbot-main]

jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: pre-commit/[email protected]
- uses: pre-commit-ci/[email protected]
if: always()

0 comments on commit 6b24f90

Please sign in to comment.