2019-05-01 18:22:12 +02:00
|
|
|
container:
|
2019-07-23 01:47:41 +02:00
|
|
|
image: termux/package-builder:latest
|
2019-10-24 21:31:43 +02:00
|
|
|
|
2019-08-14 13:27:16 +02:00
|
|
|
##
|
|
|
|
## When doing release builds (branch 'master'), update Docker image if
|
|
|
|
## required.
|
|
|
|
##
|
2019-07-23 22:32:20 +02:00
|
|
|
docker_builder:
|
|
|
|
name: Update docker image
|
|
|
|
|
|
|
|
only_if: $CIRRUS_BRANCH == 'master'
|
|
|
|
|
|
|
|
env:
|
|
|
|
DOCKER_USERNAME: xeffyr
|
|
|
|
DOCKER_PASSWORD: ENCRYPTED[abe4dc4418b40a4c5a0c1671e4018fd9cc3bcb811a71f87bdb35967ba721501f958d47d48a3d31ab9cac466b48f238a0]
|
|
|
|
|
2019-08-14 13:27:16 +02:00
|
|
|
script: |
|
2019-07-23 22:32:20 +02:00
|
|
|
bash ./scripts/build/ci/cirrus-ci_dispatcher.sh --update-docker
|
|
|
|
|
2019-08-14 13:27:16 +02:00
|
|
|
##
|
|
|
|
## Perform basic check for errors in build.sh package scripts.
|
|
|
|
## If error found, exit with error code to stop build.
|
|
|
|
##
|
2019-07-20 21:59:16 +02:00
|
|
|
task:
|
2019-10-25 13:58:39 +02:00
|
|
|
container:
|
|
|
|
cpu: 1
|
|
|
|
memory: 4
|
|
|
|
|
2019-08-14 13:27:16 +02:00
|
|
|
name: Lint packages
|
|
|
|
|
|
|
|
timeout_in: 5m
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- Update docker image
|
|
|
|
|
|
|
|
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:
|
2019-10-25 13:58:39 +02:00
|
|
|
container:
|
|
|
|
# Max configuration required by few large packages such as `rust`.
|
|
|
|
cpu: 8
|
|
|
|
memory: 24
|
|
|
|
|
2019-08-14 13:27:16 +02:00
|
|
|
name: Build packages
|
2019-07-20 21:59:16 +02:00
|
|
|
|
2019-07-23 01:47:41 +02:00
|
|
|
# 2 hours is a maximal timeout available for free use.
|
2019-07-20 21:59:16 +02:00
|
|
|
timeout_in: 120m
|
|
|
|
|
2019-07-23 22:51:14 +02:00
|
|
|
depends_on:
|
2019-08-14 13:27:16 +02:00
|
|
|
- Lint packages
|
2019-07-23 22:49:13 +02:00
|
|
|
|
2019-07-20 21:59:16 +02:00
|
|
|
environment:
|
2019-10-24 21:31:43 +02:00
|
|
|
TERMUX_MAKE_PROCESSES: 8
|
2019-07-20 21:59:16 +02:00
|
|
|
matrix:
|
2019-09-10 15:09:32 +02:00
|
|
|
- TERMUX_ARCH: aarch64
|
|
|
|
- TERMUX_ARCH: arm
|
|
|
|
- TERMUX_ARCH: i686
|
|
|
|
- TERMUX_ARCH: x86_64
|
2019-07-20 21:59:16 +02:00
|
|
|
|
2019-08-14 13:27:16 +02:00
|
|
|
# Do not use built-in git client provided by Cirrus as it may
|
2019-07-23 11:19:42 +02:00
|
|
|
# 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
|
|
|
|
|
2019-07-23 01:47:41 +02:00
|
|
|
build_script: |
|
2019-09-10 15:09:32 +02:00
|
|
|
export TERMUX_DEBDIR="/tmp/debs-${TERMUX_ARCH}"
|
|
|
|
ln -s "$TERMUX_DEBDIR" debs
|
2019-07-23 01:47:41 +02:00
|
|
|
bash ./scripts/build/ci/cirrus-ci_dispatcher.sh
|
2019-07-21 00:21:31 +02:00
|
|
|
|
2019-09-10 15:09:32 +02:00
|
|
|
aarch64_debs_cache:
|
|
|
|
folder: "/tmp/debs-aarch64"
|
|
|
|
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-aarch64"
|
|
|
|
|
|
|
|
arm_debs_cache:
|
|
|
|
folder: "/tmp/debs-arm"
|
|
|
|
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-arm"
|
|
|
|
|
|
|
|
i686_debs_cache:
|
|
|
|
folder: "/tmp/debs-i686"
|
|
|
|
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-i686"
|
|
|
|
|
|
|
|
x86-64_debs_cache:
|
|
|
|
folder: "/tmp/debs-x86_64"
|
|
|
|
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-x86_64"
|
|
|
|
|
2019-07-21 00:21:31 +02:00
|
|
|
output_artifacts:
|
|
|
|
path: "./debs/*.deb"
|
2019-07-23 01:47:41 +02:00
|
|
|
|
2019-08-14 13:27:16 +02:00
|
|
|
##
|
|
|
|
## When doing release build (branch 'master'), upload built packages
|
|
|
|
## to APT repository on Bintray.
|
|
|
|
##
|
2019-07-23 01:47:41 +02:00
|
|
|
task:
|
2019-10-25 13:58:39 +02:00
|
|
|
container:
|
|
|
|
cpu: 1
|
|
|
|
memory: 4
|
|
|
|
|
2019-08-14 13:27:16 +02:00
|
|
|
name: Upload packages to Bintray
|
2019-07-23 01:47:41 +02:00
|
|
|
|
|
|
|
only_if: $CIRRUS_BRANCH == 'master'
|
|
|
|
|
|
|
|
timeout_in: 60m
|
|
|
|
|
|
|
|
depends_on:
|
2019-08-14 13:27:16 +02:00
|
|
|
- Build packages
|
2019-07-23 01:47:41 +02:00
|
|
|
|
|
|
|
environment:
|
|
|
|
BINTRAY_USERNAME: xeffyr
|
|
|
|
BINTRAY_API_KEY: ENCRYPTED[c056d345d7a15f90b818dd9382129c27ce4ce2b802831ec890786414fc214c4203714c353a8fef3a6b9b1b1d68e4685e]
|
|
|
|
BINTRAY_GPG_SUBJECT: termux
|
|
|
|
BINTRAY_GPG_PASSPHRASE: ENCRYPTED[854c09c78b3318a30d3c9094b1010dfebd4c71ad9173b64479eaafaa7e941b050afaa936ad635af3709382492828316f]
|
|
|
|
|
2019-09-10 16:16:11 +02:00
|
|
|
# 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
|
|
|
|
|
2019-09-10 15:09:32 +02:00
|
|
|
aarch64_debs_cache:
|
|
|
|
folder: "./debs"
|
|
|
|
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-aarch64"
|
|
|
|
|
|
|
|
arm_debs_cache:
|
|
|
|
folder: "./debs"
|
|
|
|
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-arm"
|
|
|
|
|
|
|
|
i686_debs_cache:
|
|
|
|
folder: "./debs"
|
|
|
|
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-i686"
|
|
|
|
|
|
|
|
x86-64_debs_cache:
|
|
|
|
folder: "./debs"
|
|
|
|
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-x86_64"
|
|
|
|
|
2019-08-14 13:27:16 +02:00
|
|
|
script: |
|
2019-07-23 01:47:41 +02:00
|
|
|
bash ./scripts/build/ci/cirrus-ci_dispatcher.sh --upload
|