1717 runs-on : ubuntu-22.04
1818 strategy :
1919 matrix :
20- check_memleak : [true, false]
20+ include :
21+ - check_memleak : true
22+ enable_tensorflow : true
23+ enable_pytorch : true
24+ enable_paddle : false
25+ - check_memleak : true
26+ enable_tensorflow : false
27+ enable_pytorch : false
28+ enable_paddle : true
29+ - check_memleak : false
30+ enable_tensorflow : true
31+ enable_pytorch : true
32+ enable_paddle : false
33+ - check_memleak : false
34+ enable_tensorflow : false
35+ enable_pytorch : false
36+ enable_paddle : true
2137 steps :
22- - uses : actions/checkout@v5
38+ - uses : actions/checkout@v6
2339 - uses : actions/setup-python@v6
2440 with :
2541 python-version : ' 3.11'
2844 - run : python -m pip install uv
2945 - name : Install Python dependencies
3046 run : |
31- source/install/uv_with_retry.sh pip install --system tensorflow-cpu~=2.18.0 jax==0.5.0
47+ source/install/uv_with_retry.sh pip install --system --group pin_tensorflow_cpu --group pin_pytorch_cpu --group pin_jax --torch-backend cpu
3248 export TENSORFLOW_ROOT=$(python -c 'import importlib.util,pathlib;print(pathlib.Path(importlib.util.find_spec("tensorflow").origin).parent)')
3349 source/install/uv_with_retry.sh pip install --system -e .[cpu,test,lmp,jax] mpi4py mpich
34- source/install/uv_with_retry.sh pip install --system 'torch==2.8.*' --index-url https://download.pytorch.org/whl/cpu
3550 - name : Convert models
3651 run : source/tests/infer/convert-models.sh
3752 # https://github.com/actions/runner-images/issues/9491
@@ -47,31 +62,41 @@ jobs:
4762 CMAKE_GENERATOR: Ninja
4863 CXXFLAGS: ${{ matrix.check_memleak && '-fsanitize=leak' || '' }}
4964 LSAN_OPTIONS: suppressions=${{ github.workspace }}/.github/workflows/suppr.txt
65+ ENABLE_TENSORFLOW: ${{ matrix.enable_tensorflow && 'TRUE' || 'FALSE' }}
66+ ENABLE_PYTORCH: ${{ matrix.enable_pytorch && 'TRUE' || 'FALSE' }}
67+ ENABLE_PADDLE: ${{ matrix.enable_paddle && 'TRUE' || 'FALSE' }}
5068 # test lammps
5169 - run : |
5270 cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/paddle/lib/*.so ${{ github.workspace }}/dp_test/lib/
5371 cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/onednn/lib/* ${{ github.workspace }}/dp_test/lib/
5472 cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/mklml/lib/* ${{ github.workspace }}/dp_test/lib/
73+ if: matrix.enable_paddle
74+ - run : |
5575 export LD_LIBRARY_PATH=${{ github.workspace }}/dp_test/lib:$LD_LIBRARY_PATH
5676 pytest --cov=deepmd source/lmp/tests
5777 env:
5878 OMP_NUM_THREADS: 1
5979 TF_INTRA_OP_PARALLELISM_THREADS: 1
6080 TF_INTER_OP_PARALLELISM_THREADS: 1
6181 LAMMPS_PLUGIN_PATH: ${{ github.workspace }}/dp_test/lib/deepmd_lmp
82+ ENABLE_TENSORFLOW: ${{ matrix.enable_tensorflow && '1' || '0' }}
83+ ENABLE_PYTORCH: ${{ matrix.enable_pytorch && '1' || '0' }}
84+ ENABLE_JAX: ${{ matrix.enable_tensorflow && '1' || '0' }}
85+ ENABLE_PADDLE: ${{ matrix.enable_paddle && '1' || '0' }}
6286 if: ${{ !matrix.check_memleak }}
6387 # test ipi
6488 - run : |
6589 export PATH=${{ github.workspace }}/dp_test/bin:$PATH
66- cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/paddle/lib/*.so ${{ github.workspace }}/dp_test/lib/
67- cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/onednn/lib/* ${{ github.workspace }}/dp_test/lib/
68- cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/mklml/lib/* ${{ github.workspace }}/dp_test/lib/
6990 pytest --cov=deepmd source/ipi/tests
7091 env:
7192 OMP_NUM_THREADS: 1
7293 TF_INTRA_OP_PARALLELISM_THREADS: 1
7394 TF_INTER_OP_PARALLELISM_THREADS: 1
7495 LD_LIBRARY_PATH: ${{ github.workspace }}/dp_test/lib
96+ ENABLE_TENSORFLOW: ${{ matrix.enable_tensorflow && '1' || '0' }}
97+ ENABLE_PYTORCH: ${{ matrix.enable_pytorch && '1' || '0' }}
98+ ENABLE_JAX: ${{ matrix.enable_tensorflow && '1' || '0' }}
99+ ENABLE_PADDLE: ${{ matrix.enable_paddle && '1' || '0' }}
75100 if: ${{ !matrix.check_memleak }}
76101 - uses : codecov/codecov-action@v5
77102 env :
0 commit comments