Compare commits

...
Author SHA1 Message Date
Caleb Connolly 2557507c2e WIP: add support for postmarketos.org/pmb-ci 2022-10-25 23:32:05 +01:00
5 changed files with 40 additions and 9 deletions

No files matched your search

+3 -1
View File
@@ -1,6 +1,8 @@
#!/bin/sh -e
# Description: Make sure all DTBs are installed in the right place
# https://postmarktos.org/pmb-ci
if grep -r 'INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb'; then
if grep -r 'INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb' */*/linux-*/APKBUILD; then
echo 'Please do not install dtbs to /usr/share/dtb!'
echo 'Unless you have a good reason not to, please put them in /boot/dtbs'
exit 1
Executable
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh -e
# Description: Run editconfig-checker (file formatting)
# https://postmarktos.org/pmb-ci
if [ "$(id -u)" = 0 ]; then
set -x
apk -q add \
editorconfig-checker
exec su "${TESTUSER:-build}" -c "sh -e $0"
fi
ec
Executable
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh -e
# Description: Lint testcases
# https://postmarktos.org/pmb-ci
if [ "$(id -u)" = 0 ]; then
set -x
apk -q add \
py-flake8
exec su "${TESTUSER:-build}" -c "sh -e $0"
fi
flake8 --ignore E501,F401,E722,W504,W605
+9
View File
@@ -1,11 +1,20 @@
#!/bin/sh -e
# Description: Run shellcheck on everything
# Copyright 2021 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later
# https://postmarktos.org/pmb-ci
set -e
DIR="$(cd "$(dirname "$0")" && pwd -P)"
cd "$DIR/.."
if [ "$(id -u)" = 0 ]; then
set -x
apk -q add \
shellcheck
exec su "${TESTUSER:-build}" -c "sh -e $0"
fi
# Find CHANGEMEs in APKBUILDs
if grep -qr '(CHANGEME!)' *; then
echo "ERROR: Please replace '(CHANGEME!)' in the following files:"
+4 -8
View File
@@ -2,6 +2,8 @@
# global settings
image: alpine:latest
variables:
TESTUSER: "root"
after_script:
- .ci/move_logs.sh $CI_PROJECT_DIR
stages:
@@ -46,10 +48,8 @@ testcases-linting:
changes:
- .ci/*
- .ci/*/*
before_script:
- apk -q add py-flake8
script:
- flake8 --ignore E501,F401,E722,W504,W605
- .ci/flake8.sh
# shellcheck
shellcheck:
@@ -57,18 +57,14 @@ shellcheck:
<<: *only-default
image: alpine:edge
before_script:
- apk -q add shellcheck
script:
- .ci/shellcheck.sh
editor-config:
stage: lint
<<: *only-default
image: alpine:edge
before_script:
- apk -q add editorconfig-checker
script:
- ec
- .ci/ec.sh
# aports checks (generic)
aports-static: