Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/test_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ jobs:
testpython:
name: Test C++
runs-on: ubuntu-latest
container: ghcr.io/deepmodeling/deepmd-kit-test-cc:latest
steps:
- uses: actions/checkout@master
- run: source/install/test_cc.sh
- run: source/install/test_cc_local.sh
env:
tensorflow_root: /usr/local
- run: source/install/codecov.sh
2 changes: 1 addition & 1 deletion source/api_cc/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ set(opname "deepmd_op")
set(OP_BASE_DIR ${CMAKE_SOURCE_DIR}/../../op)
# file(GLOB OP_SRC ${OP_BASE_DIR}/*.cc)
file(GLOB OP_SRC ${OP_BASE_DIR}/custom_op.cc ${OP_BASE_DIR}/prod_force.cc ${OP_BASE_DIR}/prod_virial.cc ${OP_BASE_DIR}/descrpt.cc ${OP_BASE_DIR}/descrpt_se_a_ef.cc ${OP_BASE_DIR}/descrpt_se_a_ef.cc ${OP_BASE_DIR}/descrpt_se_a_ef_para.cc ${OP_BASE_DIR}/descrpt_se_a_ef_vert.cc ${OP_BASE_DIR}/pair_tab.cc ${OP_BASE_DIR}/prod_force_multi_device.cc ${OP_BASE_DIR}/prod_virial_multi_device.cc ${OP_BASE_DIR}/soft_min.cc ${OP_BASE_DIR}/soft_min_force.cc ${OP_BASE_DIR}/soft_min_virial.cc ${OP_BASE_DIR}/ewald_recp.cc ${OP_BASE_DIR}/gelu_multi_device.cc ${OP_BASE_DIR}/map_aparam.cc ${OP_BASE_DIR}/neighbor_stat.cc ${OP_BASE_DIR}/unaggregated_grad.cc ${OP_BASE_DIR}/tabulate_multi_device.cc ${OP_BASE_DIR}/prod_env_mat_multi_device.cc)
add_library(${opname} SHARED ${OP_SRC})

list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../../cmake/)
find_package(tensorflow REQUIRED)
Expand All @@ -46,6 +45,7 @@ else()
set (CMAKE_CXX_STANDARD 11)
endif()
include_directories(${TensorFlow_INCLUDE_DIRS})
add_library(${opname} SHARED ${OP_SRC})

find_package(Threads)
# find openmp
Expand Down
12 changes: 12 additions & 0 deletions source/install/codecov.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e

#------------------

SCRIPT_PATH=$(dirname $(realpath -s $0))

#------------------
# upload to codecov
cd ${SCRIPT_PATH}
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"

4 changes: 0 additions & 4 deletions source/install/test_cc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,4 @@ make install
cd ${SCRIPT_PATH}/../api_cc/tests
${INSTALL_PREFIX}/bin/runUnitTests

#------------------
# upload to codecov
cd ${SCRIPT_PATH}
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"