forked from deepchem/deepchem
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (104 loc) · 3.51 KB
/
build.yml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Test for build scripts
on:
push: # ci work when pushing master branch
branches:
- master
paths:
- "scripts/install_deepchem_conda.ps1"
- "scripts/install_deepchem_conda.sh"
- "requirements/**"
pull_request: # ci work when creating a PR to master branch
branches:
- master
paths:
- "scripts/install_deepchem_conda.ps1"
- "scripts/install_deepchem_conda.sh"
- "requirements/**"
jobs:
bash-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.9']
steps:
- uses: actions/checkout@v3
- name: Cache pip modules for Linux
if: runner.os == 'Linux'
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/**') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache pip modules for MacOS
if: runner.os == 'macOS'
uses: actions/cache@v3
with:
path: ~/Library/Caches/pip
key: ${{ matrix.os }}-pip-${{ hashFiles('requirements/**') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies (failure check)
continue-on-error: true
shell: bash -l {0}
run: |
source scripts/install_deepchem_conda.sh
- name: Install all dependencies
shell: bash -l {0}
run: |
source scripts/install_deepchem_conda.sh ${{ matrix.python-version }} cpu
- name: Import Checks
shell: bash -l {0}
run: |
conda activate deepchem
python -V
python -c 'import deepchem; print("DeepChem version %s" % deepchem.__version__)'
python -c 'import rdkit; print("RDKIT version %s" % rdkit.__version__)'
python -c 'import torch; print("Torch version %s" % torch.__version__)'
python -c 'import tensorflow; print("Tensorflow version %s" % tensorflow.__version__)'
python -c 'import jax; print ("Jax version %s" % jax.__version__)'
powershell-build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9']
steps:
- uses: actions/checkout@v3
- name: Cache pip packages for Windows
uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ matrix.os }}-pip-${{ hashFiles('env.*.yml') }}
- name: Install miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies (failure check)
continue-on-error: true
shell: pwsh
run: |
. .\scripts\install_deepchem_conda.ps1
- name: Install dependencies
shell: pwsh
run: |
. .\scripts\install_deepchem_conda.ps1 ${{ matrix.python-version }} cpu
- name: Import Checks
shell: pwsh
run: |
conda activate deepchem
python -V
python -c "import deepchem; print('DeepChem version %s' % deepchem.__version__)"
python -c "import rdkit; print('RDKIT version %s' % rdkit.__version__)"
python -c "import torch; print('Torch version %s' % torch.__version__)"
python -c "import tensorflow; print('Tensorflow version %s' % tensorflow.__version__)"