From 42ebbbce7dd40f1683dfa1b6e3a375ecb2352724 Mon Sep 17 00:00:00 2001 From: Sergei Iudin Date: Wed, 16 Jun 2021 17:02:35 -0700 Subject: [PATCH] test pahole --- .github/actions/vmtest/action.yml | 5 ++++ .github/workflows/pahole.yml | 40 +++++++++++++++++++++++++++++++ travis-ci/vmtest/build_pahole.sh | 3 ++- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pahole.yml diff --git a/.github/actions/vmtest/action.yml b/.github/actions/vmtest/action.yml index 7a3e3e5..82aef7f 100644 --- a/.github/actions/vmtest/action.yml +++ b/.github/actions/vmtest/action.yml @@ -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 diff --git a/.github/workflows/pahole.yml b/.github/workflows/pahole.yml new file mode 100644 index 0000000..329277f --- /dev/null +++ b/.github/workflows/pahole.yml @@ -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' }} diff --git a/travis-ci/vmtest/build_pahole.sh b/travis-ci/vmtest/build_pahole.sh index 159dcb6..9bdbedc 100755 --- a/travis-ci/vmtest/build_pahole.sh +++ b/travis-ci/vmtest/build_pahole.sh @@ -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