Skip to content

init devcontainer file #128

init devcontainer file

init devcontainer file #128

Workflow file for this run

###############################################################################
#
# AUTHOR: Maciej_Bak
# CONTACT: wsciekly.maciek@gmail.com
# CREATED: 15-02-2022
# LICENSE: Apache_2.0
#
###############################################################################
---
name: ci-pipeline
on: push
jobs:
pipeline-testruns:
runs-on: ubuntu-22.04
name: ubuntu-22.04
strategy:
fail-fast: false
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
submodules: "true"
- name: Setup miniconda & conda env
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
channels: conda-forge,defaults
channel-priority: true
auto-update-conda: true
environment-file: environment.yml
activate-environment: warlock
auto-activate-base: false
- name: Display all miniconda & env info
shell: bash -l {0}
run: |
conda info -a
conda list
conda clean --all --yes
- name: Print compiler path (Ubuntu)
shell: bash -l {0}
run: which g++
- name: Compile demon (Ubuntu)
shell: bash -l {0}
run: >
g++ resources/demon_model/src/demon.cpp
-o resources/demon_model/bin/demon
-I/usr/share/miniconda3/envs/warlock/include
-lm
- name: Prepare internal conda envs (Ubuntu)
shell: bash -l {0}
run: >
snakemake
--snakefile="workflow/Snakefile"
--configfile="tests/test1/config-Ubuntu.yml"
--use-conda
--conda-create-envs-only
--cores 1
all
- name: Install demonanalysis into the env (Ubuntu)
shell: bash -l {0}
run: |
for file in .snakemake/conda/*.yaml; do
if [ -f "$file" ]; then
if grep -q "name: warlock-r" "$file"; then
ENVPATH="${file%.yaml}"
break
fi
fi
done
conda deactivate
conda activate $ENVPATH
Rscript -e "devtools::install('resources/demonanalysis', upgrade=TRUE)" || true
Rscript -e "devtools::install('resources/demonanalysis', upgrade=TRUE)" || true
# Run the tests sequentially;
# This could be parallelized in the CI but setting up conda
# is expensive; its faster to run the tests one-by-one.
- name: Run the pipeline (test1) (Ubuntu)
shell: bash -l {0}
run: >
bash warlock.sh
--configfile tests/test1/config-Ubuntu.yml
--environment local
- name: Check outfiles (test1) (Ubuntu)
shell: bash -l {0}
working-directory: ./tests/test1
run: >
md5sum -c output-Ubuntu.md5;
[ -e output/analyses/00000000/muller.txt ]
- name: Cleanup (test1)
shell: bash -l {0}
run: rm -rf tests/test1/output
- name: Run the pipeline (test2) (Ubuntu)
shell: bash -l {0}
run: >
bash warlock.sh
--configfile tests/test2/config-Ubuntu.yml
--environment local
--cores 4
- name: Check outfiles (test2) (Ubuntu)
shell: bash -l {0}
working-directory: ./tests/test2
run: |
md5sum -c output-Ubuntu.md5;
for dir in $(find output/analyses -mindepth 1 -type d); do
[ -e "$dir/muller.txt" ]
done
- name: Cleanup (test2)
shell: bash -l {0}
run: rm -rf tests/test2/output
...