Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add paths to the conda env #4

Merged
merged 2 commits into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,23 @@ jobs:

steps:
- uses: actions/checkout@master
with:
path: HiggsAnalysis/CombinedLimit # Required to match compile instructions
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2.1.1
with:
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
environment-file: conda_env.yml
environment-file: HiggsAnalysis/CombinedLimit/conda_env.yml
activate-environment: combine
- name: Set up conda env variables
shell: bash -l {0}
run: |
cd HiggsAnalysis/CombinedLimit
bash set_conda_env_vars.sh
- name: Build
shell: bash -l {0}
run: |
source env_conda.sh
cd HiggsAnalysis/CombinedLimit
make -f Makefile_conda -j 2
2 changes: 1 addition & 1 deletion Makefile_conda
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#######################################################################

# Boost
CONDA = $(shell conda info --base)/envs/combine2
CONDA = ${CONDA_PREFIX}
# Compiler and flags -----------------------------------------------------------
CC = c++
ROOTCFLAGS = $(shell root-config --cflags)
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,17 @@ git checkout 112x

conda install --name base mamba # faster conda
mamba env create -f conda_env.yml

conda activate combine
bash set_conda_env_vars.sh
# Need to reactivate
conda deactivate
conda activate combine
source env_conda.sh

make -f Makefile_conda -j 8
```

Using combine from then on should only require sourcing the conda environment
```
conda activate combine
```
3 changes: 0 additions & 3 deletions env_conda.sh

This file was deleted.

3 changes: 3 additions & 0 deletions set_conda_env_vars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
conda env config vars set PATH=${PATH}:${PWD}/exe:${PWD}/scripts
conda env config vars set LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/lib
conda env config vars set PYTHONPATH=${PYTHONPATH}:${PWD}/lib/python:${PWD}/lib