File tree Expand file tree Collapse file tree 8 files changed +789
-9
lines changed
Expand file tree Collapse file tree 8 files changed +789
-9
lines changed Original file line number Diff line number Diff line change 11name : ci
22
33env :
4- CTEST_PARALLEL_LEVEL : 3
4+ CTEST_PARALLEL_LEVEL : 4
5+ CMAKE_BUILD_PARALLEL_LEVEL : 4
56 CMAKE_BUILD_TYPE : Release
67
78on :
3940 - name : configure examples
4041 run : cmake -S Examples -B Examples/build -Dnc4fortran_ROOT=${HOME}
4142 - name : build examples
42- run : cmake --build Examples/build --parallel
43+ run : cmake --build Examples/build
4344 - name : Test examples
4445 run : ctest --test-dir Examples/build -V
4546
7071 run : ctest --test-dir Examples/build -V
7172
7273
74+ linux-coverage :
75+ runs-on : ubuntu-latest
76+ timeout-minutes : 10
77+
78+ steps :
79+ - uses : actions/checkout@v2
80+ - uses : actions/setup-python@v2
81+ with :
82+ python-version : ' 3.x'
83+
84+ - name : install hdf5
85+ run : |
86+ sudo apt update -yq
87+ sudo apt install -yq --no-install-recommends libnetcdff-dev
88+
89+ - name : install Gcovr
90+ run : pip install gcovr
91+
92+ - run : cmake --preset coverage
93+ - run : cmake --build --preset coverage --parallel
94+
95+ - name : Code coverage
96+ run : cmake --build --preset run-coverage
97+
98+ - uses : actions/upload-artifact@v2
99+ with :
100+ name : coverage-report-html
101+ path : build-coverage/coverage/
102+
103+
73104 mac :
74105 needs : linux
75106 runs-on : macos-latest
Original file line number Diff line number Diff line change 99
1010jobs :
1111
12- meson :
12+ linux :
13+ timeout-minutes : 15
1314 runs-on : ubuntu-latest
1415 steps :
1516 - uses : actions/checkout@v2
2021 - run : pip install meson ninja
2122 - run : |
2223 sudo apt update -yq
23- sudo apt install -yq --no-install-recommends gfortran libnetcdff-dev
24+ sudo apt install -yq --no-install-recommends libnetcdff-dev
2425
2526 - run : meson setup build
2627 - run : meson compile -C build
Original file line number Diff line number Diff line change @@ -35,7 +35,11 @@ include(cmake/libraries.cmake)
3535# --- find NetCDF4
3636
3737if (NOT netcdf_external)
38- find_package (NetCDF COMPONENTS Fortran)
38+ if (autobuild)
39+ find_package (NetCDF COMPONENTS Fortran)
40+ else ()
41+ find_package (NetCDF COMPONENTS Fortran REQUIRED)
42+ endif ()
3943endif ()
4044
4145if (NOT NetCDF_FOUND OR netcdf_external)
Original file line number Diff line number Diff line change 1313 "displayName" : " build all libraries" ,
1414 "description" : " Build all external libraries without searching for existing libraries." ,
1515 "cacheVariables" : {
16- "netcdf_external" : " on"
16+ "netcdf_external" : true
17+ }
18+ },
19+ {
20+ "name" : " coverage" ,
21+ "binaryDir" : " ${sourceDir}/build-coverage" ,
22+ "displayName" : " Code Coverage" ,
23+ "description" : " Build with code coverage enabled." ,
24+ "cacheVariables" : {
25+ "CMAKE_BUILD_TYPE" : " Debug" ,
26+ "ENABLE_COVERAGE" : true ,
27+ "autobuild" : false
1728 }
1829},
1930{
3546 "name" : " debug" ,
3647 "configurePreset" : " multi" ,
3748 "configuration" : " Debug"
49+ },
50+ {
51+ "name" : " coverage" ,
52+ "configurePreset" : " coverage"
53+ },
54+ {
55+ "name" : " run-coverage" ,
56+ "configurePreset" : " coverage" ,
57+ "targets" : " coverage"
3858 }
3959],
4060"testPresets" : [
You can’t perform that action at this time.
0 commit comments