Skip to content

Commit

Permalink
Added deyploy section fro AppVeyor
Browse files Browse the repository at this point in the history
  • Loading branch information
menify committed Dec 6, 2015
1 parent 13bf7aa commit 9b5118e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ deploy:
api_key:
secure: wqUW3M6GzXnf7H71skp9LNm+r3VXeIE2atGWFYH/QhSmpUlWPDKIofsywHEG34TCEQsf0iWY9klv2qR6JJxY+4EfcvlnwLpVOoKflo/Hy7mn+wqbxULhVTg/niqZ7uoYjxoWaw3OgXPgn2mpZm44H1RzS75LeJmbKrrfpGyH4gU=
file_glob: true
file: "/home/travis/build/aqualid/aqualid/make/install/*"
file: "make/install/*"
on:
tags: true
python: '3.4'
Expand Down
12 changes: 12 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ environment:
os:
- Visual Studio 2015

shallow_clone: true

install:
- CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;C:\\MinGW\\bin;%PATH%"
Expand All @@ -19,3 +21,13 @@ build: off

test_script:
- "python run_ci.py"

deploy:
provider: GitHub
auth_token:
secure: 79ZJS9bGVP+7P+00FDjBAsio7iAiXISHzTcedhTI1TRDo6R3oUkuhklPip2oevQW
artifact: make/install/*.exe
draft: false
on:
appveyor_repo_tag: true
PYTHON: "C:\\Python34-x64"
2 changes: 1 addition & 1 deletion make/make.aql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ standalone = aql_tool.LinkStandalone(aql_module, tools_pack, target="aql.py")

info = aql.get_aql_info()
standalone_name = dist_dir + \
"/{name}-{version}-local".format(name=info.name, version=info.version)
"/{name}-{version}-standalone".format(name=info.name, version=info.version)

standalone_zip = tools.CreateZip(standalone,
Entity(STANDALONE_WINDOWS_SCRIPT, 'aql.cmd'),
Expand Down
24 changes: 10 additions & 14 deletions run_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,21 +174,17 @@ def _run_make(core_dir):


# ==============================================================================
def _make_dist(core_dir, tools_dir):
def _make_dist(core_dir, tools_dir, release=False):

tools_dir = os.path.join(tools_dir, 'tools')

args = ['-I', tools_dir, 'sdist', 'local']

if sys.platform.startswith('win'):
args.append('wdist')

_make_aql(core_dir, args)


# ==============================================================================
def _make_release(core_dir, tools_dir):

tools_dir = os.path.join(tools_dir, 'tools')
args = ['-I', tools_dir, 'sdist', 'local', 'copy_setup']
if release:
args.append('copy_setup')

_make_aql(core_dir, args)

Expand Down Expand Up @@ -239,6 +235,10 @@ def run(core_dir, tools_dir, examples_dir, run_tests=None):
tools_dir = _fetch_repo(core_dir, 'tools', tools_dir)
_make_dist(core_dir, tools_dir)

if (run_tests is not None) and 'release' in run_tests:
tools_dir = _fetch_repo(core_dir, 'tools', tools_dir)
_make_dist(core_dir, tools_dir, release=True)

if (run_tests is None) or 'tools' in run_tests:
tools_dir = _fetch_repo(core_dir, 'tools', tools_dir)
examples_dir = _fetch_repo(core_dir, 'examples', examples_dir)
Expand All @@ -249,10 +249,6 @@ def run(core_dir, tools_dir, examples_dir, run_tests=None):
if (run_tests is None) or 'examples' in run_tests:
_run_examples(core_dir, examples_dir)

if 'release' in run_tests:
tools_dir = _fetch_repo(core_dir, 'tools', tools_dir)
_make_release(core_dir, tools_dir)


# ==============================================================================
def _parse_args(choices):
Expand Down Expand Up @@ -297,7 +293,7 @@ def main():
if args.skip_tests:
run_tests.difference_update(args.skip_tests)

if os.environ.get('TRAVIS_TAG'):
if os.environ.get('TRAVIS_TAG') or os.environ.get('APPVEYOR_REPO_TAG'):
run_tests = ('release',)

run(core_dir, args.tools_dir, args.examples_dir, run_tests)
Expand Down

0 comments on commit 9b5118e

Please sign in to comment.