-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
81 lines (77 loc) · 1.85 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
docker_image_debian:
image: docker:27
stage: build
services:
- docker:27-dind
script:
- cd ci/
- docker build -t $CI_REGISTRY/striezel/webp-viewer/debian:12 . -f Dockerfile_debian
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $CI_REGISTRY/striezel/webp-viewer/debian:12
- docker logout $CI_REGISTRY
# Only build new image when the Dockerfile or the GitLab CI configuration
# changes.
only:
changes:
- ci/Dockerfile_debian
- .gitlab-ci.yml
debian:
image: registry.gitlab.com/striezel/webp-viewer/debian:12
stage: test
before_script:
- apt-get update && apt-get -y upgrade
script:
# build
- export CXX=g++-12
- export CC=gcc-12
- mkdir build
- cd build
- cmake ../
- make -j4
# tests
- ctest -V
docker_image_fedora:
image: docker:27
stage: build
services:
- docker:27-dind
script:
- cd ci/
- docker build -t $CI_REGISTRY/striezel/webp-viewer/fedora:41 . -f Dockerfile_fedora
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $CI_REGISTRY/striezel/webp-viewer/fedora:41
- docker logout $CI_REGISTRY
# Only build new image when the Dockerfile or the GitLab CI configuration
# changes.
only:
changes:
- ci/Dockerfile_fedora
- .gitlab-ci.yml
fedora:
image: registry.gitlab.com/striezel/webp-viewer/fedora:41
stage: test
before_script:
- yum update -y
script:
# build
- export CXX=g++
- export CC=gcc
- mkdir build
- cd build
- cmake ../
- make -j4
# tests
- ctest -V
package_debian:
image: debian:12-slim
stage: build
before_script:
- ./ci/01-install-dependencies.sh
script:
- export GITLAB_CI=true
- ./ci/02-create-package.sh
only:
- tags
artifacts:
paths:
- "webp-viewer*.deb"