move Jenkins pr testing to GitHub actions. uses same logic for detecting changes in PR. requires runner with public label
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: build pr kernel
|
|
# This workflow is triggered on pushes to the repository.
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
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 }}"
|
|
- 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
|