@@ -335,7 +335,7 @@ jobs:
335
335
- name : Upload HTML report
336
336
uses : actions/upload-artifact@v2
337
337
with :
338
- name : coverage
338
+ name : Coverage report
339
339
path : coverage
340
340
- name : Upload to Coveralls
341
341
uses : coverallsapp/github-action@master
@@ -379,3 +379,71 @@ jobs:
379
379
CXX : clang++-10
380
380
- name : Check
381
381
run : cmake --build . -- -k 0
382
+
383
+ amalgamate-h :
384
+ needs : gcc
385
+ name : Amalgamate ArduinoJson.h
386
+ runs-on : ubuntu-20.04
387
+ steps :
388
+ - name : Checkout
389
+ uses : actions/checkout@v2
390
+ - name : Amalgamate
391
+ id : amalgamate
392
+ run : |
393
+ if [[ $GITHUB_REF == refs/tags/* ]]; then
394
+ VERSION=${GITHUB_REF#refs/tags/}
395
+ else
396
+ VERSION=${GITHUB_SHA::7}
397
+ fi
398
+ INPUT=src/ArduinoJson.h
399
+ OUTPUT=ArduinoJson-$VERSION.h
400
+ extras/scripts/build-single-header.sh "$INPUT" "$OUTPUT"
401
+ echo ::set-output name=filename::${OUTPUT}
402
+ - name : Smoke test
403
+ run : |
404
+ g++ -x c++ - <<END
405
+ #include "${{ steps.amalgamate.outputs.filename }}"
406
+ int main() {
407
+ StaticJsonDocument<300> doc;
408
+ deserializeJson(doc, "{}");
409
+ }
410
+ END
411
+ - name : Upload artifact
412
+ uses : actions/upload-artifact@v2
413
+ with :
414
+ name : Single headers
415
+ path : ${{ steps.amalgamate.outputs.filename }}
416
+
417
+ amalgamate-hpp :
418
+ needs : gcc
419
+ name : Amalgamate ArduinoJson.hpp
420
+ runs-on : ubuntu-20.04
421
+ steps :
422
+ - name : Checkout
423
+ uses : actions/checkout@v2
424
+ - name : Amalgamate
425
+ id : amalgamate
426
+ run : |
427
+ if [[ $GITHUB_REF == refs/tags/* ]]; then
428
+ VERSION=${GITHUB_REF#refs/tags/}
429
+ else
430
+ VERSION=${GITHUB_SHA::7}
431
+ fi
432
+ INPUT=src/ArduinoJson.hpp
433
+ OUTPUT=ArduinoJson-$VERSION.hpp
434
+ extras/scripts/build-single-header.sh "$INPUT" "$OUTPUT"
435
+ echo ::set-output name=filename::${OUTPUT}
436
+ - name : Smoke test
437
+ run : |
438
+ g++ -x c++ - <<END
439
+ #include "${{ steps.amalgamate.outputs.filename }}"
440
+ int main() {
441
+ ArduinoJson::StaticJsonDocument<300> doc;
442
+ deserializeJson(doc, "{}");
443
+ }
444
+ END
445
+ - name : Upload artifact
446
+ uses : actions/upload-artifact@v2
447
+ with :
448
+ name : Single headers
449
+ path : ${{ steps.amalgamate.outputs.filename }}
0 commit comments