termux-packages/.cirrus.yml

58 lines
1.5 KiB
YAML

container:
image: termux/package-builder:legacy
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/build/ci/cirrus-ci_dispatcher.sh
output_artifacts:
path: "./debs/*.deb"