forked from armbian/build
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (65 loc) · 2.46 KB
/
testpr.yml
File metadata and controls
67 lines (65 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Test pull request
# This workflow is triggered on pushes to the repository.
on: [pull_request]
jobs:
shellcheck:
name: shellcheck
runs-on: ubuntu-20.04
if: ${{ github.repository_owner == 'Armbian' }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Environment variables
run: sudo -E bash -c set
- name: Install required packages
run: sudo apt-get install shellcheck jq
- name: "shellcheck lint error report json format"
shell: bash {0}
run: |
shellcheck -f json -x -s bash -S warning -e SC2034,SC1090,SC2154,SC2153 lib/*.sh > report.json
cat report.json |jq -C 'group_by(.file)|.[] | {file: [(limit(1;.[].file)), {shellcheck_codes: [{code: (group_by(.code)|.[] | limit(1;.[].code)), count: length}]}], file_error_count: length}'
#shellcheck --color -x -s bash -S warning -e SC2034,SC1090,SC2154,SC2153 lib/*.sh && echo "shellcheck lib/*.sh - OK";
build_sbc_kernel:
name: Compile changed kernel
# This job runs on self hosted Linux machine, with public label
runs-on: [self-hosted, public, x64, big]
if: ${{ github.repository_owner == 'Armbian' }}
steps:
# - uses: rokroskar/workflow-run-cleanup-action@v0.2.2
# env:
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: fix sudo ownership
run: |
stat build && sudo chown -R $(whoami) build || echo "fresh workspace detected"
- uses: actions/checkout@v2
with:
fetch-depth: 0
path: build
clean: false
- uses: actions/checkout@v2
with:
repository: armbian/ci-testing-tools
path: ci-testing-tools
- name: Find SBC target and build kernel
shell: bash {0}
run: |
cd build
GIT_COMMIT=$(echo $GITHUB_SHA)
GIT_PREVIOUS_COMMIT=$(git rev-parse origin/$GITHUB_BASE_REF)
ARMBIAN_BOARD=tritium-h5
ARMBIAN_BRANCH=current
cd ..
env
source ci-testing-tools/jenkins_ci.sh
mkdir -p build/userpatches
cp -f ci-testing-tools/config-jenkins-kernel.conf build/userpatches/
configure_monorepo_watcher
generate_board_table
load_board_table
cd build
get_files_changed
get_build_target
git checkout ${GITHUB_SHA}
git branch -v
export GPG_TTY=$(tty)
build_kernel jenkins-kernel