Skip to content

Commit 1cc9229

Browse files
authored
Merge pull request #95 from isuruf/master
Trigger conda build and pypi upload on tags
2 parents 973d9b0 + 7fc237d commit 1cc9229

File tree

3 files changed

+78
-2
lines changed

3 files changed

+78
-2
lines changed

.travis.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,20 @@ addons:
1616
- libmpc-dev
1717
- binutils-dev
1818
- g++-4.7
19+
1920
env:
21+
global:
22+
- secure: "jkvObuYjs4oT0bbUzLOtKLPkD2AVt/c4ZOS2qNkStC8dwtLpcYd4tLn1S07PCMYzCLL/DGvp6J8IKmzhQV7a/Yl/wVySTNBFnPecjku8Spf1UqdJbrJa8Ln/nxnajFyc2Q7QnKj8s4sguN1GRY7Jdylp9l7XgebjGwVrpKXIR+JqiSAhxkEyMmWklzu80m+BOTep0xTY/E9fFMCznQFM96jTSjq9vFxCAzToOpP3EFQyBjhDkPNQvaI3KYcBabe5DQs0wMvLEboxDEGYG+Y4ijp1d8JFmWZgzU1nQm++n8WG/Igz8rF6Asy7fHeE2/sexQf0LEqtTFtSmJFFnn6vJdn+6JOB05ARbdXc2KKzP81BCCjhPIH/KNQNMpD6p7KfXhthM0np/dxBRDlCh+6kDiuei+798YSJ63Svdr+lmg4weuxWRQh7D2lmXTcygWSW4iafCgK+D0lekg239HKcvDXPx352obM/HAz7tUiIaiOvHNlKlVL7bbHDhKWyaduAHB9jVnAIvcDWjumwyOaIPPLQL1JsL8Tha1H5uUPYWYjfNjjqk57pXq1YPUFoyiylViqX1eTWypwkXFKFJCWb6IhuW32OKEYACXJLZm7zui/qvIKiNn7PNGBxtrW/rvpvVAM94yQNhlmjxiu4/V74D0/9Oh90cPGFtoocbj5MT98="
23+
2024
## All these variables are sent into the bin/test_travis.sh script. See this
2125
## script to know how they are used. Most of them are just passed to cmake,
2226
## so if they are not set, cmake will use a default value. For the rest, the
2327
## bin/test_travis.sh script usually checks for either "yes" or "no" in an if
2428
## statement, so if the variable is not set, the other if branch will get
2529
## executed.
26-
30+
matrix:
2731
## Out of tree builds (default):
28-
- BUILD_TYPE="Debug" WITH_BFD="yes" PYTHON_VERSION="2.7"
32+
- BUILD_TYPE="Debug" WITH_BFD="yes" PYTHON_VERSION="2.7" TRIGGER_FEEDSTOCK="yes"
2933

3034
## In-tree builds (we just check a few configurations to make sure they work):
3135
# Debug build with Python 2.7:
@@ -115,3 +119,12 @@ script:
115119

116120
notifications:
117121
email: false
122+
123+
deploy:
124+
provider: pypi
125+
user: isuruf
126+
password:
127+
secure: "HsVXENZjVg05Mce5Ts6iG292Ch03YHETto/512Nu1R8xeRWeerMZpumBE2X0WPrDBuV/zLMlf/jc8rN6EX9GEGaBxTPwFq5tNRTFjShUcmSxWLWPVgF7fYm1+pPjkzODOTIHPkJB00nw22DUuF2kg/gCm7uZeaGNsBELNpKPJyRv9ShxOLqOxK+WR5QQw+xMmmq+ugsc1/kjnxuczcUs/dXyYfFrw9nrKD8qUPeyEsaea1jUxDIVLBtaxnwbmhtw+GPE5tH+5Q/Y8mA7epw5Znj47W+WxfF/sdtBt31m9KNmMcISYpvUHpcju/gTUAeRBU0Ln04teR6iMHUcQJerM0T61uZCNCoYQv1A9oVKA3NO1Gb6in8BqoR+wZB2po+g8U3x+nKGxJrFNekm9zAhs7yQEYnP6C9ekUpe+73qi6I6fzMB71sMJa6SegYL99z+UW6zjhIesf6nX43U+954pN7FsrIzkdTHW67YrBfKr8PEZ0VPxJzokWTPkYO5Qkvjp1TNyFBsV2DS5qpMMYHYxNDbxj5elYZxPt+bvRbtmMdS4p2ze5DVWEQbwW+jZydBoccH6uAhjXkFRil9/5LAJmwfIYcBrF6RkZu1VhSSIULhtOqtA7psSSBSprqyhPsvs8l13PUs92SogXCrYFfHgNR6J8UM3iiP0yooeV6Z+gw="
128+
on:
129+
condition: $TRIGGER_FEEDSTOCK = yes
130+
tags: true

bin/test_travis.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,9 @@ fi
2020
if [[ "${WITH_SAGE}" == "yes" ]]; then
2121
sage -t $PYTHON_SOURCE_DIR/symengine/tests/test_sage.py
2222
fi
23+
24+
if [[ "${TRIGGER_FEEDSTOCK}" == "yes" ]]; then
25+
cd $PYTHON_SOURCE_DIR
26+
./bin/trigger_feedstock.sh
27+
fi
28+

bin/trigger_feedstock.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/usr/bin/env bash
2+
3+
set -x
4+
5+
if [[ "${TRIGGER_FEEDSTOCK}" != "yes" ]]; then
6+
exit 0;
7+
fi
8+
if [[ "${TRAVIS_PULL_REQUEST}" != "false" ]]; then
9+
echo "Testing a pull request, feedstock is not triggered.";
10+
exit 0;
11+
fi
12+
if [[ "${GH_TOKEN}" == "" ]]; then
13+
echo "Testing a fork, feedstock is not triggered.";
14+
exit 0;
15+
fi
16+
17+
18+
cd $PYTHON_SOURCE_DIR;
19+
git clean -dfx;
20+
export ver=`git describe --tags`
21+
if [[ $ver == "v"* ]]
22+
then
23+
ver=${ver:1};
24+
fi
25+
26+
export symengine_ver=`cat symengine_version.txt`
27+
if [[ $symengine_ver == "v"* ]]
28+
then
29+
symengine_ver=${symengine_ver:1};
30+
fi
31+
32+
export commit=`git rev-parse HEAD`
33+
34+
git config --global user.name "Isuru Fernando"
35+
git config --global user.email "isuruf@gmail.com"
36+
37+
set +x
38+
git clone "https://${GH_TOKEN}@github.com/symengine/python-symengine-feedstock.git" feedstock -q
39+
set -x
40+
41+
cd feedstock
42+
if [[ "${TRAVIS_TAG}" != "" ]]; then
43+
git checkout tagged
44+
else
45+
echo "Testing merge. Not triggering feedstock"
46+
exit 0
47+
# git checkout dev
48+
fi
49+
50+
sed -ie '1,2d' recipe/meta.yaml
51+
sed -i '1s/^/{% set version = "'${ver}'" %}\n/' recipe/meta.yaml
52+
sed -i '1s/^/{% set commit = "'${commit}'" %}\n/' recipe/meta.yaml
53+
sed -i 's/^ - symengine [0-9].*/ - symengine '${symengine_ver}'/' recipe/meta.yaml
54+
git add recipe/meta.yaml
55+
git commit -m "Update symengine version to ${ver}"
56+
git push -q
57+

0 commit comments

Comments
 (0)