From e4a7f679a8bf1caac89657d6fb7011394c7f6852 Mon Sep 17 00:00:00 2001 From: Romain Thomas Date: Tue, 25 Jul 2023 22:04:54 +0200 Subject: [PATCH] Add code-check action --- .github/workflows/code-check.yml | 59 ++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/code-check.yml diff --git a/.github/workflows/code-check.yml b/.github/workflows/code-check.yml new file mode 100644 index 0000000000..8f5c2bb213 --- /dev/null +++ b/.github/workflows/code-check.yml @@ -0,0 +1,59 @@ +name: code-check +on: + workflow_dispatch: + inputs: + branch: + description: 'LIEF branch' + default: master + required: false + type: string + what: + description: 'clang-tidy action' + default: latest + required: false + type: string + job: + description: 'Job (e.g. coverage)' + default: "all" + required: false + type: string + push: + branches: + - master +jobs: + coverage: + runs-on: ubuntu-latest + container: + image: liefproject/code-check + env: + LIEF_S3_KEY: ${{ secrets.LIEF_S3_KEY }} + LIEF_S3_SECRET: ${{ secrets.LIEF_S3_SECRET }} + steps: + - uses: actions/checkout@v3 + with: + repository: lief-project/code-check + token: ${{ secrets.LIEF_CLONE_TOKEN }} + - name: Running LIEF coverage [workflow dispatch] + if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.job == 'all' || github.event.inputs.job == 'coverage') }} + run: ./lief-coverage --debug + - name: Running LIEF coverage [regular] + if: ${{ github.event_name != 'workflow_dispatch' }} + run: ./lief-coverage --debug + clang-tidy: + runs-on: ubuntu-latest + container: + image: liefproject/code-check + env: + LIEF_S3_KEY: ${{ secrets.LIEF_S3_KEY }} + LIEF_S3_SECRET: ${{ secrets.LIEF_S3_SECRET }} + steps: + - uses: actions/checkout@v3 + with: + repository: lief-project/code-check + token: ${{ secrets.LIEF_CLONE_TOKEN }} + - name: Running LIEF coverage [workflow dispatch] + if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.job == 'all' || github.event.inputs.job == 'clang-tidy') }} + run: ./lief-tidy --branch ${{ github.event.inputs.branch }} ${{ github.event.inputs.what }} + - name: Running LIEF coverage [regular] + if: "github.event.name != 'workflow_dispatch'" + run: ./lief-tidy latest