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

Add GitHub configuration files #3

Merged
merged 1 commit into from
Oct 20, 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
1 change: 1 addition & 0 deletions .github/workflows/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @marco-compiler/reviewers
22 changes: 22 additions & 0 deletions .github/workflows/workflows/fast-forward.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: fast-forward
on:
issue_comment:
types: [created, edited]
jobs:
fast-forward:
# Only run if the comment contains the /fast-forward command.
if: ${{ contains(github.event.comment.body, '/fast-forward')
&& github.event.issue.pull_request }}
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write
issues: write

steps:
- name: Fast forwarding
uses: sequoia-pgp/fast-forward@v1
with:
merge: true
comment: on-error
41 changes: 41 additions & 0 deletions .github/workflows/workflows/pr-clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Check code formatting"

permissions:
contents: read

on: pull_request

jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- name: Fetch source
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
**/*.{h,c,cpp}
separator: " "

- name: List changed files
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "Changed files:"
echo "$CHANGED_FILES"

- name: Install clang-format
uses: aminya/setup-cpp@v1
with:
clangformat: true

- name: Check format
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
clang-format --dry-run --style=file --Werror --verbose $CHANGED_FILES