Robust baseclass (#4154) #57
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
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: | |
# macos-latest is for apple silicon | |
os: [ubuntu-latest, macos-latest] | |
python-version: ['3.9', '3.11'] | |
steps: | |
- name: Maximize build space | |
if: runner.os == 'ubuntu-latest' | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
sudo rm -rf /usr/local/lib/android | |
- uses: actions/checkout@v4 | |
- name: Cache pip modules for Linux | |
if: runner.os == 'Linux' | |
uses: actions/cache@v4 | |
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@v4 | |
with: | |
path: ~/Library/Caches/pip | |
key: ${{ matrix.os }}-pip-${{ hashFiles('requirements/**') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniconda-version: "latest" | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Install libomp with Homebrew | |
if: ${{ runner.os == 'macOS' && runner.arch == 'ARM64' }} | |
run: | | |
brew install libomp | |
- 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', '3.11'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache pip packages for Windows | |
uses: actions/cache@v4 | |
with: | |
path: ~\AppData\Local\pip\Cache | |
key: ${{ matrix.os }}-pip-${{ hashFiles('env.*.yml') }} | |
- name: Install miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
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__)" |