Skip to content

Commit

Permalink
Fixing CI failures (#17)
Browse files Browse the repository at this point in the history
* Fixing CI failures

* More fixing
  • Loading branch information
jatinchowdhury18 authored Dec 16, 2022
1 parent 65d0ccc commit 36b5775
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 28 deletions.
49 changes: 23 additions & 26 deletions .github/workflows/auto-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,37 @@ name: Auto-formatter
on:
pull_request:
branches:
- main
- master
paths:
- '**.cpp'
- '**.h'
- '**.cpp'
- '**.h'

workflow_dispatch:

jobs:
build_and_test:
name: Apply clang-format to pull request
runs-on: ubuntu-latest

steps:
- name: Install Linux Deps
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 11
sudo apt-get install clang-format-11
clang-format-11 --version

- name: Checkout code
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
steps:
- name: Install Linux Deps
run: |
sudo apt update
sudo apt -y install clang-format-14
clang-format-14 --version
- name: Checkout code
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0

- name: Run clang-format
shell: bash
run: find {include/,tests/} -iname *.h -o -iname *.cpp | xargs clang-format-11 -style=file -verbose -i
- name: Run clang-format
shell: bash
run: find . -iname "*.h" -o -iname "*.cpp" | xargs clang-format-14 -style=file -verbose -i

- name: Commit & Push changes
uses: actions-js/push@master
with:
message: "Apply clang-format"
branch: ${{ github.head_ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit & Push changes
uses: actions-js/push@master
with:
message: "Apply clang-format"
branch: ${{ github.head_ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion bench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ message(STATUS "Importing Googe Benchmark with CPM")
CPMAddPackage(
NAME benchmark
GITHUB_REPOSITORY google/benchmark
VERSION 1.5.2
VERSION 1.7.1
OPTIONS "BENCHMARK_ENABLE_TESTING Off"
)

Expand Down
1 change: 1 addition & 0 deletions bench/WrightOmegaBench.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <limits>
#include <benchmark/benchmark.h>

#if CHOWDSP_WDF_TEST_WITH_XSIMD
Expand Down
2 changes: 1 addition & 1 deletion include/chowdsp_wdf/rtype/rtype_detail.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ namespace wdf
template <typename ElementType>
struct AlignedArray
{
explicit AlignedArray (size_t size) : m_size (size),
explicit AlignedArray (size_t size) : m_size ((int) size),
vector (array_pad<ElementType> (size), ElementType {})
{
}
Expand Down

0 comments on commit 36b5775

Please sign in to comment.