mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-20 16:29:07 +08:00
test pahole
This commit is contained in:
committed by
Andrii Nakryiko
parent
26497b9a88
commit
42ebbbce7d
5
.github/actions/vmtest/action.yml
vendored
5
.github/actions/vmtest/action.yml
vendored
@@ -5,11 +5,16 @@ inputs:
|
||||
description: 'kernel or LATEST'
|
||||
required: true
|
||||
default: 'LATEST'
|
||||
pahole:
|
||||
description: 'pahole branch'
|
||||
required: true
|
||||
default: 'master'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: |
|
||||
source /tmp/ci_setup
|
||||
export KERNEL=${{ inputs.kernel }}
|
||||
export PAHOLE_BRANCH=${{ inputs.pahole }}
|
||||
$CI_ROOT/vmtest/run_vmtest.sh
|
||||
shell: bash
|
||||
|
||||
40
.github/workflows/pahole.yml
vendored
Normal file
40
.github/workflows/pahole.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: pahole-staging
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
|
||||
|
||||
jobs:
|
||||
vmtest:
|
||||
runs-on: ubuntu-latest
|
||||
name: Kernel LATEST + staging pahole
|
||||
env:
|
||||
STAGING: tmp.master
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/setup
|
||||
- name: Get current pahole sha
|
||||
id: current_sha
|
||||
run:
|
||||
git ls-remote https://git.kernel.org/pub/scm/devel/pahole/pahole.git $STAGING | awk '{print "::set-output name=sha::" $1}'
|
||||
- name: Get latest result for this sha
|
||||
id: latest
|
||||
uses: pat-s/always-upload-cache@v2
|
||||
with:
|
||||
path: last_tested_pahole
|
||||
key: ${{ steps.current_sha.outputs.sha }}
|
||||
- name: Return cached test result
|
||||
run: exit `cat last_tested_pahole || echo 1` # if file is empty that mean previous run timed out of canceled, returning failure
|
||||
if: steps.latest.outputs.cache-hit == 'true'
|
||||
- uses: ./.github/actions/vmtest
|
||||
with:
|
||||
kernel: LATEST
|
||||
pahole: $STAGING
|
||||
if: steps.latest.outputs.cache-hit != 'true'
|
||||
- name: Save success
|
||||
run: echo 0 > last_tested_pahole
|
||||
if: steps.latest.outputs.cache-hit != 'true'
|
||||
- name: Save failure
|
||||
run: echo 1 > last_tested_pahole
|
||||
if: ${{ failure() && steps.latest.outputs.cache-hit != 'true' }}
|
||||
@@ -9,13 +9,14 @@ travis_fold start build_pahole "Building pahole"
|
||||
CWD=$(pwd)
|
||||
REPO_PATH=$1
|
||||
PAHOLE_ORIGIN=https://git.kernel.org/pub/scm/devel/pahole/pahole.git
|
||||
PAHOLE_BRANCH=${PAHOLE_BRANCH:-master}
|
||||
|
||||
mkdir -p ${REPO_PATH}
|
||||
cd ${REPO_PATH}
|
||||
git init
|
||||
git remote add origin ${PAHOLE_ORIGIN}
|
||||
git fetch origin
|
||||
git checkout master
|
||||
git checkout ${PAHOLE_BRANCH}
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
Reference in New Issue
Block a user