Commit 71029a9c authored by mmpe's avatar mmpe

update ci script to push to control-binary

parent c999ca6f
Pipeline #7500 failed with stage
in 26 seconds
......@@ -12,46 +12,54 @@ build_and_test-win32:
- test_build
- tags
build_and_test-win32:
stage:
build
script:
- c:/Anaconda3/envs/pyHawc2/python.exe ci.py win32
artifacts:
paths:
- src/dtu_we_controller/Win32/Release/dtu_we_controller.dll
- src/dtu_we_controller_bladed/Win32/Release/dtu_we_controller_bladed.dll
tags:
- CPAV_old_PC
except:
- tags
build_and_test-x64:
stage:
build
build
script:
- devenv src/dtu_controller.sln /rebuild "release|x64"
- git clone -b master --depth 1 https://gitlab.windenergy.dtu.dk/HAWC2/hawc2-binary/hawc2-x64.git
- c:/Anaconda3/envs/pyHawc2/python hawc2-x64/update_module.py src/dtu_we_controller/x64/release/dtu_we_controller_64.dll master-test
- c:/Anaconda3/envs/pyHawc2/python.exe -m pytest --ignore=tests/test_32
- c:/Anaconda3/envs/pyHawc2/python.exe ci.py x64
artifacts:
paths:
- src/dtu_we_controller/X64/Release/dtu_we_controller_64.dll
- src/dtu_we_controller_bladed/X64/Release/dtu_we_controller_bladed_64.dll
tags:
- CPAV_old_PC
except:
- test_build
- tags
build_test_deploy_win32:
build_test_deploy-win32:
stage:
build
script:
- devenv src/dtu_controller.sln /rebuild "release|win32"
- git clone -b master --depth 1 https://gitlab.windenergy.dtu.dk/HAWC2/hawc2-binary/hawc2-win32.git
- c:/Anaconda3/envs/pyHawc2/python hawc2-win32/update_module.py src/dtu_we_controller/win32/release/dtu_we_controller.dll
- c:/Anaconda3/envs/pyHawc2/python.exe -m pytest
- c:/Anaconda3/envs/pyHawc2/python hawc2-win32/update_module.py push
- c:/Anaconda3/envs/pyHawc2/python.exe ci.py win32 push
tags:
- CPAV_old_PC
only:
- test_build
- tags
build_test_deploy_x64:
build_test_deploy-x64:
stage:
build
script:
- devenv src/dtu_controller.sln /rebuild "release|x64"
- git clone -b master --depth 1 https://gitlab.windenergy.dtu.dk/HAWC2/hawc2-binary/hawc2-x64.git
- c:/Anaconda3/envs/pyHawc2/python hawc2-x64/update_module.py src/dtu_we_controller/x64/release/dtu_we_controller_64.dll
# - c:/Anaconda3/envs/pyHawc2/python.exe -m pytest
- c:/Anaconda3/envs/pyHawc2/python hawc2-x64/update_module.py push
- c:/Anaconda3/envs/pyHawc2/python.exe ci.py x64 push
tags:
- CPAV_old_PC
only:
- test_build
- tags
- tags
\ No newline at end of file
import pytest
import sys
import os
"""
python ci.py <platform> [<configuration>] [push]
"""
if __name__ == '__main__':
sln = 'src/dtu_controller.sln'
dll_lst = ['src/dtu_we_controller/%s/%s/dtu_we_controller%s.dll','src/dtu_we_controller_bladed/%s/%s/dtu_we_controller_bladed%s.dll']
def run(cmd):
print(cmd)
if os.system(cmd):
raise Exception("'%s' failed" % cmd)
platform = sys.argv[1]
if len(sys.argv) == 3 and sys.argv[2].lower() != 'push':
conf = sys.argv[2]
else:
conf = 'Release'
push = sys.argv[-1] == 'push'
ext = ['', '_64'][platform.lower() == 'x64']
print("Run ci")
print("- Platform: %s" % platform)
print("- Solution file: %s" % (sln))
for dll in dll_lst:
print("- dll: " + dll % (platform, conf, ext))
print("-" * 20)
run('devenv %s /rebuild "%s|%s"' % (sln, conf, platform))
#res = pytest.main(['.'])
#if res:
# sys.exit(res)
run("git clone -b master --depth 1 git@gitlab.windenergy.dtu.dk:OpenLAC/control-binary/control-%s.git" % platform)
for dll in dll_lst:
run("%s control-%s/update_module.py %s" % (sys.executable, platform, dll%(platform, conf, ext)))
if push:
run("%s control-%s/update_module.py push" % (sys.executable, platform))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment