68 lines
2.5 KiB
YAML
68 lines
2.5 KiB
YAML
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
|