forked from termux/x11-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
60 lines (50 loc) · 1.64 KB
/
.cirrus.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
container:
image: termux/package-builder:latest
cpu: 4
memory: 8
##
## Perform basic check for errors in build.sh package scripts.
## If error found, exit with error code to stop build.
##
task:
name: Lint packages
timeout_in: 5m
script: |
bash ./scripts/lint-packages.sh
##
## Determine changes in the last push, find modified packages and
## build them for aarch64/arm/i686/x86_64 architectures.
##
## Built packages are accessible from Cirrus CI web interface.
##
task:
name: Build packages
# 2 hours is a maximal timeout available for free use.
timeout_in: 120m
depends_on:
- Lint packages
environment:
TERMUX_MAKE_PROCESSES: 4
matrix:
- TERMUX_ARCH: aarch64
- TERMUX_ARCH: arm
- TERMUX_ARCH: i686
- TERMUX_ARCH: x86_64
# Do not use built-in git client provided by Cirrus as it may
# cause problems when determining changed files.
clone_script: |
if [[ -z "$CIRRUS_PR" ]]; then
git clone --recursive --branch="$CIRRUS_BRANCH" "https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git" "$CIRRUS_WORKING_DIR"
git reset --hard "$CIRRUS_CHANGE_IN_REPO"
else
git clone --recursive "https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git" "$CIRRUS_WORKING_DIR"
git fetch origin "pull/$CIRRUS_PR/head:pull/$CIRRUS_PR"
git reset --hard "$CIRRUS_CHANGE_IN_REPO"
fi
build_script: |
bash ./scripts/cirrus-ci_dispatcher.sh
if ls ./termux-packages/debs/*.deb >/dev/null 2>&1; then
mv ./termux-packages/debs/*.deb ./debs/
fi
output_artifacts:
path: "./debs/*.deb"