aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroldmud0 <3421260-oldmud0@users.noreply.gitlab.com>2019-01-25 02:13:49 +0000
committeroldmud0 <3421260-oldmud0@users.noreply.gitlab.com>2019-01-25 02:13:49 +0000
commit9c895ae6c4410f6b352986481f47cff59993a819 (patch)
tree5af8ff32e32810cb3707b3dd6da7700bd4640f4c
parent21c9632de0e7132013291c22bff9117fac4f6c70 (diff)
Add Windows static target to .gitlab-ci.yml (incomplete)
-rw-r--r--.gitlab-ci.yml73
1 files changed, 56 insertions, 17 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b9c966df..f1ba670a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,3 @@
-image: rabits/qt:5.9-desktop
-
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
@@ -15,6 +13,7 @@ before_script:
- cd ..
build linux x86_64:
+ image: rabits/qt:5.9-desktop
stage: build
tags:
- docker
@@ -27,7 +26,35 @@ build linux x86_64:
paths:
- bin/
-deploy:
+build windows i686:
+ image: fffaraz/qt
+ stage: build
+ tags:
+ - docker
+ - linux
+ script:
+ - qmake
+ - make -j4
+ - upx --lzma -9 --force bin/Attorney_Online.exe
+
+# Base folder
+.deploy_base: &deploy_base
+ - mkdir base
+ - mkdir base/themes
+ - cp -a ../base/themes/default base/themes/
+ - cp -a ../base/config.ini base/config.sample.ini
+ - cp -a ../base/serverlist.txt base/serverlist.sample.txt
+
+# Miscellaneous files
+.deploy_misc: &deploy_misc
+ - cp -a ../README.md README.md.txt
+ - cp -a ../LICENSE.MIT LICENSE.txt
+
+# Shared libraries
+.deploy_libs: &deploy_libs
+ - cp -a ../lib/* .
+
+deploy linux:
stage: deploy
dependencies:
- build linux x86_64
@@ -37,20 +64,9 @@ deploy:
script:
- mkdir artifact
- cd artifact
-
- # Base folder
- - mkdir base
- - mkdir base/themes
- - cp -a ../base/themes/default base/themes/
- - cp -a ../base/config.ini base/config.sample.ini
- - cp -a ../base/serverlist.txt base/serverlist.sample.txt
-
- # Miscellaneous files
- - cp -a ../README.md README.md.txt
- - cp -a ../LICENSE.MIT LICENSE.txt
-
- # Shared libraries
- - cp -a ../lib/* .
+ - *deploy_base
+ - *deploy_misc
+ - *deploy_libs
# Platform-specific
- cp -a ../bin/Attorney_Online .
@@ -63,7 +79,30 @@ deploy:
- mkdir ../zip
- tar cavf ../zip/Attorney_Online_$(git describe --tags)_x64.tar.xz *
- sha1sum ../zip/*
+ artifacts:
+ paths:
+ - zip/
+
+deploy windows:
+ stage: deploy
+ dependencies:
+ - build windows i686
+ tags:
+ - docker
+ - linux
+ script:
+ - mkdir artifact
+ - cd artifact
+ - *deploy_base
+ - *deploy_misc
+ - *deploy_libs
+ # Platform-specific
+ - cp -a ../bin/Attorney_Online.exe .
+
+ # Zipping
+ # -r: recursive; -9: max compression; -l: convert to CR LF
+ - zip -r -9 -l Attorney_Online_$(git describe --tags)_windows_i386.zip .
artifacts:
paths:
- zip/ \ No newline at end of file