armbian-build/.github/workflows/testpr.yml
2020-06-17 23:58:06 -04:00

62 lines
2.0 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-latest
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
- name: "lint libraries via shellcheck"
run: shellcheck --color -x -s bash 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]
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