Skip to content

Commit 7ea074a

Browse files
committed
Set AStyle to v3.5.2
1 parent 7e75b07 commit 7ea074a

File tree

1 file changed

+69
-63
lines changed

1 file changed

+69
-63
lines changed

.github/workflows/main.yml

+69-63
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ on:
1111
push:
1212
branches:
1313
- master
14-
# - pong
15-
# - clean
16-
# - udp_demo
17-
# - ci
14+
# - pong
15+
# - clean
16+
# - udp_demo
17+
# - ci
1818

19-
env:
20-
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
21-
BUILD_TYPE: Release
19+
env:
20+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
21+
BUILD_TYPE: Release
2222

23-
jobs:
24-
build:
25-
name: Standard Build
23+
jobs:
24+
build:
25+
name: Standard Build
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Install SDL2 Dependencies
@@ -33,8 +33,8 @@ jobs:
3333
run: mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
3434
- name: Build with CMake
3535
run: cd build && make
36-
doxygen:
37-
name: Doxygen Build
36+
doxygen:
37+
name: Doxygen Build
3838
permissions:
3939
contents: write
4040
pages: write
@@ -49,53 +49,59 @@ jobs:
4949

5050
- name: Install Doxygen Dependencies
5151
run: sudo apt-get update && sudo apt-get install -y doxygen graphviz fonts-freefont-ttf
52-
52+
5353
- name: Generate docs
5454
shell: bash
5555
run: mkdir -p build && cd build && cmake -DDOCS_ONLY=on .. && make docs
5656

