Skip to content

Workflow file for this run

# Name of the GitHub Action
name: Build plugin on Pull Request
# Specify when the Action should be triggered: when a pull request is opened against the 'devel' or 'master' branch
on:
pull_request:
branches: [devel, master]
# Define the job that should be run
jobs:
build:
# Specify the machine to run the job on
runs-on: ubuntu-latest
# Define the steps to be taken in the job
steps:
# Installing scipion and miniconda dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y wget gcc g++ libopenmpi-dev make
# Installing Miniconda
- name: Install Miniconda
working-directory: ${{ github.workspace }}/../
run: |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p miniconda/
source miniconda/etc/profile.d/conda.sh
conda update -n base -c defaults conda -y
# Installing Scipion
- name: Install Scipion
working-directory: ${{ github.workspace }}/../
run: |
eval "$(miniconda/bin/conda shell.bash hook)"
pip3 install --user scipion-installer
python3 -m scipioninstaller -conda -noXmipp -noAsk scipion
# Install scipion-chem
- name: Install scipion-chem
working-directory: ${{ github.workspace }}/../
run: |
git clone https://github.com/scipion-chem/scipion-chem.git
scipion/scipion3 installp -p scipion-chem --devel
# Checkout scipion-chem to Pull Request branch if exists, by default stays in devel
- name: Conditionally checkout scipion-chem to ${{ github.head_ref }}
working-directory: ${{ github.workspace }}/../scipion-chem
env:
BRANCH_NAME: ${{ github.head_ref }}
run: |
if [ $(git ls-remote --heads https://github.com/scipion-chem/scipion-chem.git $BRANCH_NAME | wc -l) -eq 1 ]; then
git checkout $BRANCH_NAME
fi
# Install scipion-chem-autodock
- name: Install scipion-chem-autodock
working-directory: ${{ github.workspace }}/../
run: |
git clone https://github.com/scipion-chem/scipion-chem-autodock.git
scipion/scipion3 installp -p scipion-chem-autodock --devel
# Checkout scipion-chem-autodock to Pull Request branch if exists, by default stays in devel
- name: Conditionally checkout scipion-chem-autodock to ${{ github.head_ref }}
working-directory: ${{ github.workspace }}/../scipion-chem
env:
BRANCH_NAME: ${{ github.head_ref }}
run: |
if [ $(git ls-remote --heads https://github.com/scipion-chem/scipion-chem-autodock.git $BRANCH_NAME | wc -l) -eq 1 ]; then
git checkout $BRANCH_NAME
fi
# Check out the repository in the pull request
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
# Install plugin from the pull request using the Scipion3 installp command
- name: Install plugin from pull request
working-directory: ${{ github.workspace }}
run: ../scipion/scipion3 installp -p . --devel