/
.gitlab-ci.yml
178 lines (157 loc) · 4.43 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
variables:
GIT_SUBMODULE_STRATEGY: recursive
default:
image: $DOCKER_REGISTRY/$CI_PROJECT_PATH
tags: [shared]
before_script:
- cp -r $(pwd)/ /root/quicklisp/local-projects/
- cd /root/quicklisp/local-projects/$CI_PROJECT_NAME
- GT=yes make dependencies libcxx-src
check-format:
stage: .pre
script:
- git lisp-format
except:
- schedules
build-manual:
stage: test
script:
- make doc
except:
- schedules
build-no-tree-sitter:
stage: test
script:
- mv /usr/share/tree-sitter /usr/share/hidden-tree-sitter
- sbcl --non-interactive --eval "(ql:quickload 'software-evolution-library/test)"
except:
- schedules
.test-template: &test
stage: test
script:
- LISP=$LISP GT=yes make real-check
except:
- schedules
test-sbcl:
variables:
LISP: 'sbcl'
<<: *test
test-ccl:
variables:
LISP: 'ccl'
<<: *test
build-python-no-tree-sitter:
stage: test
script:
- mv /usr/share/tree-sitter /usr/share/hidden-tree-sitter
- sbcl --non-interactive --eval "(ql:quickload 'software-evolution-library/run-tree-sitter-py-generator)"
- sbcl --non-interactive --eval "(ql:quickload 'software-evolution-library/run-tree-sitter-interface)"
except:
- schedules
.test-python-template: &test-python
stage: test
except:
- schedules
script:
- pip install -r python/requirements-dev.txt
- pip install -r python/requirements.txt
- pre-commit install
- pre-commit run --all-files
- LISP=$LISP GT=yes make python-check
- pyright --version
- pyright
- mypy python/
test-python-sbcl:
variables:
LISP: 'sbcl'
<<: *test-python
test-python-ccl:
variables:
LISP: 'ccl'
<<: *test-python
deploy-python-package:
stage: deploy
image: $DOCKER_REGISTRY/$CI_PROJECT_PATH/python
script:
- sbcl --load "/root/quicklisp/setup.lisp"
--eval '(ql:quickload :software-evolution-library/run-tree-sitter-py-generator)'
--eval '(asdf:make :software-evolution-library/run-tree-sitter-py-generator)'
--eval '(quit)'
- sbcl --load "/root/quicklisp/setup.lisp"
--eval '(ql:quickload :software-evolution-library/deploy-tree-sitter-interface)'
--eval '(asdf:make :software-evolution-library/deploy-tree-sitter-interface)'
--eval '(quit)'
- cd python/
- python3.8 -m pip install -r requirements-dev.txt
- ../bin/tree-sitter-py-generator > asts/types.py
- python3.8 setup.py bdist_wheel --dist-dir=dist/
- find dist -name \*.whl -print0 | xargs -0 -n1 auditwheel repair -w dist/wheelhouse
- python3.8 -m twine upload --verbose dist/wheelhouse/*.whl -u __token__ -p $PYPI_API_KEY
rules:
- if: '$CI_COMMIT_REF_NAME =~ /^r\d\d\d\d\.\d\d\.\d\d/'
dependent-genpatcher:
stage: deploy
only: [master]
except: [schedules]
trigger: synthesis/genpatcher
dependent-refactoring-mutations:
stage: deploy
only: [master]
except: [schedules]
trigger: synthesis/refactoring-mutations
dependent-resolve:
stage: deploy
only: [master]
except: [schedules]
trigger: synthesis/resolve
dependent-ssr:
stage: deploy
only: [master]
except: [schedules]
trigger: synthesis/ssr
dependent-trace-db:
stage: deploy
only: [master]
except: [schedules]
trigger: synthesis/trace-db
dependent-cram:
stage: deploy
only: [master]
except: [schedules]
trigger: synthesis/cpp-to-rust-assisted-migration
# Use kaniko to build docker image.
# https://docs.gitlab.com/ee/ci/docker/using_kaniko.html
# https://github.com/GoogleContainerTools/kaniko
.image-build: &image-build
stage: build
inherit:
default: false
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
tags: [shared]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$REGISTRY\":{\"username\":\"$USERNAME\",\"password\":\"$PASSWORD\"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context=$CI_PROJECT_DIR/
--dockerfile=$CI_PROJECT_DIR/Dockerfile
--destination=$DESTINATION
--destination=$DESTINATION:r$(date '+%F')
only:
- schedules
scheduled-build-internal:
variables:
DESTINATION: $DOCKER_REGISTRY/$CI_PROJECT_PATH
USERNAME: $CI_REGISTRY_USER
PASSWORD: $CI_REGISTRY_PASSWORD
REGISTRY: $CI_REGISTRY
<<: *image-build
scheduled-build-public:
variables:
DESTINATION: grammatech/sel
USERNAME: $DOCKERHUB_USERNAME
PASSWORD: $DOCKERHUB_PASSWORD
REGISTRY: https://index.docker.io/v1/
<<: *image-build