forked from termux/termux-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
92 lines (84 loc) · 1.87 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
image: termux/package-builder:latest
stages:
- build
- deploy
## Common configuration for all build jobs.
## Variables BINTRAY_* should be unset to
## prevent leaking of sensitive information.
.job_template: &build_job
stage: build
except:
- schedules
script:
- unset BINTRAY_USERNAME
- unset BINTRAY_API_KEY
- unset BINTRAY_GPG_SUBJECT
- unset BINTRAY_GPG_PASSPHRASE
- |
for package in $(./scripts/build/ci/determine_git_changes.sh); do
./build-package.sh -q -i -a "$TERMUX_ARCH" "$package" || exit 1
done
retry:
max: 2
when:
- runner_system_failure
- unknown_failure
artifacts:
when: always
paths:
- debs
## Building packages for AArch64.
build-aarch64:
<<: *build_job
variables:
TERMUX_ARCH: aarch64
## Building packages for ARM.
build-arm:
<<: *build_job
variables:
TERMUX_ARCH: arm
## Building packages for i686.
build-i686:
<<: *build_job
variables:
TERMUX_ARCH: i686
## Building packages for x86_64.
build-x86_64:
<<: *build_job
variables:
TERMUX_ARCH: x86_64
## Submit build packages to repository.
upload-packages:
stage: deploy
only:
- master@termux-mirror/termux-packages
except:
- schedules
script:
- MODIFIED_PACKAGES=$(./scripts/build/ci/determine_git_changes.sh)
- |
if [ -n "$MODIFIED_PACKAGES" ]; then
./scripts/package_uploader.sh $MODIFIED_PACKAGES
else
exit 0
fi
retry:
max: 2
when:
- runner_system_failure
- unknown_failure
## Remove old versions from the APT repository.
repository-cleanup:
stage: deploy
only:
- schedules
script:
- |
if [ -n "$SCHEDULED_REPOSITORY_CLEANUP" ]; then
./scripts/package_uploader.sh --cleanup $(cd ./packages; echo *)
fi
retry:
max: 2
when:
- runner_system_failure
- unknown_failure