5757
- name: Print warnings
5858
run: |
5959
if [[ -s "doxygen_warnings.txt" ]]; then
60-
echo "You must fix doxygen before submitting a pull request"
61-
echo "Build doxygen: 'cmake -DDOCS=ON .. & make docs'"
62-
echo ""
63-
cat doxygen_warnings.txt
64-
exit -1
65-
fi
66-
60+
echo "You must fix doxygen before submitting a pull request"
61+
echo "Build doxygen: 'cmake -DDOCS=ON .. & make docs'"
62+
echo ""
63+
cat doxygen_warnings.txt
64+
exit -1
65+
fi
66+
6767
- name: Setup Pages
6868
uses: actions/configure-pages@v3
6969
7070
- name: Upload artifact
7171
uses: actions/upload-pages-artifact@v1
7272
with:
7373
path: docs/docs/html
74-
74+
7575
- name: Deploy to GitHub Pages
7676
id: deployment
7777
uses: actions/deploy-pages@v2
78-
79-
git_check:
80-
name: Run Git Check
78+
79+
git_check:
80+
name: Run Git Check
8181
runs-on: ubuntu-latest
8282
steps:
8383
- name: Checkout code
8484
uses: actions/checkout@v2
8585
- name: Run Check and Print Warning
8686
run: |
8787
if [[ -n $(git diff --check HEAD^) ]]; then
88-
echo "You must remove whitespace before submitting a pull request"
89-
echo ""
90-
git diff --check HEAD^
91-
exit -1
88+
echo "You must remove whitespace before submitting a pull request"
89+
echo ""
90+
git diff --check HEAD^
91+
exit -1
9292
fi
93-
astyle_format:
94-
name: Run AStyle Format
93+
astyle_format:
94+
name: Run AStyle Format
9595
runs-on: ubuntu-latest
9696
steps:
9797
- name: Install SDL2 Dependencies
98-
run: sudo apt-get install -y libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-gfx-dev libsdl2-dev astyle
98+
run: |
99+
sudo apt-get install -y libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-gfx-dev libsdl2-dev curl
100+
curl -L https://sourceforge.net/projects/astyle/files/astyle/astyle%203.1/astyle_3.5.2_linux.tar.gz/download -o astyle.tar.gz
101+
tar -xzf asyle.tar.gz
102+
cd astyle/build/gcc
103+
make
104+
sudo make install
99105
- name: Checkout code
100106
uses: actions/checkout@v2
101107
- name: Configure CMake
@@ -107,13 +113,13 @@ jobs:
107113
- name: Print Warnings
108114
run: |
109115
if [[ -n $(git diff) ]]; then
110-
echo "You must run make format before submitting a pull request"
111-
echo ""
112-
git diff
113-
exit -1
116+
echo "You must run make format before submitting a pull request"
117+
echo ""
118+
git diff
119+
exit -1
114120
fi
115-
clang_tidy:
116-
name: Run Clang Tidy
121+
clang_tidy:
122+
name: Run Clang Tidy
117123
runs-on: ubuntu-latest
118124
steps:
119125
- name: Install SDL2 Dependencies
@@ -133,22 +139,22 @@ jobs:
133139
- name: Print Warnings
134140
run: |
135141
if [[ -n $(grep "error: " build/output.txt) ]]; then
136-
echo "You must pass the clang tidy checks before submitting a pull request"
137-
echo "cmake -DENABLE_CLANG_TIDY=ON .. & make tidy"
138-
echo ""
139-
grep --color -E '^|error: ' build/output.txt
140-
exit -1
141-
elif [[ -n $(grep "warning: " build/output.txt) ]]; then
142-
echo "Warnings:"
143-
grep --color -E '^|warning: ' build/output.txt
144-
echo -e "\033[1;32m\xE2\x9C\x93 passed - with warnings\033[0m $1"
145-
exit 0
146-
else
147-
echo -e "\033[1;32m\xE2\x9C\x93 passed - no warnings\033[0m $1"
148-
exit 0
149-
fi
150-
cppcheck:
151-
name: Run CPPCheck
142+
echo "You must pass the clang tidy checks before submitting a pull request"
143+
echo "cmake -DENABLE_CLANG_TIDY=ON .. & make tidy"
144+
echo ""
145+
grep --color -E '^|error: ' build/output.txt
146+
exit -1
147+
elif [[ -n $(grep "warning: " build/output.txt) ]]; then
148+
echo "Warnings:"
149+
grep --color -E '^|warning: ' build/output.txt
150+
echo -e "\033[1;32m\xE2\x9C\x93 passed - with warnings\033[0m $1"
151+
exit 0
152+
else
153+
echo -e "\033[1;32m\xE2\x9C\x93 passed - no warnings\033[0m $1"
154+
exit 0
155+
fi
156+
cppcheck:
157+
name: Run CPPCheck
152158
runs-on: ubuntu-latest
153159
steps:
154160
- name: Install SDL2 Dependencies
@@ -161,8 +167,8 @@ jobs:
161167
run: cd build && make
162168
- name: Run Checks
163169
run: cd build && make check
164-
google_asan:
165-
name: Run Google Address Sanitizer
170+
google_asan:
171+
name: Run Google Address Sanitizer
166172
runs-on: ubuntu-latest
167173
steps:
168174
- name: Install SDL2 Dependencies
@@ -181,8 +187,8 @@ jobs:
181187
run: killall FreeRTOS_Emulator || echo "Nothing running..."
182188
- name: Check for Errors
183189
run: echo "TODO"
184-
google_usan:
185-
name: Run Google Undefined Sanitizer
190+
google_usan:
191+
name: Run Google Undefined Sanitizer
186192
runs-on: ubuntu-latest
187193
steps:
188194
- name: Install SDL2 Dependencies
@@ -201,8 +207,8 @@ jobs:
201207
run: killall FreeRTOS_Emulator || echo "Not running..."
202208
- name: Check for Errors
203209
run: echo "TODO"
204-
google_tsan:
205-
name: Run Google Thread Sanitizer
210+
google_tsan:
211+
name: Run Google Thread Sanitizer
206212
runs-on: ubuntu-latest
207213
steps:
208214
- name: Install SDL2 Dependencies
@@ -221,8 +227,8 @@ jobs:
221227
run: killall FreeRTOS_Emulator || echo "Not running..."
222228
- name: Check for Errors
223229
run: echo "TODO"
224-
codecov:
225-
name: Run Codecov
230+
codecov:
231+
name: Run Codecov
226232
runs-on: ubuntu-latest
227233
steps:
228234
- name: Install SDL2 Dependencies
@@ -236,5 +242,5 @@ jobs:
236242
- name: Setup Test
237243
run: cd build && make test & sleep 20
238244
- name: Publish to Codecov
239-
#run: bash <(curl -s https://codecov.io/bash)
240-
uses: codecov/codecov-action@v1
245+
#run: bash <(curl -s https://codecov.io/bash)
246+
uses: codecov/codecov-action@v1

0 commit comments

Comments
 (0)