7
7
8
8
env :
9
9
SIMULATION : native
10
+ REPO_NAME : ${{ github.event.repository.name }}
10
11
11
12
jobs :
12
- # Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
13
+ # Checks for duplicate actions. Skips push actions if there is a matching or
14
+ # duplicate pull-request action.
13
15
checks-for-duplicates :
14
16
runs-on : ubuntu-latest
15
17
# Map a step output to a job output
24
26
do_not_skip : ' ["push", "workflow_dispatch", "schedule"]'
25
27
26
28
build-docs :
27
- # Continue if checks-for-duplicates found no duplicates. Always runs for pull-requests.
29
+ # Continue if checks-for-duplicates found no duplicates. Always runs for
30
+ # pull-requests.
28
31
needs : checks-for-duplicates
29
32
if : ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
30
33
name : cFE Documentation
92
95
cp ./cfe/cmake/Makefile.sample Makefile
93
96
cp -r ./cfe/cmake/sample_defs sample_defs
94
97
95
- # Setup the build system
98
+ # Setup the build system
96
99
- name : Make Prep
97
100
run : make prep
98
101
@@ -126,21 +129,34 @@ jobs:
126
129
exit -1
127
130
fi
128
131
129
- pdf-usersguide :
132
+ - name : Cache cFS Build Environment for usersguide
133
+ id : cache-bundle
134
+ uses : actions/cache@v2
135
+ with :
136
+ path : /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/*
137
+ key : usersguide-buildnum-${{ github.run_number }}
138
+
139
+ deploy-usersguide :
130
140
needs : build-usersguide
131
141
# Name the Job
132
- name : PDF Users Guide
142
+ name : Deploy Users Guide
133
143
# Set the type of machine to run on
134
144
runs-on : ubuntu-18.04
135
145
136
146
steps :
137
-
138
- - name : PDF generation installs
147
+ - name : Install Dependencies
139
148
if : ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
140
149
run : |
141
150
sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
142
151
143
- - name : PDF generation
152
+ - name : Cache cFS Build Environment for usersguide
153
+ id : cache-bundle
154
+ uses : actions/cache@v2
155
+ with :
156
+ path : /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/*
157
+ key : usersguide-buildnum-${{ github.run_number }}
158
+
159
+ - name : Generate PDF
144
160
if : ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
145
161
run : |
146
162
set -x
@@ -151,7 +167,7 @@ jobs:
151
167
# Could add pandoc and convert to github markdown
152
168
# pandoc CFE_Users_Guide.pdf -t gfm
153
169
154
- - name : Deploy
170
+ - name : Deploy to GitHub
155
171
if : ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
156
172
uses : JamesIves/github-pages-deploy-action@3.7.1
157
173
with :
@@ -164,9 +180,7 @@ jobs:
164
180
build-osalguide :
165
181
needs : checks-for-duplicates
166
182
if : ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
167
- # Name the Job
168
183
name : Osal Guide
169
- # Set the type of machine to run on
170
184
runs-on : ubuntu-18.04
171
185
172
186
steps :
@@ -183,7 +197,7 @@ jobs:
183
197
cp ./cfe/cmake/Makefile.sample Makefile
184
198
cp -r ./cfe/cmake/sample_defs sample_defs
185
199
186
- # Setup the build system
200
+ # Setup the build system
187
201
- name : Make Prep
188
202
run : make prep
189
203
@@ -204,33 +218,46 @@ jobs:
204
218
make_osalguide_stderr.txt
205
219
osal-apiguide-warnings.log
206
220
207
- - name : Error Check
221
+ - name : Check for Errors
208
222
run : |
209
223
if [[ -s make_osalguide_stderr.txt ]]; then
210
224
cat make_osalguide_stderr.txt
211
225
exit -1
212
226
fi
213
227
214
- - name : Warning Check
228
+ - name : Check for Warnings
215
229
run : |
216
230
if [[ -s osal-apiguide-warnings.log ]]; then
217
231
cat osal-apiguide-warnings.log
218
232
exit -1
219
233
fi
220
234
221
- pdf-osalguide :
235
+ - name : Cache cFS Build Environment for osalguide
236
+ id : cache-bundle
237
+ uses : actions/cache@v2
238
+ with :
239
+ path : /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/*
240
+ key : osalguide-buildnum-${{ github.run_number }}
241
+
242
+ deploy-osalguide :
222
243
needs : build-osalguide
223
- # Name the Job
224
- name : PDF Osal Guide
225
- # Set the type of machine to run on
244
+ name : Deploy Osal Guide
226
245
runs-on : ubuntu-18.04
246
+
227
247
steps :
228
- - name : PDF generation installs
248
+ - name : Install Dependencies
229
249
if : ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
230
250
run : |
231
251
sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
232
252
233
- - name : PDF generation
253
+ - name : Cache cFS Build Environment for osalguide
254
+ id : cache-bundle
255
+ uses : actions/cache@v2
256
+ with :
257
+ path : /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/*
258
+ key : osalguide-buildnum-${{ github.run_number }}
259
+
260
+ - name : Generate PDF
234
261
if : ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
235
262
run : |
236
263
mkdir deploy
@@ -240,12 +267,12 @@ jobs:
240
267
# Could add pandoc and convert to github markdown
241
268
# pandoc CFE_Users_Guide.pdf -t gfm
242
269
243
- - name : Deploy
270
+ - name : Deploy to GitHub
244
271
if : ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
245
272
uses : JamesIves/github-pages-deploy-action@3.7.1
246
273
with :
247
274
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
248
275
BRANCH : gh-pages
249
276
FOLDER : deploy
250
277
CLEAN : false
251
- SINGLE_COMMIT : true
278
+ SINGLE_COMMIT : true
0 commit comments