-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
116 lines (100 loc) · 4 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
# https://docs.gitlab.com/ee/ci/yaml
# https://docs.gitlab.com/ee/ci/docker
# https://docs.gitlab.com/ce/ci/variables
image: docker:stable
services:
- docker:dind
variables:
GIT_STRATEGY: clone
GIT_CHECKOUT: "true"
# DOCKER_HOST: tcp://docker:2375
# DOCKER_DRIVER: overlay2
CONTAINER_BUILD_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:unstable
stages:
- build
- test
- release
before_script:
- env | sort
- df -hT
- docker info
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
# docker system prune --all --force
build-image:
stage: build
script:
- docker image rm --force $CONTAINER_BUILD_IMAGE
- docker image prune --force
- df -hT
- docker build --pull --tag $CONTAINER_BUILD_IMAGE .
- docker push $CONTAINER_BUILD_IMAGE
- docker image rm --force $CONTAINER_BUILD_IMAGE
- docker image prune --force
- df -hT
test-runtime:
stage: test
script:
- docker pull $CONTAINER_BUILD_IMAGE
- docker run --rm $CONTAINER_BUILD_IMAGE make --version
- docker run --rm $CONTAINER_BUILD_IMAGE gcc --version
- docker run --rm $CONTAINER_BUILD_IMAGE g++ --version
- docker run --rm $CONTAINER_BUILD_IMAGE gfortran --version
- docker run --rm $CONTAINER_BUILD_IMAGE clang --version
- docker run --rm $CONTAINER_BUILD_IMAGE clang++ --version
- docker run --rm $CONTAINER_BUILD_IMAGE java -version
- docker run --rm $CONTAINER_BUILD_IMAGE swig -version
- docker run --rm $CONTAINER_BUILD_IMAGE /usr/bin/python3 --version
- docker run --rm $CONTAINER_BUILD_IMAGE /usr/bin/pip3 --version
- docker run --rm $CONTAINER_BUILD_IMAGE asdf info
- docker run --rm $CONTAINER_BUILD_IMAGE asdf list
- docker run --rm $CONTAINER_BUILD_IMAGE rustc --version
- docker run --rm $CONTAINER_BUILD_IMAGE cargo --version
- docker run --rm $CONTAINER_BUILD_IMAGE go version
- docker run --rm $CONTAINER_BUILD_IMAGE node --version
- docker run --rm $CONTAINER_BUILD_IMAGE npm --version
- docker run --rm $CONTAINER_BUILD_IMAGE npx --version
- docker run --rm $CONTAINER_BUILD_IMAGE python --version
- docker run --rm $CONTAINER_BUILD_IMAGE python3 --version
- docker run --rm $CONTAINER_BUILD_IMAGE pip --version
- docker run --rm $CONTAINER_BUILD_IMAGE pip3 --version
- docker image rm --force $CONTAINER_BUILD_IMAGE
- docker image prune --force
- df -hT
test-tools:
stage: test
script:
- docker pull $CONTAINER_BUILD_IMAGE
- docker run --rm $CONTAINER_BUILD_IMAGE latexmk --version
- docker run --rm $CONTAINER_BUILD_IMAGE xindy --version
- docker run --rm $CONTAINER_BUILD_IMAGE aspell --version
- docker run --rm $CONTAINER_BUILD_IMAGE enchant-2 -v
- docker run --rm $CONTAINER_BUILD_IMAGE hunspell --version
- docker run --rm $CONTAINER_BUILD_IMAGE hunspell -D </dev/null
- docker run --rm $CONTAINER_BUILD_IMAGE convert --version
- docker run --rm $CONTAINER_BUILD_IMAGE rsvg-convert --version
- docker run --rm $CONTAINER_BUILD_IMAGE pdftocairo -v
- docker run --rm $CONTAINER_BUILD_IMAGE dot -V
- docker run --rm $CONTAINER_BUILD_IMAGE plantuml -version
- docker run --rm $CONTAINER_BUILD_IMAGE latexmk -version
- docker run --rm $CONTAINER_BUILD_IMAGE latex -version
- docker run --rm $CONTAINER_BUILD_IMAGE xelatex -version
- docker run --rm $CONTAINER_BUILD_IMAGE pdflatex -version
- docker run --rm $CONTAINER_BUILD_IMAGE xindy --version
- docker run --rm $CONTAINER_BUILD_IMAGE pip list
- docker run --rm $CONTAINER_BUILD_IMAGE pip3 list
- docker image rm --force $CONTAINER_BUILD_IMAGE
- docker image prune --force
- df -hT
release-image:
stage: release
only:
- main
script:
- docker pull $CONTAINER_BUILD_IMAGE
- docker tag $CONTAINER_BUILD_IMAGE $CONTAINER_RELEASE_IMAGE
- docker push $CONTAINER_RELEASE_IMAGE
- docker image rm --force $CONTAINER_BUILD_IMAGE
- docker image rm --force $CONTAINER_RELEASE_IMAGE
- docker image prune --force
- df -hT