Skip to content

Commit

Permalink
Add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dhinakg committed Aug 7, 2023
1 parent 7ce394e commit 5c0792a
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Build

on:
push:
pull_request:
workflow_dispatch:

jobs:
format:
name: Build
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- run: make
31 changes: 31 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Check code style

on:
push:
pull_request:
workflow_dispatch:

jobs:
format:
name: Check code style
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: cpp-linter/cpp-linter-action@v2
id: linter
with:
style: file
extensions: 'c,h,m,C,H,cpp,mm,hpp,cc,hh,c++,h++,cxx,hxx'
tidy-checks: '-*'
version: '16'
files-changed-only: ${{ github.event_name == 'pull_request' }}
thread-comments: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check for lint failure
if: steps.linter.outputs.checks-failed > 0
run: |
echo "::error::Code style check failed."
exit 1
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ all: dsce

# This is a bit of a hack to get the binary to rebuild when the headers change
dsce: $(HEADERS)
dsce: $(SRC)
clang++ -fmodules -fcxx-modules -std=c++17 -Wno-unused-getter-return-value -mmacosx-version-min=12 -Idyld/common -DDSCE_VERSION="$(VERSION)" $(SRC) -o $@

clean:
Expand Down

1 comment on commit 5c0792a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format reports: 20 file(s) not formatted
  • Selector.h
  • ImageHeader.h
  • Address.h
  • Output.h
  • LocationBase.h
  • Util.h
  • Location.h
  • Extern.h
  • Location.mm
  • Output.mm

Have any feedback or feature suggestions? Share it here.

Please sign in to comment.