music-dl/.gitlab-ci.yml

88 lines
1.7 KiB
YAML
Raw Normal View History

2018-12-29 16:09:25 +01:00
# Declare some variables dependent on the operating system where the runner is installed.
2018-12-29 03:07:56 +01:00
variables:
2018-12-29 03:14:09 +01:00
PYTHON3: "C:\\python37\\python.exe"
2018-12-29 03:59:44 +01:00
PYINSTALLER: "C:\\python37\\scripts\\pyinstaller.exe"
2018-12-29 18:36:57 +01:00
NSIS: "C:\\nsis\\makensis.exe"
2018-12-29 16:09:25 +01:00
PYTHON2: "C:\\python27\\python.exe"
2018-12-29 20:38:25 +01:00
2018-12-29 16:09:25 +01:00
stages:
2018-12-29 20:49:44 +01:00
- build
2018-12-29 20:38:25 +01:00
- pack
2018-12-29 16:20:22 +01:00
2018-12-29 20:38:25 +01:00
build_py3:
stage: build
2018-12-29 03:07:56 +01:00
tags:
2018-12-29 16:09:25 +01:00
- windows10
before_script:
2018-12-29 03:48:39 +01:00
- '%PYTHON3% -m pip install --upgrade pip'
- '%PYTHON3% -m pip install --upgrade -r requirements.txt'
2018-12-29 16:09:25 +01:00
script:
2018-12-29 03:07:56 +01:00
- cd src
2018-12-29 03:59:44 +01:00
- '%PYINSTALLER% main.spec'
2018-12-29 03:07:56 +01:00
only:
- master
2018-12-29 20:38:25 +01:00
artifacts:
2018-12-29 18:52:09 +01:00
paths:
2018-12-29 18:56:12 +01:00
- src\\dist
2018-12-29 20:38:25 +01:00
expire_in: 15 mins
zip_py3:
stage: pack
tags:
- windows10
only:
- master
dependencies:
- build_py3
script:
- cd scripts
- '%PYTHON3% prepare_zipversion.py'
- cd ..
- move src\music_dl.zip music_dl.zip
2018-12-29 20:41:46 +01:00
artifacts:
2018-12-29 03:07:56 +01:00
paths:
- music_dl.zip
2018-12-29 20:38:25 +01:00
expire_in: 1 hour
2018-12-29 16:09:25 +01:00
build_setup:
2018-12-29 20:38:25 +01:00
stage: pack
tags:
- windows10
only:
- master
2018-12-29 20:38:25 +01:00
dependencies:
- build_py3
script:
- cd src
- '%NSIS% installer.nsi'
- cd ..
2018-12-29 20:56:47 +01:00
- move src\music_dl* .
artifacts:
paths:
2018-12-29 20:56:47 +01:00
- music_dl_
name: music_dl
2018-12-29 20:48:05 +01:00
expire_in: 1 day
2018-12-29 16:09:25 +01:00
python2_version:
stage: build
2018-12-29 16:09:25 +01:00
tags:
- windows7
before_script:
- '%PYTHON2% -m pip install --upgrade pip'
- '%PYTHON2% -m pip install --upgrade -r requirements.txt'
2018-12-29 18:01:01 +01:00
- '%PYTHON2% -m pip install --upgrade pypubsub==3.3.0 PySocks win_inet_pton'
2018-12-29 16:09:25 +01:00
script:
- cd src
- '%PYTHON2% setup.py py2exe'
- cd ..
- cd scripts
- '%PYTHON2% prepare_zipversion.py'
- cd ..
- move src\music_dl.zip music_dl_py2.zip
only:
- master
2018-12-29 16:13:19 +01:00
artifacts:
2018-12-29 16:09:25 +01:00
paths:
- music_dl_py2.zip
name: music_dl_py2
2018-12-29 05:03:39 +01:00
expire_in: 1 day