Repository navigation
63 lines (57 loc) · 2.18 KB
/
Copy pathtest.yml
File metadata and controls
63 lines (57 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on:
pull_request:
branches: [ "master", "feature/build-speedup" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
tensorflow-version: ["2.20.0", "2.21.0"]
include:
- python-version: "3.9"
tensorflow-version: "2.20.0"
env:
CUDA_VISIBLE_DEVICES: "-1"
TF_USE_LEGACY_KERAS: "1"
CMAKE_BUILD_PARALLEL_LEVEL: "2"
OMP_NUM_THREADS: "2"
TF_NUM_INTRAOP_THREADS: "2"
TF_NUM_INTEROP_THREADS: "2"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install general dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
- name: Checkout current tensorpotential with PACE compatibility
uses: actions/checkout@v4
with:
repository: ICAMS/grace-tensorpotential
# Includes the NumPy scalar fix and TensorFlow 2.21 bound from PR #43.
ref: 9ccb9090f53292a836cbbc3de4cadcae54c7ce1a
path: tensorpotential
- name: Install tensorpotential
run: |
cd tensorpotential
python -m pip install "tensorflow==${{ matrix.tensorflow-version }}" "tf-keras~=${{ matrix.tensorflow-version }}" .
- name: Install python-ace
run: |
python -m pip install .
- name: Test with python-ace with tensorpotential
run: |
python -m pip check
python -c 'import pyace, tensorpotential, tensorflow as tf, numpy as np; print("Versions:", pyace.__version__, tensorpotential.__version__, tf.__version__, np.__version__)'
python -m pytest tests/ --runtensorpot
- name: Integration test of CLI
run: |
cd tests/test-CLI/Cu-I && sh integration_test.sh
cd ../Ethanol && sh integration_test.sh