2018-08-30 22:39:24 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# global settings
|
2024-01-18 22:02:10 +00:00
|
|
|
image: alpine:edge
|
2024-04-16 06:07:06 +00:00
|
|
|
before_script: &global_before_scripts
|
|
|
|
- apk upgrade -U
|
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
|
|
|
|
2024-03-25 23:37:41 +00:00
|
|
|
# This defines the rules for when a pipeline should run.
|
|
|
|
workflow:
|
|
|
|
rules:
|
|
|
|
# Don't run branch pipeline if an MR is open (only the MR pipeline will run)
|
|
|
|
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
|
|
|
|
when: never
|
|
|
|
# Run for merge requests
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
|
|
# Run scheduled pipeline for autoupdate
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
2019-02-09 21:18:00 +00:00
|
|
|
|
2018-08-30 22:39:24 +00:00
|
|
|
# device documentation
|
|
|
|
wiki:
|
2020-08-24 14:22:23 +00:00
|
|
|
stage: lint
|
2024-03-25 23:37:41 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
|
|
|
changes:
|
2024-04-16 12:35:34 +00:00
|
|
|
- .ci/**/*
|
|
|
|
- .gitlab-ci.yml
|
2024-03-25 23:37:41 +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
|
2024-01-18 21:52:17 +00:00
|
|
|
ruff:
|
2020-08-24 14:22:23 +00:00
|
|
|
stage: lint
|
2024-03-25 23:37:41 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
|
|
|
changes:
|
|
|
|
- .ci/*
|
|
|
|
- .ci/*/*
|
|
|
|
- .gitlab-ci.yml
|
2019-10-31 11:19:39 +00:00
|
|
|
script:
|
2022-10-30 14:21:20 +00:00
|
|
|
- .ci/lib/gitlab_prepare_ci.sh
|
2024-01-18 21:52:17 +00:00
|
|
|
- .ci/ruff.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-11-10 11:05:10 +00:00
|
|
|
image: alpine:edge
|
2024-03-25 23:37:41 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
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
|
|
|
|
image: alpine:edge
|
2024-03-25 23:37:41 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
2022-10-12 20:46:38 +00:00
|
|
|
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
|
2024-03-25 23:37:41 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
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
|
2024-03-25 23:37:41 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
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-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
|
2024-03-25 23:37:41 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
|
|
|
changes:
|
|
|
|
- device/*/linux-*/config-*
|
|
|
|
- main/linux-*/config-*
|
2019-11-12 23:28:57 +00:00
|
|
|
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
|
2024-03-25 23:37:41 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
2019-02-09 21:18:00 +00:00
|
|
|
before_script:
|
2024-04-16 06:07:06 +00:00
|
|
|
- *global_before_scripts
|
2019-02-09 21:18:00 +00:00
|
|
|
- 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
|
2024-03-25 23:37:41 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
2018-08-30 22:39:24 +00:00
|
|
|
before_script:
|
2024-04-16 06:07:06 +00:00
|
|
|
- *global_before_scripts
|
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
|