2018-08-30 22:39:24 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# global settings
|
2019-11-10 11:05:10 +00:00
|
|
|
image: alpine:latest
|
2018-08-30 22:39:24 +00:00
|
|
|
after_script:
|
2022-10-30 16:58:48 +00:00
|
|
|
- .ci/lib/move_logs.sh $CI_PROJECT_DIR
|
2018-08-30 22:39:24 +00:00
|
|
|
stages:
|
2020-08-24 14:22:23 +00:00
|
|
|
- lint
|
|
|
|
- build
|
2018-08-30 22:39:24 +00:00
|
|
|
|
2019-02-09 21:18:00 +00:00
|
|
|
# defaults for "only"
|
|
|
|
# We need to run the CI jobs in a "merge request specific context", if CI is
|
|
|
|
# running in a merge request. Otherwise the environment variable that holds the
|
|
|
|
# merge request ID is not available. This means, we must set the "only"
|
|
|
|
# variable accordingly - and if we only do it for one job, all other jobs will
|
|
|
|
# not get executed. So have the defaults here, and use them in all jobs that
|
|
|
|
# should run on both the master branch, and in merge requests.
|
|
|
|
# https://docs.gitlab.com/ee/ci/merge_request_pipelines/index.html#excluding-certain-jobs
|
|
|
|
.only-default: &only-default
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- merge_requests
|
|
|
|
- tags
|
|
|
|
|
2018-08-30 22:39:24 +00:00
|
|
|
# device documentation
|
|
|
|
wiki:
|
2020-08-24 14:22:23 +00:00
|
|
|
stage: lint
|
2019-02-09 21:18:00 +00:00
|
|
|
<<: *only-default
|
2019-10-31 11:19:39 +00:00
|
|
|
only:
|
2019-11-11 23:27:49 +00:00
|
|
|
refs:
|
|
|
|
- merge_requests
|
2019-10-31 11:19:39 +00:00
|
|
|
changes:
|
2020-03-14 08:30:58 +00:00
|
|
|
- device/*/device-*/*
|
2018-08-30 22:39:24 +00:00
|
|
|
script:
|
2022-10-30 14:08:36 +00:00
|
|
|
- .ci/lib/gitlab_prepare_ci.sh
|
|
|
|
- .ci/wiki.sh
|
2018-08-30 22:39:24 +00:00
|
|
|
|
2019-10-31 11:19:39 +00:00
|
|
|
# testcases linting
|
2022-10-30 14:21:20 +00:00
|
|
|
flake8:
|
2020-08-24 14:22:23 +00:00
|
|
|
stage: lint
|
2019-10-31 11:19:39 +00:00
|
|
|
<<: *only-default
|
|
|
|
only:
|
2019-11-11 23:27:49 +00:00
|
|
|
refs:
|
|
|
|
- merge_requests
|
2019-10-31 11:19:39 +00:00
|
|
|
changes:
|
2021-09-13 16:15:23 +00:00
|
|
|
- .ci/*
|
|
|
|
- .ci/*/*
|
2019-10-31 11:19:39 +00:00
|
|
|
before_script:
|
2019-11-11 22:24:39 +00:00
|
|
|
- apk -q add py-flake8
|
2019-10-31 11:19:39 +00:00
|
|
|
script:
|
2022-10-30 14:21:20 +00:00
|
|
|
- .ci/lib/gitlab_prepare_ci.sh
|
|
|
|
- .ci/flake8.sh
|
2019-10-31 11:19:39 +00:00
|
|
|
|
2022-10-30 14:33:51 +00:00
|
|
|
# shellcheck and various grep checks
|
|
|
|
shellcheck-grep:
|
2020-08-24 14:22:23 +00:00
|
|
|
stage: lint
|
2019-02-09 21:18:00 +00:00
|
|
|
<<: *only-default
|
2019-11-10 11:05:10 +00:00
|
|
|
image: alpine:edge
|
2018-08-30 22:39:24 +00:00
|
|
|
script:
|
2022-10-30 14:33:51 +00:00
|
|
|
- .ci/lib/gitlab_prepare_ci.sh
|
2021-11-18 17:20:41 +00:00
|
|
|
- .ci/shellcheck.sh
|
2022-10-30 14:33:51 +00:00
|
|
|
- .ci/grep.sh
|
2023-12-28 15:38:23 +00:00
|
|
|
- .ci/codeowners.sh
|
2018-08-30 22:39:24 +00:00
|
|
|
|
2022-10-12 20:46:38 +00:00
|
|
|
editor-config:
|
|
|
|
stage: lint
|
|
|
|
<<: *only-default
|
|
|
|
image: alpine:edge
|
|
|
|
script:
|
2022-10-30 15:18:21 +00:00
|
|
|
- .ci/lib/gitlab_prepare_ci.sh
|
|
|
|
- .ci/ec.sh
|
2022-10-12 20:46:38 +00:00
|
|
|
|
2018-08-30 22:39:24 +00:00
|
|
|
# aports checks (generic)
|
2022-10-30 15:48:16 +00:00
|
|
|
pytest-commits:
|
2020-08-24 14:22:23 +00:00
|
|
|
stage: lint
|
2019-02-09 21:18:00 +00:00
|
|
|
<<: *only-default
|
2018-08-30 22:39:24 +00:00
|
|
|
script:
|
2022-10-30 15:48:16 +00:00
|
|
|
- .ci/lib/gitlab_prepare_ci.sh
|
|
|
|
- .ci/pytest.sh
|
|
|
|
- .ci/commits.sh
|
2018-08-30 22:39:24 +00:00
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- log.txt
|
|
|
|
- log_testsuite_pmaports.txt
|
|
|
|
- pmbootstrap.cfg
|
|
|
|
expire_in: 1 week
|
|
|
|
|
2020-01-05 17:05:51 +00:00
|
|
|
# APKBUILD linting
|
|
|
|
aport-lint:
|
2020-08-24 14:22:23 +00:00
|
|
|
stage: lint
|
2020-01-05 17:05:51 +00:00
|
|
|
script:
|
2022-10-30 15:48:16 +00:00
|
|
|
- .ci/lib/gitlab_prepare_ci.sh
|
|
|
|
- .ci/apkbuild-lint.sh
|
2020-01-05 17:05:51 +00:00
|
|
|
only:
|
|
|
|
- merge_requests
|
2020-01-13 14:01:01 +00:00
|
|
|
allow_failure: true
|
2020-01-05 17:05:51 +00:00
|
|
|
|
2019-11-12 23:28:57 +00:00
|
|
|
# kernel kconfig check
|
|
|
|
kernel-kconfig:
|
2020-08-24 14:22:23 +00:00
|
|
|
stage: lint
|
2019-11-12 23:28:57 +00:00
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
- merge_requests
|
|
|
|
changes:
|
2020-03-14 08:30:58 +00:00
|
|
|
- device/*/linux-*/config-*
|
2019-11-12 23:28:57 +00:00
|
|
|
- main/linux-*/config-*
|
|
|
|
script:
|
2022-10-30 16:34:06 +00:00
|
|
|
- .ci/lib/gitlab_prepare_ci.sh
|
|
|
|
- .ci/kconfig.sh
|
2019-11-12 23:28:57 +00:00
|
|
|
|
2019-02-09 21:18:00 +00:00
|
|
|
# MR settings
|
|
|
|
# (Checks for "Allow commits from members who can merge to the target branch")
|
|
|
|
mr-settings:
|
2020-08-24 14:22:23 +00:00
|
|
|
stage: lint
|
2019-02-09 21:18:00 +00:00
|
|
|
only:
|
|
|
|
- merge_requests
|
|
|
|
before_script:
|
|
|
|
- apk -q add python3
|
|
|
|
script:
|
2020-06-16 18:00:23 +00:00
|
|
|
- wget -q "https://gitlab.com/postmarketOS/ci-common/-/raw/master/check_mr_settings.py"
|
|
|
|
- python3 ./check_mr_settings.py
|
2019-02-09 21:18:00 +00:00
|
|
|
|
2018-08-30 22:39:24 +00:00
|
|
|
# build changed aports
|
2020-08-24 13:21:37 +00:00
|
|
|
.build:
|
2020-08-24 14:22:23 +00:00
|
|
|
stage: build
|
2019-02-09 21:18:00 +00:00
|
|
|
<<: *only-default
|
2018-08-30 22:39:24 +00:00
|
|
|
before_script:
|
2022-10-30 15:48:16 +00:00
|
|
|
- .ci/lib/gitlab_prepare_ci.sh
|
|
|
|
after_script:
|
2020-05-24 08:28:55 +00:00
|
|
|
- cp -r /home/pmos/.local/var/pmbootstrap/packages/ packages/ || true
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
paths:
|
|
|
|
- packages/
|
2022-08-03 07:49:36 +00:00
|
|
|
timeout: 10 h
|
2020-08-24 13:21:37 +00:00
|
|
|
|
|
|
|
build-x86_64:
|
|
|
|
extends: .build
|
2022-10-30 15:48:16 +00:00
|
|
|
script:
|
|
|
|
- .ci/build-x86_64.sh
|
2020-08-24 13:21:37 +00:00
|
|
|
|
|
|
|
build-x86:
|
|
|
|
extends: .build
|
2022-10-30 15:48:16 +00:00
|
|
|
script:
|
|
|
|
- .ci/build-x86.sh
|
2020-08-24 13:21:37 +00:00
|
|
|
|
|
|
|
build-aarch64:
|
|
|
|
extends: .build
|
2022-10-30 15:48:16 +00:00
|
|
|
script:
|
|
|
|
- .ci/build-aarch64.sh
|
2020-08-24 13:21:37 +00:00
|
|
|
|
|
|
|
build-armv7:
|
|
|
|
extends: .build
|
2022-10-30 15:48:16 +00:00
|
|
|
script:
|
|
|
|
- .ci/build-armv7.sh
|
2020-08-24 13:21:37 +00:00
|
|
|
|
|
|
|
build-armhf:
|
|
|
|
extends: .build
|
2022-10-30 15:48:16 +00:00
|
|
|
script:
|
|
|
|
- .ci/build-armhf.sh
|
2022-10-18 17:57:43 +00:00
|
|
|
|
|
|
|
build-riscv64:
|
|
|
|
extends: .build
|
2022-10-30 15:48:16 +00:00
|
|
|
script:
|
|
|
|
- .ci/build-riscv64.sh
|