-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
45 lines (42 loc) · 1.52 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
before_script:
- echo "BRANCH='${CI_COMMIT_REF_NAME}'\n" >> sh2msg/cli/version.py
- echo "COMMIT_REF='${CI_COMMIT_SHA:0:8}'\n" >> sh2msg/cli/version.py
linux-amd64:
stage: build
image: python:3.7.1-stretch
artifacts:
name: "${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA:0:8}-linux-amd64"
paths:
- sh2msg-linux-amd64/*
script:
- pip3 install pyinstaller -q
- pyinstaller sh2msg.spec
- cp README.md dist/
- cp COPYING dist/
- cp ControlCodes.md dist/
- mv dist sh2msg-linux-amd64
sh2msg-win-amd64:
image: debian:stable
stage: build
artifacts:
name: "${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA:0:8}-windows-amd64"
paths:
- sh2msg-win-amd64/*
script:
- apt-get update -y
- dpkg --add-architecture i386
- apt update
- apt-get install xvfb wget wine wine32 wine64 libwine libwine:i386 fonts-wine -y
- wget https://www.python.org/ftp/python/3.7.4/python-3.7.4-amd64.exe
- wineboot -u
- wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
- chmod +x winetricks
- sh winetricks win7
- xvfb-run wine python-3.7.4-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 TargetDir=c:\Python374
- wine C:/Python374/python.exe -m ensurepip --upgrade
- wine C:/Python374/python.exe -m pip install pyinstaller
- wine C:/Python374/scripts/pyinstaller.exe -F sh2msg.spec
- cp README.md dist/
- cp COPYING dist/
- cp ControlCodes.md dist/
- mv dist sh2msg-win-amd64