-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependency pinnings to latest versions and enable circleci (#253)
* Update pinnings to latest versions. * Update conda deps. * Fix conda dep. * Make test cases agnostic of used python version. * Fix version formatting. * Add circleci configuration. * Trigger build. * Trigger build * Include checkout in cache key. * Simplify test running. * Fix conda version. * Use latest available conda version (osx backlog). * Restore cache after checkout. * dito * Minor. * Index local channel. * Fix osx detection. * Remove travis-specific code. * Fix osx detection. Refactor output. * Debugging. * Always build the noarch index. * Use VM. * Fix osx test. * Fix env variable. * Capture output. * Increase no_output_timeout * Use SSH configured by circleci. * Fix docsource. * Refactoring. * Also install bioconda-utils for doc building. * Cleanup * Install bioconda-utils itself into dockerfile. * Cleanup conda caches. * Fixes. * Hide possible token exposures. * Trigger rebuild.
- Loading branch information
1 parent
590d7a1
commit 6179ca1
Showing
18 changed files
with
230 additions
and
211 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
version: 2 | ||
|
||
variables: | ||
restore_cache: &restore_cache | ||
restore_cache: | ||
keys: | ||
- bioconda-utils-{{ .Environment.MINICONDA_VER }}-{{ checksum ".circleci/setup.sh" }}-{{ arch }} | ||
save_cache: &save_cache | ||
save_cache: | ||
key: bioconda-utils-{{ .Environment.MINICONDA_VER }}-{{ checksum ".circleci/setup.sh" }}-{{ arch }} | ||
paths: | ||
- /tmp/workspace/miniconda | ||
setup: &setup | ||
run: | ||
name: Setup dependencies | ||
command: .circleci/setup.sh | ||
run: &run | ||
run: | ||
name: Run tests | ||
command: .circleci/run.sh | ||
macos: &macos | ||
macos: | ||
xcode: "8.3.3" | ||
linux: &linux | ||
machine: true | ||
install_bioconda_utils: &install_bioconda_utils | ||
run: | ||
name: Install bioconda-utils | ||
command: python setup.py install | ||
|
||
|
||
jobs: | ||
test-linux: | ||
<<: *linux | ||
steps: | ||
- checkout | ||
- *restore_cache | ||
- *setup | ||
- *save_cache | ||
- *install_bioconda_utils | ||
- run: | ||
name: Testing | ||
# --tb=line is important because py.test otherwise exposes tokens in case of errors | ||
command: py.test test/ -v --tb=line | ||
no_output_timeout: 1200 | ||
test-macos: | ||
<<: *macos | ||
steps: | ||
- checkout | ||
- *setup | ||
- *install_bioconda_utils | ||
- run: | ||
name: Testing | ||
# --tb=line is important because py.test otherwise exposes tokens in case of errors | ||
command: py.test test/ -v -k "not docker" --tb=line | ||
no_output_timeout: 1200 | ||
build-docs: | ||
<<: *linux | ||
steps: | ||
- add_ssh_keys: | ||
fingerprints: | ||
- f8:26:86:86:f8:d3:a5:66:ea:7d:f6:42:2e:5c:7a:82 | ||
- checkout | ||
- *restore_cache | ||
- *setup | ||
- *save_cache | ||
- *install_bioconda_utils | ||
- run: | ||
name: Build and upload docs | ||
command: .circleci/build-docs.sh | ||
|
||
|
||
|
||
workflows: | ||
version: 2 | ||
# workflow for testing pushes and PRs | ||
bioconda-utils-test: | ||
jobs: | ||
- test-linux: | ||
context: org-global | ||
- test-macos: | ||
context: org-global | ||
- build-docs: | ||
context: org-global | ||
bioconda-utils-nightly-docs: | ||
triggers: | ||
- schedule: | ||
cron: "0 0 * * *" | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
jobs: | ||
- build-docs: | ||
context: org-global |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
WORKSPACE=/tmp/workspace | ||
|
||
# Set path | ||
echo "export PATH=$WORKSPACE/miniconda/bin:$PATH" >> $BASH_ENV | ||
|
||
if [[ ! -d $WORKSPACE/miniconda ]]; then | ||
# setup conda and bioconda-utils if not loaded from cache | ||
mkdir -p $WORKSPACE | ||
|
||
# step 1: download and install miniconda | ||
if [[ $OSTYPE == darwin* ]]; then | ||
tag="MacOSX" | ||
elif [[ $OSTYPE == linux* ]]; then | ||
tag="Linux" | ||
else | ||
echo "Unsupported OS: $OSTYPE" | ||
exit 1 | ||
fi | ||
curl -L -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-$MINICONDA_VER-$tag-x86_64.sh | ||
bash miniconda.sh -b -p $WORKSPACE/miniconda | ||
source $BASH_ENV | ||
|
||
# step 2: setup channels | ||
conda config --add channels defaults | ||
conda config --add channels conda-forge | ||
conda config --add channels bioconda | ||
|
||
# step 3: install bioconda-utils | ||
conda install -y --file bioconda_utils/bioconda_utils-requirements.txt | ||
|
||
# step 4: cleanup | ||
conda clean -y --all | ||
|
||
# Add local channel as highest priority | ||
conda index $WORKSPACE/miniconda/conda-bld/linux-64 $WORKSPACE/miniconda/conda-bld/osx-64 $WORKSPACE/miniconda/conda-bld/noarch | ||
conda config --add channels file://anaconda/conda-bld | ||
|
||
pip install -r pip-test-requirements.txt | ||
pip install -r pip-requirements.txt | ||
fi | ||
|
||
source $BASH_ENV | ||
conda config --get | ||
|
||
ls $WORKSPACE/miniconda/conda-bld | ||
ls $WORKSPACE/miniconda/conda-bld/noarch |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
FROM condaforge/linux-anvil | ||
RUN /usr/bin/sudo -n yum install -y openssh-clients | ||
COPY bioconda_utils/bioconda_utils-requirements.txt /tmp/requirements.txt | ||
COPY setup-channels.sh /tmp/setup-channels.sh | ||
RUN CONDA_ROOT=/opt/conda bash tmp/setup-channels.sh | ||
RUN /opt/conda/bin/conda install --file /tmp/requirements.txt | ||
ENV PATH="/opt/conda/bin:${PATH}" | ||
RUN sudo -n yum install -y openssh-clients | ||
ADD . /tmp/repo | ||
RUN conda config --add channels defaults; \ | ||
conda config --add channels conda-forge; \ | ||
conda config --add channels bioconda | ||
RUN conda install --file /tmp/repo/bioconda_utils/bioconda_utils-requirements.txt; \ | ||
conda clean -y --all | ||
RUN pip install /tmp/repo |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
anaconda-client=1.6.3 | ||
argh=0.26.2 | ||
beautifulsoup4=4.6.0 | ||
conda=4.3.21 | ||
conda-build=2.1.16 | ||
galaxy-lib=17.9.7 | ||
jinja2=2.9.6 | ||
jsonschema=2.5.1 | ||
anaconda-client=1.6.* | ||
argh=0.26.* | ||
beautifulsoup4=4.6.* | ||
conda=4.3.29 | ||
conda-build=2.1.18 | ||
galaxy-lib=17.9.* | ||
jinja2=2.10.* | ||
jsonschema=2.6.* | ||
networkx=1.11 | ||
pyaml=15.8.2 | ||
pydotplus=2.0.2 | ||
python=3.5.2 | ||
requests=2.12.4 | ||
pyaml=17.12.* | ||
pydotplus=2.0.* | ||
requests=2.18.* | ||
sphinx | ||
docutils | ||
sphinx_rtd_theme | ||
involucro=1.1.2 | ||
pandas=0.19.2 | ||
numpy=1.12.1 | ||
pygithub=1.29 | ||
colorlog=2.10.* | ||
six=1.10.0 | ||
alabaster=0.7.9 | ||
involucro=1.1.* | ||
pandas=0.22.* | ||
numpy=1.14.* | ||
pygithub=1.34.* | ||
colorlog=3.1.* | ||
six=1.11.* | ||
alabaster=0.7.* |
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
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
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
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
Oops, something went wrong.