music-dl/.gitlab-ci.yml

88 lines
1.7 KiB
YAML

# Declare some variables dependent on the operating system where the runner is installed.
variables:
PYTHON3: "C:\\python37\\python.exe"
PYINSTALLER: "C:\\python37\\scripts\\pyinstaller.exe"
NSIS: "C:\\nsis\\makensis.exe"
PYTHON2: "C:\\python27\\python.exe"
stages:
- build
- pack
build_py3:
stage: build
tags:
- windows10
before_script:
- '%PYTHON3% -m pip install --upgrade pip'
- '%PYTHON3% -m pip install --upgrade -r requirements.txt'
script:
- cd src
- '%PYINSTALLER% main.spec'
only:
- master
artifacts:
paths:
- src\\dist
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
artifacts:
paths:
- music_dl.zip
expire_in: 1 hour
build_setup:
stage: pack
tags:
- windows10
only:
- master
dependencies:
- build_py3
script:
- cd src
- '%NSIS% installer.nsi'
- cd ..
- move src\music_dl* .
artifacts:
paths:
- "music_dl_*"
name: music_dl
expire_in: 1 day
python2_version:
stage: build
tags:
- windows7
before_script:
- '%PYTHON2% -m pip install --upgrade pip'
- '%PYTHON2% -m pip install --upgrade -r requirements.txt'
- '%PYTHON2% -m pip install --upgrade pypubsub==3.3.0 PySocks win_inet_pton'
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
artifacts:
paths:
- music_dl_py2.zip
name: music_dl_py2
expire_in: 1 day