2019-02-10 20:19:34 +01:00
|
|
|
image: termux/package-builder:latest
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
2019-03-10 19:43:31 +01:00
|
|
|
- deploy
|
2019-02-10 20:19:34 +01:00
|
|
|
|
|
|
|
## Common configuration for all build jobs.
|
2019-03-04 02:29:40 +01:00
|
|
|
## Variables BINTRAY_* should be unset to
|
|
|
|
## prevent leaking of sensitive information.
|
2019-02-10 20:19:34 +01:00
|
|
|
.job_template: &build_job
|
|
|
|
stage: build
|
2019-03-18 21:55:46 +01:00
|
|
|
except:
|
|
|
|
- schedules
|
2019-02-10 20:19:34 +01:00
|
|
|
script:
|
2019-03-04 02:29:40 +01:00
|
|
|
- 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
|
2019-02-10 20:19:34 +01:00
|
|
|
retry:
|
|
|
|
max: 2
|
|
|
|
when:
|
|
|
|
- runner_system_failure
|
|
|
|
- unknown_failure
|
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
paths:
|
2019-03-04 02:29:40 +01:00
|
|
|
- debs
|
2019-02-10 20:19:34 +01:00
|
|
|
|
|
|
|
## Building packages for AArch64.
|
|
|
|
build-aarch64:
|
|
|
|
<<: *build_job
|
|
|
|
variables:
|
|
|
|
TERMUX_ARCH: aarch64
|
|
|
|
|
|
|
|
## Building packages for ARM.
|
2019-03-19 16:52:33 +01:00
|
|
|
build-arm:
|
|
|
|
<<: *build_job
|
|
|
|
variables:
|
|
|
|
TERMUX_ARCH: arm
|
2019-02-10 20:19:34 +01:00
|
|
|
|
|
|
|
## Building packages for i686.
|
2019-03-24 18:00:56 +01:00
|
|
|
build-i686:
|
|
|
|
<<: *build_job
|
|
|
|
variables:
|
|
|
|
TERMUX_ARCH: i686
|
2019-02-10 20:19:34 +01:00
|
|
|
|
|
|
|
## Building packages for x86_64.
|
2019-03-11 15:03:04 +01:00
|
|
|
#build-x86_64:
|
|
|
|
# <<: *build_job
|
|
|
|
# variables:
|
|
|
|
# TERMUX_ARCH: x86_64
|
2019-03-04 02:09:04 +01:00
|
|
|
|
|
|
|
## Submit build packages to repository.
|
2019-03-10 19:43:31 +01:00
|
|
|
upload-packages:
|
|
|
|
stage: deploy
|
|
|
|
only:
|
2019-03-10 19:44:35 +01:00
|
|
|
- master@termux-mirror/termux-packages
|
2019-03-18 21:55:46 +01:00
|
|
|
except:
|
|
|
|
- schedules
|
2019-03-10 19:43:31 +01:00
|
|
|
script:
|
2019-03-10 20:26:54 +01:00
|
|
|
- MODIFIED_PACKAGES=$(./scripts/build/ci/determine_git_changes.sh)
|
2019-03-10 19:43:31 +01:00
|
|
|
- |
|
|
|
|
if [ -n "$MODIFIED_PACKAGES" ]; then
|
2019-03-10 21:31:49 +01:00
|
|
|
./scripts/package_uploader.sh $MODIFIED_PACKAGES
|
2019-03-10 19:43:31 +01:00
|
|
|
else
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
retry:
|
|
|
|
max: 2
|
|
|
|
when:
|
|
|
|
- runner_system_failure
|
|
|
|
- unknown_failure
|
2019-03-18 21:55:46 +01:00
|
|
|
|
|
|
|
## Remove old versions from the APT repository.
|
|
|
|
repository-cleanup:
|
|
|
|
stage: deploy
|
|
|
|
only:
|
|
|
|
- schedules
|
|
|
|
script:
|
|
|
|
- ./scripts/package_uploader.sh --cleanup $(cd ./packages; echo *)
|
|
|
|
retry:
|
|
|
|
max: 2
|
|
|
|
when:
|
|
|
|
- runner_system_failure
|
|
|
|
- unknown_failure
|