Skip to content

Commit 3fc6219

Browse files
committed
Add basic Circle CI setup
Change-Id: I28b7d10557c6b068cb7e9dbb572de6d1009875fc
1 parent 8d08247 commit 3fc6219

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

circle.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Configuration initially used from conda-forge/conda-smithy (BSD 3-clause)
2+
3+
machine:
4+
services:
5+
- docker
6+
7+
dependencies:
8+
# Note, we used to use the naive caching of docker images, but found that it was quicker
9+
# just to pull each time. #rollondockercaching
10+
override:
11+
- docker pull condaforge/linux-anvil
12+
13+
test:
14+
override:
15+
- ./scripts/circleci_build.sh

scripts/circleci_build.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env bash
2+
3+
# Configuration initially used from conda-forge/conda-smithy (BSD 3-clause)
4+
5+
ROOT_DIR=$(cd "$(dirname "$0")/.."; pwd;)
6+
7+
docker info
8+
9+
config=$(cat <<CONDARC
10+
11+
channels:
12+
- conda-forge
13+
- defaults # As we need conda-build
14+
15+
show_channel_urls: true
16+
17+
conda-build:
18+
root-dir: /root_dir/build_artefacts
19+
20+
CONDARC
21+
)
22+
23+
REQUIREMENTS="numpy cython cmake boost arrow-cpp pytz python-dateutil"
24+
25+
cat << EOF | docker run -i \
26+
-v ${ROOT_DIR}:/root_dir \
27+
-a stdin -a stdout -a stderr \
28+
condaforge/linux-anvil \
29+
bash || exit $?
30+
31+
export PYTHONUNBUFFERED=1
32+
33+
set -e
34+
35+
echo "$config" > ~/.condarc
36+
# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artefacts.
37+
conda clean --lock
38+
39+
export CONDA_ENV=pandas-test
40+
41+
conda create -y -q -n $CONDA_ENV python=3.5
42+
source activate $CONDA_ENV
43+
44+
conda install --yes --quiet conda-forge-build-setup
45+
source run_conda_forge_build_setup
46+
47+
conda install -y -q $REQUIREMENTS
48+
49+
mkdir test-build
50+
cd test-build
51+
52+
export ARROW_HOME=~/.conda/envs/$CONDA_ENV
53+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.conda/envs/$CONDA_ENV/lib
54+
55+
cmake /root_dir || exit 1
56+
make -j4 || exit 1
57+
ctest || exit 1
58+
59+
EOF

0 commit comments

Comments
 (0)