Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add faster formatter check, remove useless comments #105

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Formatting check

on:
pull_request:
types:
- "opened"
- "reopened"
- "synchronize"
- "labeled"
- "unlabeled"

jobs:
formatting_check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: clang-format style check
run: |
git clang-format-14 --diff -q origin/main | tee format_diff.txt
if [ -s format_diff.txt ]; then exit 1; fi
36 changes: 1 addition & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,29 @@
name: CI

on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows to run this workflow in any kind of release
release:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions: read-all

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
strategy:
matrix:
path:
- 'libamqpprox'
- 'amqpprox'
- 'amqpprox_ctl'
- 'tests'
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/clang-format-action@v4.11.0
with:
clang-format-version: '14'
check-path: ${{ matrix.path }}

# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@v1.1
with:
version: 1.59.0

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it

- uses: actions/checkout@v2

# Build Steps
- name: Setup
run: make setup
- name: Configure
Expand All @@ -60,16 +32,10 @@ jobs:
run: make

integration:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Run integration tests
- name: Integration tests
run: make docker-integration-tests


Loading