Skip to content

Commit 6c1d52b

Browse files
committed
merge rc and stable ci files into compile-examples
1 parent d60d0e1 commit 6c1d52b

File tree

4 files changed

+37
-167
lines changed

4 files changed

+37
-167
lines changed

.github/workflows/compile-examples.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- "examples/**"
88
- "src/**"
99
push:
10+
tags:
11+
- 'v*'
12+
branches:
13+
- 'master'
1014
paths:
1115
- ".github/workflows/compile-examples.yml"
1216
- "examples/**"
@@ -172,13 +176,16 @@ jobs:
172176
needs: [build-pio, build-arduino]
173177

174178
steps:
179+
- name: Checkout
180+
uses: actions/checkout@v3
181+
175182
- name: install doc deps
176183
run: sudo apt-get install --yes doxygen graphviz latexmk texlive-latex-extra
177184

178185
- name: prepare for building docs
179186
run: |
180-
mkdir doc/html
181-
mkdir doc/latex
187+
mkdir -p doc/html
188+
mkdir -p doc/latex
182189
183190
- name: build documentation
184191
run: bash .scripts/doxygen_multilang.sh
@@ -201,8 +208,9 @@ jobs:
201208
project_name: 'LedController'
202209
max_timeout_sec: '600'
203210

204-
- uses: "marvinpinto/action-automatic-releases@latest"
211+
- name: update latest release
205212
if: ${{ github.ref }} == 'master'
213+
uses: "marvinpinto/action-automatic-releases@latest"
206214
with:
207215
repo_token: "${{ secrets.GITHUB_TOKEN }}"
208216
automatic_release_tag: "latest"
@@ -213,9 +221,21 @@ jobs:
213221
latest.zip
214222
refman_english.pdf
215223
refman_german.pdf
224+
225+
- name: update stable release
226+
if: startsWith(${{github.ref}}, 'v') && ${{github.ref_type}} == 'tag'
227+
uses: "marvinpinto/action-automatic-releases@latest"
228+
with:
229+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
230+
prerelease: endsWith( ${{github.ref}}, 'rc' )
231+
files: |
232+
License
233+
release.zip
234+
refman_english.pdf
235+
refman_german.pdf
216236
217237
- name: Deploy to pages
218-
if: "contains(github.event.head_commit.message, '--build-docs')"
238+
if: contains(${{github.event.head_commit.message}}, '--build-docs')
219239
uses: s0/git-publish-subdir-action@master
220240
env:
221241
REPO: self

.github/workflows/rc.yaml

Lines changed: 0 additions & 78 deletions
This file was deleted.

.github/workflows/stable.yaml

Lines changed: 0 additions & 79 deletions
This file was deleted.

.scripts/doxygen_multilang.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ build_lang(){
3636

3737
#run doxygen
3838
doxygen Doxyfile.$lang
39+
if [ "$?" -ne 0 ];
40+
then
41+
rm Doxyfile.$lang
42+
return 1
43+
fi
3944

4045
#build pdf file
4146
cd doc/latex/$lang/
@@ -47,20 +52,22 @@ build_lang(){
4752

4853
#remove lang specific doxygen file
4954
rm Doxyfile.$lang
55+
56+
return 0
5057

5158
}
5259

5360
#build as much language in parallel as possible
5461
for lang in "${OUTPUT_LANGUAGES[@]}"
5562
do
56-
#this limits the amount of parallel builds
57-
((i=i%MAX_CORES)); ((i++==0)) && wait
58-
5963
#this calls a new subroutine for that language in the array
60-
build_lang $lang &
64+
build_lang $lang
65+
if [ "$?" -ne 0 ];
66+
then
67+
exit 1
68+
fi
6169
done
62-
wait
6370

6471
#create new root index file
65-
rm $DOXYGEN_BASE/html/index.html
72+
rm -f $DOXYGEN_BASE/html/index.html
6673
cp $ROOT_INDEX_LOCATION/index.html $DOXYGEN_BASE/html/

0 commit comments

Comments
 (0)