@@ -3,14 +3,14 @@ name: HeliOS CI Workflow
33on :
44
55 push :
6- branches : [ master, develop ]
6+ branches : [ develop ]
77 pull_request :
8- branches : [ master, develop ]
8+ branches : [ develop ]
99
1010 workflow_dispatch :
1111
1212jobs :
13- build-test :
13+ build-test-doc :
1414 runs-on : ubuntu-22.04
1515
1616 steps :
@@ -19,8 +19,125 @@ jobs:
1919
2020 - name : Build HeliOS unit tests...
2121 shell : bash
22- run : gcc -fdiagnostics-color=always -O0 -ggdb -std=c89 - Wall -Wextra -I ${{github.workspace}}/src -DPOSIX_ARCH_OTHER -DCONFIG_MEMORY_REGION_SIZE_IN_BLOCKS=0x1C20u -DCONFIG_ENABLE_SYSTEM_ASSERT -o ${{github.workspace}}/extras/ test/bin/test ${{github.workspace}}/src/*.c ${{github.workspace}}/extras/ test/src/test.c
22+ run : gcc -fdiagnostics-color=always -O0 -ggdb -ansi -pedantic - Wall -Wextra -Wno-unused-parameter -I${{github.workspace}}/src -I ${{github.workspace}}/test/ src -I${{github.workspace}}/test/src/harness -I${{github.workspace}}/test/src/unit - DPOSIX_ARCH_OTHER -DCONFIG_MEMORY_REGION_SIZE_IN_BLOCKS=0x1C20u -DCONFIG_ENABLE_SYSTEM_ASSERT -o${{github.workspace}}/test/bin/test ${{github.workspace}}/src/*.c ${{github.workspace}}/test/src/*.c ${{github.workspace}}/ test/src/harness/*.c ${{github.workspace}}/ test/src/unit/* .c
2323
2424 - name : Run HeliOS unit tests...
2525 shell : bash
26- run : ${{github.workspace}}/extras/test/bin/test
26+ run : ${{github.workspace}}/test/bin/test
27+
28+ - name : Install Cppcheck...
29+ shell : bash
30+ run : |
31+ sudo apt update
32+ sudo apt -y install cppcheck
33+
34+ - name : Run Cppcheck...
35+ shell : bash
36+ run : |
37+ cppcheck --quiet --language=c --platform=unix64 --max-ctu-depth=8 --cppcheck-build-dir=${{github.workspace}}/build --template="::{severity} file={file},line={line},col={column}::{message}" --enable=all --std=c89 -DPOSIX_ARCH_OTHER ${{github.workspace}}/src/
38+
39+ - name : Install Doxygen and LaTeX...
40+ shell : bash
41+ run : |
42+ sudo apt update
43+ sudo apt -y install doxygen-latex
44+
45+ - name : Create Doxygen config...
46+ shell : bash
47+ run : |
48+ mkdir ${{github.workspace}}/temp
49+ doxygen -g ${{github.workspace}}/temp/HeliOS.conf
50+ sed -i '/^$/d' ${{github.workspace}}/temp/HeliOS.conf
51+ sed -i '/^#.*/d' ${{github.workspace}}/temp/HeliOS.conf
52+ sed -i '/^ .*/d' ${{github.workspace}}/temp/HeliOS.conf
53+ sed -i 's/ \+/ /g' ${{github.workspace}}/temp/HeliOS.conf
54+ sed -i '/^PROJECT_NAME .*/d' ${{github.workspace}}/temp/HeliOS.conf
55+ echo 'PROJECT_NAME = HeliOS' >> ${{github.workspace}}/temp/HeliOS.conf
56+ sed -i '/^PROJECT_NUMBER .*/d' ${{github.workspace}}/temp/HeliOS.conf
57+ echo 'PROJECT_NUMBER = Kernel 0.3.5' >> ${{github.workspace}}/temp/HeliOS.conf
58+ sed -i '/^PROJECT_LOGO .*/d' ${{github.workspace}}/temp/HeliOS.conf
59+ echo 'PROJECT_LOGO = ${{github.workspace}}/temp/HeliOS_OG_Logo.png' >> ${{github.workspace}}/temp/HeliOS.conf
60+ sed -i '/^OUTPUT_DIRECTORY .*/d' ${{github.workspace}}/temp/HeliOS.conf
61+ echo 'OUTPUT_DIRECTORY = ${{github.workspace}}/temp' >> ${{github.workspace}}/temp/HeliOS.conf
62+ sed -i '/^OPTIMIZE_OUTPUT_FOR_C .*/d' ${{github.workspace}}/temp/HeliOS.conf
63+ echo 'OPTIMIZE_OUTPUT_FOR_C = YES' >> ${{github.workspace}}/temp/HeliOS.conf
64+ sed -i '/^GENERATE_HTML .*/d' ${{github.workspace}}/temp/HeliOS.conf
65+ echo 'GENERATE_HTML = NO' >> ${{github.workspace}}/temp/HeliOS.conf
66+ sed -i '/^GENERATE_LATEX .*/d' ${{github.workspace}}/temp/HeliOS.conf
67+ echo 'GENERATE_LATEX = YES' >> ${{github.workspace}}/temp/HeliOS.conf
68+ sed -i '/^COMPACT_LATEX .*/d' ${{github.workspace}}/temp/HeliOS.conf
69+ echo 'COMPACT_LATEX = YES' >> ${{github.workspace}}/temp/HeliOS.conf
70+ sed -i '/^GENERATE_RTF .*/d' ${{github.workspace}}/temp/HeliOS.conf
71+ echo 'GENERATE_RTF = NO' >> ${{github.workspace}}/temp/HeliOS.conf
72+ sed -i '/^GENERATE_MAN .*/d' ${{github.workspace}}/temp/HeliOS.conf
73+ echo 'GENERATE_MAN = NO' >> ${{github.workspace}}/temp/HeliOS.conf
74+ sed -i '/^GENERATE_XML .*/d' ${{github.workspace}}/temp/HeliOS.conf
75+ echo 'GENERATE_XML = NO' >> ${{github.workspace}}/temp/HeliOS.conf
76+ sed -i '/^REPEAT_BRIEF .*/d' ${{github.workspace}}/temp/HeliOS.conf
77+ echo 'REPEAT_BRIEF = NO' >> ${{github.workspace}}/temp/HeliOS.conf
78+ sed -i '/^FULL_PATH_NAMES .*/d' ${{github.workspace}}/temp/HeliOS.conf
79+ echo 'FULL_PATH_NAMES = NO' >> ${{github.workspace}}/temp/HeliOS.conf
80+ sed -i '/^INPUT .*/d' ${{github.workspace}}/temp/HeliOS.conf
81+ echo 'INPUT = ${{github.workspace}}/src/config.h ${{github.workspace}}/src/HeliOS.h' >> ${{github.workspace}}/temp/HeliOS.conf
82+ sed -i '/^FILE_PATTERNS .*/d' ${{github.workspace}}/temp/HeliOS.conf
83+ echo 'FILE_PATTERNS = *.h' >> ${{github.workspace}}/temp/HeliOS.conf
84+ sed -i '/^RECURSIVE .*/d' ${{github.workspace}}/temp/HeliOS.conf
85+ echo 'RECURSIVE = NO' >> ${{github.workspace}}/temp/HeliOS.conf
86+ sed -i '/^CLASS_DIAGRAMS .*/d' ${{github.workspace}}/temp/HeliOS.conf
87+ echo 'CLASS_DIAGRAMS = NO' >> ${{github.workspace}}/temp/HeliOS.conf
88+ sed -i '/^HAVE_DOT .*/d' ${{github.workspace}}/temp/HeliOS.conf
89+ echo 'HAVE_DOT = NO' >> ${{github.workspace}}/temp/HeliOS.conf
90+ sed -i '/^PROJECT_BRIEF .*/d' ${{github.workspace}}/temp/HeliOS.conf
91+ echo 'PROJECT_BRIEF = ' >> ${{github.workspace}}/temp/HeliOS.conf
92+ sed -i '/^SHOW_HEADERFILE .*/d' ${{github.workspace}}/temp/HeliOS.conf
93+ echo 'SHOW_HEADERFILE = NO' >> ${{github.workspace}}/temp/HeliOS.conf
94+ sed -i '/^SHOW_INCLUDE_FILES .*/d' ${{github.workspace}}/temp/HeliOS.conf
95+ echo 'SHOW_INCLUDE_FILES = NO' >> ${{github.workspace}}/temp/HeliOS.conf
96+ sed -i '/^QUIET .*/d' ${{github.workspace}}/temp/HeliOS.conf
97+ echo 'QUIET = NO' >> ${{github.workspace}}/temp/HeliOS.conf
98+ sed -i '/^WARNINGS .*/d' ${{github.workspace}}/temp/HeliOS.conf
99+ echo 'WARNINGS = YES' >> ${{github.workspace}}/temp/HeliOS.conf
100+ sed -i '/^WARN_LOGFILE .*/d' ${{github.workspace}}/temp/HeliOS.conf
101+ echo 'WARN_LOGFILE = ' >> ${{github.workspace}}/temp/HeliOS.conf
102+ sed -i '/^INLINE_SOURCES .*/d' ${{github.workspace}}/temp/HeliOS.conf
103+ echo 'INLINE_SOURCES = NO' >> ${{github.workspace}}/temp/HeliOS.conf
104+ sed -i '/^VERBATIM_HEADERS .*/d' ${{github.workspace}}/temp/HeliOS.conf
105+ echo 'VERBATIM_HEADERS = NO' >> ${{github.workspace}}/temp/HeliOS.conf
106+ sed -i '/^ENABLE_PREPROCESSING .*/d' ${{github.workspace}}/temp/HeliOS.conf
107+ echo 'ENABLE_PREPROCESSING = YES' >> ${{github.workspace}}/temp/HeliOS.conf
108+ sed -i '/^DEFINED .*/d' ${{github.workspace}}/temp/HeliOS.conf
109+ echo 'DEFINED = DOXYGEN_SHOULD_SKIP_THIS' >> ${{github.workspace}}/temp/HeliOS.conf
110+ sed -i '/^ABBREVIATE_BRIEF .*/d' ${{github.workspace}}/temp/HeliOS.conf
111+ echo 'ABBREVIATE_BRIEF = ' >> ${{github.workspace}}/temp/HeliOS.conf
112+ sort -o ${{github.workspace}}/temp/HeliOS.conf ${{github.workspace}}/temp/HeliOS.conf
113+ cat ${{github.workspace}}/temp/HeliOS.conf
114+
115+ - name : Resize HeliOS logo...
116+ shell : bash
117+ run : |
118+ convert -resize 300 ${{github.workspace}}/extras/HeliOS_OG_Logo.png ${{github.workspace}}/temp/HeliOS_OG_Logo.png
119+
120+ - name : Generate LaTeX...
121+ shell : bash
122+ run : |
123+ doxygen ${{github.workspace}}/temp/HeliOS.conf
124+ sed -i 's~^\\begin{center}\%~\\begin{center}\%\n\\includegraphics{HeliOS_OG_Logo.png}\\\\\n\\vspace*{1cm}~' ${{github.workspace}}/temp/latex/refman.tex
125+ sed -i 's~Generated by Doxygen [0123456789]*.[0123456789]*.[0123456789]*~HeliOS Developer\x27s Guide~' ${{github.workspace}}/temp/latex/refman.tex
126+ sed -i 's~Generated by Doxygen~(C)Copyright 2022 Manny Peterson~' ${{github.workspace}}/temp/latex/refman.tex
127+
128+ - name : Generate PDF from LaTeX...
129+ shell : bash
130+ run : |
131+ cd ${{github.workspace}}/temp/latex
132+ make
133+ cd ${{github.workspace}}
134+
135+ - name : Push PDF to repository...
136+ shell : bash
137+ run : |
138+ cp ${{github.workspace}}/temp/latex/refman.pdf ${{github.workspace}}/doc/HeliOS_Developers_Guide.pdf
139+ git config --global user.name 'Manny Peterson'
140+ git config --global user.email '12462046+MannyPeterson@users.noreply.github.com'
141+ git add ${{github.workspace}}/doc/HeliOS_Developers_Guide.pdf
142+ git commit -m "HeliOS CI Workflow"
143+ git push
0 commit comments