👷 add CI step for ICPC

This commit is contained in:
Niels Lohmann 2021-12-29 22:54:36 +01:00
parent f65ade0fa9
commit ab557ae28f
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 26 additions and 0 deletions

View File

@ -101,3 +101,13 @@ jobs:
run: cmake -S . -B build -DJSON_CI=On
- name: build
run: cmake --build build --target ci_test_${{ matrix.compiler }}_cxx${{ matrix.standard }}
ci_icpc:
runs-on: ubuntu-latest
container: ghcr.io/nlohmann/json-ci:v2.1.0
steps:
- uses: actions/checkout@v2
- name: cmake
run: cmake -S . -B build -DJSON_CI=On
- name: build
run: cmake --build build --target ci_icpc

View File

@ -835,6 +835,22 @@ foreach(COMPILER g++-4.8 g++-4.9 g++-5 g++-6 g++-7 g++-8 g++-9 g++-10 clang++-3.
unset(COMPILER_TOOL CACHE)
endforeach()
###############################################################################
# Intel C++ Compiler
###############################################################################
add_custom_target(ci_icpc
COMMAND source /opt/intel/oneapi/setvars.sh
COMMAND ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE=Debug -GNinja
-DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc
-DJSON_BuildTests=ON -DJSON_FastTests=ON
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_icpc
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_icpc
COMMAND cd ${PROJECT_BINARY_DIR}/build_icpc && ${CMAKE_CTEST_COMMAND} --parallel ${N} --exclude-regex "test-unicode" --output-on-failure
COMMENT "Compile and test with ICPC"
)
###############################################################################
# Clean up all generated files.
###############################################################################