run Test CUDA in container #3918
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
pull_request: | |
name: Test C++ | |
jobs: | |
testcc: | |
name: Test C++ | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Setup MPI | |
uses: mpi4py/setup-mpi@v1 | |
with: | |
mpi: mpich | |
- uses: lukka/get-cmake@latest | |
- run: python -m pip install tensorflow | |
- run: source/install/test_cc_local.sh | |
env: | |
OMP_NUM_THREADS: 1 | |
TF_INTRA_OP_PARALLELISM_THREADS: 1 | |
TF_INTER_OP_PARALLELISM_THREADS: 1 | |
LMP_CXX11_ABI_0: 1 | |
CMAKE_GENERATOR: Ninja | |
# test lammps | |
# ASE issue: https://gitlab.com/ase/ase/-/merge_requests/2843 | |
# TODO: remove ase version when ase has new release | |
- run: | | |
python -m pip install -U pip | |
python -m pip install -e .[cpu,test,lmp] "ase @ https://github.com/rosswhitfield/ase/archive/edd03571aff6944b77b4a4b055239f3c3e4eeb66.zip" | |
env: | |
DP_BUILD_TESTING: 1 | |
- run: pytest --cov=deepmd source/lmp/tests | |
env: | |
OMP_NUM_THREADS: 1 | |
TF_INTRA_OP_PARALLELISM_THREADS: 1 | |
TF_INTER_OP_PARALLELISM_THREADS: 1 | |
LAMMPS_PLUGIN_PATH: ${{ github.workspace }}/dp_test/lib/deepmd_lmp | |
LD_LIBRARY_PATH: ${{ github.workspace }}/dp_test/lib | |
# test ipi | |
- run: pytest --cov=deepmd source/ipi/tests | |
env: | |
OMP_NUM_THREADS: 1 | |
TF_INTRA_OP_PARALLELISM_THREADS: 1 | |
TF_INTER_OP_PARALLELISM_THREADS: 1 | |
PATH: ${{ github.workspace }}/dp_test/bin:$PATH | |
LD_LIBRARY_PATH: ${{ github.workspace }}/dp_test/lib | |
- uses: codecov/codecov-action@v3 | |
with: | |
gcov: true | |
pass: | |
name: Pass testing C++ | |
needs: [testcc] | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |