Delete devel branch #10
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: Build & test plugin on Pull Request | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Free Disk Space (Ubuntu only) | |
uses: jlumbroso/free-disk-space@main | |
- name: Set up MPI | |
uses: mpi4py/setup-mpi@master | |
with: | |
mpi: 'openmpi' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y wget gcc-10 g++-10 make cmake | |
- name: Install Miniconda | |
uses: conda-incubator/setup-miniconda@main | |
with: | |
miniconda-version: "latest" | |
auto-update-conda: true | |
auto-activate-base: true | |
activate-environment: scipion3 | |
python-version: "3.8" | |
- uses: Jimver/[email protected] | |
id: cuda-toolkit | |
with: | |
cuda: '11.7.0' | |
linux-local-args: '[ "--toolkit" ]' | |
- name: Install Scipion | |
working-directory: ${{ github.workspace }}/../ | |
run: | | |
pip cache purge | |
pip install --user scipion-installer | |
python3 -m scipioninstaller -conda -noXmipp -noAsk scipion | |
# Checkout to Pull Request branch if exists, by default stays in devel | |
- name: Install scipion-chem (in branch ${{ github.head_ref }} if exists) | |
working-directory: ${{ github.workspace }}/../ | |
env: | |
REPO_NAME: scipion-chem | |
BRANCH_NAME: ${{ github.head_ref }} | |
run: | | |
git clone https://github.com/scipion-chem/$REPO_NAME.git | |
if [ $(git ls-remote --heads https://github.com/scipion-chem/$REPO_NAME.git $BRANCH_NAME | wc -l) -eq 1 ]; then | |
cd $REPO_NAME && git checkout $BRANCH_NAME && cd - | |
fi | |
scipion/scipion3 installp -p $REPO_NAME --devel | |
- name: Checkout repository | |
uses: actions/checkout@main | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Install plugin from pull request | |
working-directory: ${{ github.workspace }} | |
run: | | |
pip cache purge | |
../scipion/scipion3 installp -p . --devel | |
- name: Run tests | |
working-directory: ${{ github.workspace }}/${{ vars.FOLDER_WITH_VERSION }} | |
run: | | |
wget https://raw.githubusercontent.com/scipion-chem/scipion-chem/devel/pwchem/runTests.py | |
python runTests.py ${{ github.workspace }}/../scipion/scipion3 ${{ vars.FOLDER_WITH_VERSION }} -noGPU -testData=testData.json |