forked from FreeRTOS/CI-CD-Github-Actions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
63 lines (61 loc) · 2.41 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: 'doxygen'
description: 'CI doxygen build check'
inputs:
path:
description: 'Path to repository folder to run doxygen generation in.'
required: false
default: ./
libs_parent_dir_path:
description: 'Comma-separated list of parent directory path of libraries. Path should be relative to repository root.'
required: false
default: ./
doxygen_link:
description: 'Download link for doxygen tar.gz (default version 1.9.6).'
required: false
default: "https://sourceforge.net/projects/doxygen/files/rel-1.9.6/doxygen-1.9.6.linux.bin.tar.gz"
doxygen_dependencies:
description: 'Space-separated dependencies for doxygen.'
required: false
default: libclang-11-dev libclang-cpp11 graphviz
generate_zip:
description: 'Flag to indicate whether a ZIP output should be created.'
required: false
default: 'false'
runs:
using: "composite"
steps:
- env:
bashPass: \033[32;1mPASSED -
bashInfo: \033[33;1mINFO -
bashFail: \033[31;1mFAILED -
bashEnd: \033[0m
stepName: Install Doxygen
name: ${{ env.stepName }}
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
wget -qO- "${{ inputs.doxygen_link }}" | sudo tar --strip-components=1 -xz -C /usr/local
sudo apt-get install -y ${{ inputs.doxygen_dependencies }}
echo -e "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
- env:
bashPass: \033[32;1mPASSED -
bashInfo: \033[33;1mINFO -
bashFail: \033[31;1mFAILED -
bashEnd: \033[0m
stepName: Verify Doxygen build and Generate ZIP (if specified)
name: ${{ env.stepName }}
working-directory: ${{ inputs.path }}
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
if [[ ${{ inputs.generate_zip }} == "true" ]]; then
python3 $GITHUB_ACTION_PATH/generate_doxygen.py --root ./ --library-directories ${{ inputs.libs_parent_dir_path }} --zip
else
doxygen docs/doxygen/config.doxyfile 2>&1 | tee doxyoutput.txt
if [[ "$(wc -c < doxyoutput.txt | bc)" = "0" ]]; then exit 0; else exit 1; fi
fi
echo -e "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"