This repository has been archived by the owner on Nov 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
108 lines (99 loc) · 2.32 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
image: java:1.8.0-jdk
stages:
- prepare
- track
- check
- build
- run
java-version:
stage: prepare
script:
# Checking Java version + Directories
- readlink -f $(which java)
- java -version
retry: 1
only:
- develop
gradle-version:
stage: prepare
script:
# Checking Gradle version
- gradle -version
retry: 1
only:
- develop
set-paths:
stage: prepare
script:
# Setting JAVA and Gradle to the default path
- export PATH=$PATH:/opt/gradle/gradle-4.2.1/bin
- export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
- export PATH=$PATH:/usr/lib/jvm/java-8-openjdk-amd64/jre/bin
only:
- develop
code-count:
stage: track
script:
- ls -las
#
# Calculate .java count
- echo '|Lines |Words |Chars' > java_tracker.txt
- git ls-files | grep "\(.java\)$" | xargs wc -cwl
- git ls-files | grep "\(.java\)$" | xargs wc -cwl >> java_tracker.txt
#
# Calculate with coverage
- cloc core
- cloc core > adv_java_tracker.txt
- cloc desktop
- cloc desktop >> adv_java_tracker.txt
- cloc . --by-file-by-lang
- cloc . --by-file-by-lang > all_adv_java_tracker.txt
#
# Calculate .gradle count
#- echo '|Lines |Words |Chars' > gradle_tracker.txt
- git ls-files | grep "\(.gradle\)$" | xargs wc -cwl
#- git ls-files | grep "\(.gradle\)$" | xargs wc -cwl >> gradle_tracker.txt
#
# Lists all assets
- git ls-files > assets_list.txt
#
# Keep the development graph line
- git log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"
#- git log --graph --full-history --all --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s" > logs.txt
#
# Check directory again
- mkdir trackers
- mv *.txt trackers/
- ls -las
artifacts:
expire_in: 30 day
paths:
- trackers
allow_failure: true
retry: 1
only:
- develop
- master
gradle-tasks:
stage: check
script:
# Gives out lists of Gradle Tasks
- gradle -q tasks
retry: 1
gradle-clean:
stage: check
script:
# Deletes previous build cache
- gradle clean
retry: 1
build-game:
stage: build
script:
# Pretty much like compiling the files
- gradle assemble
run-game:
stage: run
script:
# Do gradle check and gradle assemble
- gradle run
retry: 1