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:
|
2021-09-13 16:15:23 +00:00
|
|
|
- .ci/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
|
|
|
before_script:
|
|
|
|
- apk -q add python3
|
|
|
|
script:
|
2021-09-13 16:15:23 +00:00
|
|
|
- .ci/check_devices_in_wiki.py --booting
|
2018-08-30 22:39:24 +00:00
|
|
|
|
2019-10-31 11:19:39 +00:00
|
|
|
# testcases linting
|
|
|
|
testcases-linting:
|
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:
|
|
|
|
- flake8 --ignore E501,F401,E722,W504,W605
|
|
|
|
|
|
|
|
# shellcheck
|
|
|
|
shellcheck:
|
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:
|
2021-11-10 07:20:04 +00:00
|
|
|
- DOWNLOAD_SHELLCHECK=1 .ci/shellcheck.sh
|
2018-08-30 22:39:24 +00:00
|
|
|
|
|
|
|
# aports checks (generic)
|
|
|
|
aports-static:
|
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
|
|
|
before_script:
|
2020-04-11 20:40:32 +00:00
|
|
|
- wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
|
|
|
- sh ./install_pmbootstrap.sh pytest
|
2018-08-30 22:39:24 +00:00
|
|
|
script:
|
2021-09-13 16:15:23 +00:00
|
|
|
- su pmos -c ".ci/run_testcases.sh"
|
|
|
|
- su pmos -c ".ci/check_changed_aports_versions.py"
|
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-07-02 23:26:46 +00:00
|
|
|
distfile-check:
|
2020-08-24 14:22:23 +00:00
|
|
|
stage: lint
|
2020-07-02 23:26:46 +00:00
|
|
|
<<: *only-default
|
|
|
|
before_script:
|
|
|
|
- apk -q add make findutils
|
|
|
|
- wget "https://gitlab.com/postmarketOS/ci-common/-/archive/master/ci-common-master.tar.bz2"
|
|
|
|
- tar -xf ci-common-master.tar.bz2
|
|
|
|
- mv ci-common-master/distfile-check/*.sh ci-common-master/distfile-check/Makefile .
|
|
|
|
- rm -r ci-common-master ci-common-master.tar.bz2
|
|
|
|
script:
|
|
|
|
- make -j999
|
|
|
|
|
2020-01-05 17:05:51 +00:00
|
|
|
# APKBUILD linting
|
|
|
|
aport-lint:
|
2020-08-24 14:22:23 +00:00
|
|
|
stage: lint
|
2020-01-06 17:25:27 +00:00
|
|
|
before_script:
|
2020-04-06 21:06:11 +00:00
|
|
|
- wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
|
|
|
- sh ./install_pmbootstrap.sh
|
2020-01-05 17:05:51 +00:00
|
|
|
script:
|
2021-09-13 16:15:23 +00:00
|
|
|
- su pmos -c ".ci/apkbuild-linting.py"
|
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-*
|
|
|
|
before_script:
|
2020-04-11 20:40:32 +00:00
|
|
|
- wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
|
|
|
- sh ./install_pmbootstrap.sh pytest
|
2019-11-12 23:28:57 +00:00
|
|
|
script:
|
|
|
|
- su pmos -c "pmbootstrap kconfig check"
|
|
|
|
|
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:
|
2020-04-11 20:40:32 +00:00
|
|
|
- wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
|
|
|
- sh ./install_pmbootstrap.sh
|
2018-08-30 22:39:24 +00:00
|
|
|
script:
|
2021-09-13 16:15:23 +00:00
|
|
|
- .ci/build.sh
|
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/
|
2020-08-24 13:21:37 +00:00
|
|
|
|
|
|
|
build-x86_64:
|
|
|
|
extends: .build
|
|
|
|
|
|
|
|
build-x86:
|
|
|
|
extends: .build
|
|
|
|
|
|
|
|
build-aarch64:
|
|
|
|
extends: .build
|
|
|
|
|
|
|
|
build-armv7:
|
|
|
|
extends: .build
|
|
|
|
|
|
|
|
build-armhf:
|
|
|
|
extends: .build
|