-
Notifications
You must be signed in to change notification settings - Fork 5
/
.gitlab-ci.yml
153 lines (140 loc) · 3.15 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Configuration for GitLab CI/CD
## https://gitlab.com/sigscale/m3ua
stages:
- build
- test
- deploy
.build:otp: &build_otp
stage: build
image: erlang
script:
# Prepare environmental variables
- export ERL_LIBS="${CI_PROJECT_DIR}/.build/otp-${OTP_VERSION}/lib"
- export ERLANG_INSTALL_LIB_DIR=${ERL_LIBS}
# Install sccp
- mkdir -p .build/otp-${OTP_VERSION}/lib
- cd .build/otp-${OTP_VERSION}/
- git clone https://gitlab.com/sigscale/sccp.git
- cd sccp
- aclocal
- autoheader
- autoconf
- libtoolize --automake
- automake --add-missing
- ./configure
- make
- make install
- cd ${CI_PROJECT_DIR}
# Configure m3ua
- aclocal
- autoheader
- autoconf
- libtoolize --automake
- automake --add-missing
- mkdir -p .build/otp-${OTP_VERSION}/{lib,m3ua}
- cd .build/otp-${OTP_VERSION}/
- cd ${CI_PROJECT_DIR}/.build/otp-${OTP_VERSION}/m3ua
- ../../../configure
- make
build:otp-20:
<<: *build_otp
image: erlang:latest
artifacts:
untracked: true
paths:
- .build/otp-20.*
build:otp-19:
<<: *build_otp
image: erlang:19
artifacts:
untracked: true
paths:
- .build/otp-19.*
build:otp-18:
<<: *build_otp
image: erlang:18
artifacts:
untracked: true
paths:
- .build/otp-18.*
.check:otp: &check_otp
stage: test
image: erlang
script:
- export ERL_LIBS="${CI_PROJECT_DIR}/.build/otp-${OTP_VERSION}/lib"
- export DIALYZER_PLT="${CI_PROJECT_DIR}/.build/otp-${OTP_VERSION}/.dialyzer_plt"
- if ! dialyzer --plt_info; then dialyzer --build_plt --apps erts kernel stdlib compiler mnesia syntax_tools; fi
- cd .build/otp-${OTP_VERSION}/m3ua
- make check
check:otp-20:
<<: *check_otp
image: erlang:20
artifacts:
when: always
paths:
- .build/otp-20.*
dependencies:
- build:otp-20
check:otp-19:
<<: *check_otp
image: erlang:19
artifacts:
when: always
paths:
- .build/otp-19.*
dependencies:
- build:otp-19
check:otp-18:
<<: *check_otp
image: erlang:18
artifacts:
when: always
paths:
- .build/otp-18.*
dependencies:
- build:otp-18
pages:otp-18:
stage: deploy
script:
- mkdir -p .public/doc .public/tests
- cp -r .build/otp-18.*/m3ua/test/log/* .public/tests
- cp -r .build/otp-18.*/m3ua/doc/* .public/doc
- mv .public public
artifacts:
when: always
paths:
- public
dependencies:
- check:otp-18
# Temporary option
when: always
pages:otp-19:
stage: deploy
script:
- mkdir -p .public/doc .public/tests
- cp -r .build/otp-19.*/m3ua/test/log/* .public/tests
- cp -r .build/otp-19.*/m3ua/doc/* .public/doc
- mv .public public
artifacts:
when: always
paths:
- public
dependencies:
- check:otp-19
# Temporary option
when: always
pages:otp-20:
stage: deploy
script:
- mkdir -p .public/doc .public/tests
- cp -r .build/otp-20.*/m3ua/test/log/* .public/tests
- cp -r .build/otp-20.*/m3ua/doc/* .public/doc
- mv .public public
artifacts:
when: always
paths:
- public
dependencies:
- check:otp-20
# Temporary option
when: always