@@ -291,26 +291,8 @@ jobs:
291
291
cd buildRelease
292
292
ctest -C Release --output-on-failure
293
293
294
- quodona :
295
- name : Run Qodana
296
- needs : compile
297
- runs-on : ubuntu-latest
298
- continue-on-error : true
299
-
300
- steps :
301
- - name : Checkout LibRapid
302
- uses : actions/checkout@v3
303
- with :
304
- submodules : recursive
305
-
306
- # - name: Qodana Scan
307
- # uses: JetBrains/qodana-action@main
308
- # env:
309
- # QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
310
-
311
294
build-docs :
312
295
name : Build Documentation Locally
313
- needs : [ compile ]
314
296
runs-on : ubuntu-latest
315
297
316
298
steps :
@@ -399,25 +381,243 @@ jobs:
399
381
path : docs/build/**
400
382
401
383
run-benchmarks :
402
- name : Run Benchmarks
403
- needs : [ compile ]
384
+ name : Run Benchmarks on ${{ matrix.os }} with ${{ matrix.cxx }}
385
+ needs : [ compile, build-docs ]
386
+ runs-on : ${{ matrix.os }}
387
+
388
+ strategy :
389
+ fail-fast : false
390
+ matrix :
391
+ include :
392
+ - os : ubuntu-latest
393
+ cc : ../../llvm/bin/clang
394
+ cxx : ../../llvm/bin/clang++
395
+ clangVer : " 15.0"
396
+ smallArrays : ON
397
+ pretty : " LibRapid_Ubuntu_Clang_OptimiseSmallArrays"
398
+
399
+ - os : ubuntu-latest
400
+ cc : ../../llvm/bin/clang
401
+ cxx : ../../llvm/bin/clang++
402
+ clangVer : " 15.0"
403
+ smallArrays : OFF
404
+ pretty : " LibRapid_Ubuntu_Clang"
405
+
406
+ - os : ubuntu-latest
407
+ cc : gcc-11
408
+ cxx : g++-11
409
+ smallArrays : ON
410
+ pretty : " LibRapid_Ubuntu_GCC_OptimiseSmallArrays"
411
+
412
+ - os : ubuntu-latest
413
+ cc : gcc-11
414
+ cxx : g++-11
415
+ smallArrays : OFF
416
+ pretty : " LibRapid_Ubuntu_GCC"
417
+
418
+ - os : macos-latest
419
+ cc : ../../llvm/bin/clang
420
+ cxx : ../../llvm/bin/clang++
421
+ clangVer : " 15.0"
422
+ smallArrays : ON
423
+ pretty : " LibRapid_MacOS_Clang_OptimiseSmallArrays"
424
+
425
+ - os : macos-latest
426
+ cc : ../../llvm/bin/clang
427
+ cxx : ../../llvm/bin/clang++
428
+ clangVer : " 15.0"
429
+ smallArrays : OFF
430
+ pretty : " LibRapid_MacOS_Clang"
431
+
432
+ - os : macos-latest
433
+ cc : gcc-11
434
+ cxx : g++-11
435
+ smallArrays : ON
436
+ pretty : " LibRapid_MacOS_GCC_OptimiseSmallArrays"
437
+
438
+ - os : macos-latest
439
+ cc : gcc-11
440
+ cxx : g++-11
441
+ smallArrays : OFF
442
+ pretty : " LibRapid_MacOS_GCC"
443
+
444
+ - os : windows-latest
445
+ cc : ../../llvm/clang
446
+ cxx : ../../llvm/clang++
447
+ clangVer : " 15.0"
448
+ smallArrays : ON
449
+ pretty : " LibRapid_Windows_Clang_OptimiseSmallArrays"
450
+
451
+ - os : windows-latest
452
+ cc : ../../llvm/clang
453
+ cxx : ../../llvm/clang++
454
+ clangVer : " 15.0"
455
+ smallArrays : OFF
456
+ pretty : " LibRapid_Windows_Clang"
457
+
458
+ - os : windows-latest
459
+ cc : msvc
460
+ cxx : msvc
461
+ smallArrays : ON
462
+ pretty : " LibRapid_Windows_MSVC_OptimiseSmallArrays"
463
+
464
+ - os : windows-latest
465
+ cc : msvc
466
+ cxx : msvc
467
+ smallArrays : OFF
468
+ pretty : " LibRapid_Windows_MSVC"
469
+
470
+ steps :
471
+ - name : Install Clang
472
+ if : matrix.clangVer != null
473
+ uses : KyleMayes/install-llvm-action@v1
474
+ with :
475
+ version : ${{ matrix.clangVer }}
476
+ directory : " ./llvm"
477
+ env : on
478
+
479
+ - name : Install XCode
480
+ if : matrix.os == 'macos-latest'
481
+ uses :
maxim-lobanov/[email protected]
482
+
483
+ - name : Clone Benchmark Repository
484
+ run : |
485
+ git clone https://github.com/LibRapid/BenchmarksCPP.git --recursive
486
+
487
+ - name : Update LibRapid Submodule
488
+ run : |
489
+ cd BenchmarksCPP
490
+ cd vendor/librapid
491
+ git checkout ${{ github.head_ref || github.ref_name }} -- || git checkout ${{ github.ref }}
492
+ git pull
493
+ git submodule update --init --recursive
494
+
495
+ - name : Install Python
496
+ uses : actions/setup-python@v2
497
+ with :
498
+ python-version : " 3.9"
499
+
500
+ - name : Install Requirements
501
+ run : |
502
+ pip install --upgrade pip
503
+ cd BenchmarksCPP
504
+ pip install -r requirements.txt
505
+
506
+ - name : Compile Benchmarks
507
+ run : |
508
+ cd BenchmarksCPP
509
+ mkdir build
510
+ cd build
511
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DUSING_GITHUB_ACTIONS=ON -DLIBRAPID_OPTIMISE_SMALL_ARRAYS=${{ matrix.smallArrays }}
512
+ cmake --build . --config Release
513
+ env :
514
+ CC : ${{ matrix.cc }}
515
+ CXX : ${{ matrix.cxx }}
516
+
517
+ # On Windows, the generated executable is in "build/Release"
518
+ - name : Run Benchmarks
519
+ if : matrix.os == 'windows-latest'
520
+ run : |
521
+ cd BenchmarksCPP/build/Release
522
+ ./BenchmarksCPP.exe
523
+
524
+ # On Unix systems, the generated executable is in "build"
525
+ - name : Run Benchmarks
526
+ if : matrix.os != 'windows-latest'
527
+ run : |
528
+ cd BenchmarksCPP/build
529
+ ./BenchmarksCPP
530
+
531
+ - name : Generate Benchmark Graphs
532
+ if : matrix.os == 'windows-latest'
533
+ run : |
534
+ cd BenchmarksCPP/scripts
535
+ python dataProcessor.py --directory ../build/Release --output ../../${{ matrix.pretty }} --relative Eigen --verbose
536
+
537
+ - name : Generate Benchmark Graphs
538
+ if : matrix.os != 'windows-latest'
539
+ run : |
540
+ cd BenchmarksCPP/scripts
541
+ python dataProcessor.py --directory ../build --output ../../${{ matrix.pretty }} --relative Eigen --verbose
542
+
543
+ - name : Upload Intermediate Benchmark Results
544
+ uses : actions/upload-artifact@v3
545
+ with :
546
+ name : ${{ matrix.pretty }}
547
+ path : ${{ matrix.pretty }}
548
+
549
+ upload-benchmarks :
550
+ name : Upload Benchmark Results
551
+ needs : run-benchmarks
404
552
runs-on : ubuntu-latest
405
553
steps :
406
- - name : Create a Test File
554
+ - name : Checkout LibRapid
555
+ uses : actions/checkout@v3
556
+ with :
557
+ submodules : recursive
558
+
559
+
560
+ - name : Install Python
561
+ uses : actions/setup-python@v2
562
+ with :
563
+ python-version : " 3.9"
564
+
565
+ - name : Download Intermediate Benchmark Results
566
+ uses : actions/download-artifact@v2
567
+ with :
568
+ path : IntermediateBenchmarkResults
569
+
570
+ - name : Tree IntermediateBenchmarkResults
407
571
run : |
408
- mkdir BENCH_RESULTS
409
- touch BENCH_RESULTS/hello.txt
410
- echo "Hello, World!" > BENCH_RESULTS/hello.txt
572
+ cd IntermediateBenchmarkResults
573
+ tree
574
+
575
+ - name : Upload Intermediate Benchmark Results
576
+ uses : actions/upload-artifact@v3
577
+ with :
578
+ name : IntermediateBenchmarkResults
579
+ path : IntermediateBenchmarkResults
411
580
412
- - name : Upload Benchmark Results
581
+ - name : Auto-Generate Benchmark Documentation
582
+ run : |
583
+ git clone https://github.com/LibRapid/BenchmarksCPP.git
584
+ cd BenchmarksCPP
585
+ pip install --upgrade pip
586
+ pip install -r requirements.txt
587
+ cd scripts
588
+ python docGenerator.py --input ../../IntermediateBenchmarkResults --output ../../BenchmarkDocumentation
589
+
590
+ - name : Tree BenchmarkDocumentation
591
+ run : |
592
+ cd BenchmarkDocumentation
593
+ tree
594
+
595
+ - name : Upload Benchmark Documentation
413
596
uses : actions/upload-artifact@v3
414
597
with :
415
- name : benchmark-results-for-${{ github.sha }}
416
- path : BENCH_RESULTS/
598
+ name : LibRapid_Benchmark_SHA_${{ github.sha }}
599
+ path : BenchmarkDocumentation
600
+
601
+ quodona :
602
+ name : Run Qodana
603
+ needs : [ compile, upload-benchmarks ]
604
+ runs-on : ubuntu-latest
605
+ continue-on-error : true
606
+
607
+ steps :
608
+ - name : Checkout LibRapid
609
+ uses : actions/checkout@v3
610
+ with :
611
+ submodules : recursive
612
+
613
+ # - name: Qodana Scan
614
+ # uses: JetBrains/qodana-action@main
615
+ # env:
616
+ # QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
417
617
418
618
code-coverage :
419
619
name : Code Coverage
420
- needs : [ compile ]
620
+ needs : [ compile, upload-benchmarks ]
421
621
runs-on : ubuntu-latest
422
622
continue-on-error : true
423
623
@@ -460,7 +660,7 @@ jobs:
460
660
461
661
trigger-docs :
462
662
name : Trigger Documentation Build
463
- needs : [ run-benchmarks , quodona, build-docs ]
663
+ needs : [ compile, build-docs , quodona, code-coverage ]
464
664
runs-on : ubuntu-latest
465
665
if : github.event_name != 'pull_request'
466
666
steps :
@@ -478,7 +678,7 @@ jobs:
478
678
479
679
success :
480
680
name : Success
481
- needs : [ trigger-docs ]
681
+ needs : trigger-docs
482
682
runs-on : ubuntu-latest
483
683
steps :
484
684
- name : Print Success
0 commit comments