This repository has been archived by the owner on Aug 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
.gitlab-ci.yml
112 lines (95 loc) · 2.86 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
stages:
- linting
- unit_tests
- bot # comes from translations/generator job
- mirror
include:
- project: 'agarroux/publish-github'
ref: master
file: '/jobs/release.gitlab-ci.yml'
- project: 'translations/generator'
ref: master
file: '/jobs/sync-crowdin.gitlab-ci.yml'
- project: 'translations/generator'
ref: master
file: '/jobs/commit-locales.gitlab-ci.yml'
variables:
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
GEM_HOME: "$CI_PROJECT_DIR/gem"
PUBLIC_REPO_URL: [email protected]:ProtonVPN/vpncore.git
.before_script_mac: &before_script_mac
- rm -fr ../tunnelkit || true # ignore failure to delete
- git clone -b protonvpn2/keychain https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.protontech.ch/apple/vpn/tunnelkit.git ../tunnelkit # checkout the keychain_avoid branch
.before_script_mac: &before_script_mac
- rm -fr ../pmnetworking || true # ignore failure to delete
- git clone -b develop https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.protontech.ch/apple/shared/pmnetworking.git ../pmnetworking && (cd ../pmnetworking; git checkout 35b8e110bb15082073be8cf6d95440da954c9365)
- pod install
lint:
stage: linting
tags:
- iOS
- macOS
before_script:
- *before_script_mac
script:
- Pods/SwiftLint/swiftlint --strict --reporter junit > swiftlint.xml
allow_failure: false
artifacts:
name: "core-lint-$CI_COMMIT_TAG"
paths:
- swiftlint.xml
reports:
junit:
- swiftlint.xml
expire_in: 90 days
unit_tests:
dependencies: []
stage: unit_tests
before_script:
- *before_script_mac
script:
- fastlane ios test
- base64 -D -o Certificates.p12 <<< $DEVELOPER_CERTIFICATE
- fastlane mac ci_test
- fastlane/print-coverage.sh fastlane/test_output/vpncore-macos.xcresult
tags:
- iOS
- macOS
artifacts:
reports:
junit:
- fastlane/test_output/report.junit
# --- Sync to github ---
release-publish-github:
stage: mirror
variables:
RELEASE_SYNC_PUBLIC_URL: "$PUBLIC_REPO_URL"
RELEASE_SYNC_FROM_BRANCH: 'master'
extends: .release-sync-commit-shared
release-publish-github-2.0:
stage: mirror
variables:
RELEASE_SYNC_PUBLIC_URL: "$PUBLIC_REPO_URL"
RELEASE_SYNC_TO_BRANCH: 'release-candidate-2.0.0'
RELEASE_SYNC_FROM_BRANCH: 'release-candidate-2.0.0'
extends: .release-sync-commit-shared
release-publish-github-tags:
stage: mirror
only:
refs:
- tags
variables:
- $CI_COMMIT_TAG =~ /^(ios|release-mac)-[\d]+\.[\d]+\.[\d]+$/
variables:
RELEASE_SYNC_PUBLIC_URL: "$PUBLIC_REPO_URL"
extends: .release-sync-tags-shared
# --- Translation related tasks ---
i18n-sync-crowdin:
variables:
I18N_SYNC_CROWDIN_PROJECT: 'apple-vpn'
extends: .i18n-sync-crowdin-shared-apple
i18n-commit-locales:
variables:
I18N_COMMIT_CROWDIN_PROJECT: 'apple-vpn'
extends: .i18n-commit-locales-shared-apple