-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
104 lines (96 loc) · 2.73 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
variables:
RUST_BACKTRACE: full
stages:
- check
- test
- publish
- report
- pages
check-commits:
before_script:
- pacman-key --init
- pacman -Sy --needed --noconfirm archlinux-keyring
- source .env && pacman -Syu --needed --noconfirm $PACMAN_PACKAGES
# fetch the default branch as we need it for comparison
- git fetch origin $CI_DEFAULT_BRANCH
# setup a dummy user as `cog verify` needs that
- git config --local user.name "Foobar McFooface"
- git config --local user.email "foobar@mcfooface.com"
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
script:
- just check-commits
stage: check
check:
before_script:
- pacman-key --init
- pacman -Sy --needed --noconfirm archlinux-keyring
- source .env && pacman -Syu --needed --noconfirm $PACMAN_PACKAGES
- just install-rust-dev-tools
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- just check
stage: check
test:
before_script:
- pacman-key --init
- pacman -Sy --needed --noconfirm archlinux-keyring
- source .env && pacman -Syu --needed --noconfirm $PACMAN_PACKAGES
- just install-rust-dev-tools
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- just test
- just build-book
stage: test
integration-test:
before_script:
- pacman-key --init
- pacman -Sy --needed --noconfirm archlinux-keyring
- source .env && pacman -Syu --needed --noconfirm $PACMAN_PACKAGES
- just install-rust-dev-tools
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- just ignored=true test
stage: test
crates_publish:
before_script:
- pacman-key --init
- pacman -Sy --needed --noconfirm archlinux-keyring
- source .env && pacman -Syu --needed --noconfirm $PACMAN_PACKAGES
- just install-rust-dev-tools
dependencies: []
rules:
- if: '$CARGO_REGISTRY_TOKEN && $CI_COMMIT_TAG && $CI_PROJECT_PATH == "archlinux/alpm/alpm"'
script:
- just ci-publish
stage: publish
tags:
- secure
issue-bot:
stage: report
image: registry.gitlab.com/gitlab-org/distribution/issue-bot:latest
script: /issue-bot
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
when: on_failure
pages:
before_script:
- pacman-key --init
- pacman -Sy --needed --noconfirm archlinux-keyring
- source .env && pacman -Syu --needed --noconfirm $PACMAN_PACKAGES
- just install-rust-dev-tools
stage: pages
script:
- just build-book
artifacts:
paths:
- output/docs
publish: output/docs
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH