This repository has been archived by the owner on Jun 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.gitlab-ci.yml
101 lines (91 loc) · 2.61 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
image: docker:latest
stages:
- prepare-image
- prepare-tree
- build
variables:
CONTAINER_IMAGE: $CI_REGISTRY/$CI_PROJECT_PATH
services:
- docker:dind
before_script:
- apk --update add make cmake py-pip git
- pip install docker-compose
nightly-prepare-image:
stage: prepare-image
script:
- docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY
- docker pull $CONTAINTER_IMAGE:latest || true
- docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:latest .
- docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA
- docker push $CONTAINER_IMAGE:latest
except:
- tags
nightly-prepare-tree:
stage: prepare-tree
script:
- mkdir -p opt/xcsoar opt/xcsoar-ccache
- docker run -v $(pwd)/opt/xcsoar:/opt/xcsoar -v $(pwd)/opt/xcsoar-ccache:/root/.ccache $CONTAINER_IMAGE:$CI_COMMIT_SHA xcsoar-update
except:
- tags
artifacts:
expire_in: 4 weeks
when: always
paths:
- opt/xcsoar
- opt/xcsoar-ccache
nightly-unix:
stage: build
script:
- docker run -v $(pwd)/opt/xcsoar:/opt/xcsoar -v $(pwd)/opt/xcsoar-ccache:/root/.ccache $CONTAINER_IMAGE:$CI_COMMIT_SHA xcsoar-compile UNIX
- docker run -v $(pwd)/opt/xcsoar:/opt/xcsoar -v $(pwd)/opt/xcsoar-ccache:/root/.ccache $CONTAINER_IMAGE:$CI_COMMIT_SHA xcsoar-test
except:
- tags
artifacts:
expire_in: 4 weeks
when: always
paths:
- opt/xcsoar/output/UNIX
nightly-android:
stage: build
script:
- docker run -v $(pwd)/opt/xcsoar:/opt/xcsoar -v $(pwd)/opt/xcsoar-ccache:/root/.ccache $CONTAINER_IMAGE:$CI_COMMIT_SHA xcsoar-compile ANDROID
except:
- tags
artifacts:
expire_in: 4 weeks
when: always
paths:
- opt/xcsoar/output/ANDROID
nightly-pc:
stage: build
script:
- docker run -v $(pwd)/opt/xcsoar:/opt/xcsoar -v $(pwd)/opt/xcsoar-ccache:/root/.ccache $CONTAINER_IMAGE:$CI_COMMIT_SHA xcsoar-compile PC
except:
- tags
artifacts:
expire_in: 4 weeks
when: always
paths:
- opt/xcsoar/output/PC
nightly-kobo:
stage: build
script:
- docker run -v $(pwd)/opt/xcsoar:/opt/xcsoar -v $(pwd)/opt/xcsoar-ccache:/root/.ccache $CONTAINER_IMAGE:$CI_COMMIT_SHA xcsoar-compile KOBO
except:
- tags
artifacts:
expire_in: 4 weeks
when: always
paths:
- opt/xcsoar/output/KOBO
nightly-docs:
stage: build
script:
- docker run -v $(pwd)/opt/xcsoar:/opt/xcsoar -v $(pwd)/opt/xcsoar-ccache:/root/.ccache $CONTAINER_IMAGE:$CI_COMMIT_SHA xcsoar-compile DOCS
except:
- tags
artifacts:
expire_in: 4 weeks
when: always
paths:
- opt/xcsoar/output