Skip to content

Commit

Permalink
Created Github CI build action
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSalinas98 authored Jun 9, 2023
1 parent 17a1f58 commit b517a8c
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Name of the GitHub Action
name: Build scipion-chem 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:
# Getting current test time
- name: Get current time
uses: josStorer/get-current-time@v2
id: current-time
with:
format: YYYYMMDD-HH
utcOffset: "+02:00"

# Using current time to view test time (for debugging purposes)
- name: Use current time
env:
R_TIME: "${{ steps.current-time.outputs.readableTime }}"
run: echo $R_TIME

# Installing wget, needed for downloading some dependencies
- name: Install wget
run: |
# Update package lists and install wget
sudo apt-get update && \
sudo apt-get install -y wget
# 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 ${{ github.workspace }}/../miniconda/ && \
source ./miniconda/etc/profile.d/conda.sh
# Installing Scipion
- name: Install Scipion with dependencies
working-directory: ${{ github.workspace }}/../
run: |
sudo apt-get install -y gcc-10 g++-10 libopenmpi-dev make && \
eval "$(${{ github.workspace }}/../miniconda/bin/conda shell.bash hook)" && \
pip3 install --user scipion-installer && \
python3 -m scipioninstaller -conda -noXmipp -noAsk ${{ github.workspace }}/../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
# Check out the repository in the pull request
- name: Checkout repository
uses: actions/checkout@v2
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: |
# Install the repository from the pull request
../scipion/scipion3 installp -p . --devel

0 comments on commit b517a8c

Please sign in to comment.