From b455f9f06e60666ee5fd079b0f1457a4906416c2 Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Wed, 20 Apr 2022 11:11:57 +0100 Subject: [PATCH] github action: fix placement --- .github/workflows/basic_checks.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/basic_checks.yml b/.github/workflows/basic_checks.yml index 4684cee7eff..d3d18432cdd 100644 --- a/.github/workflows/basic_checks.yml +++ b/.github/workflows/basic_checks.yml @@ -20,8 +20,7 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - run: | - git config --global --add safe.directory "$GITHUB_WORKSPACE" + - name: install dependencies @@ -34,7 +33,7 @@ jobs: run: | set -x mkdir -p SCANCODE - + git config --global --add safe.directory "$GITHUB_WORKSPACE" git diff --name-only --diff-filter=d origin/${GITHUB_BASE_REF} \ | ( grep '.\(c\|cpp\|h\|hpp\|py\)$' || true ) echo $? @@ -65,12 +64,11 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - run: | - git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: include check run: | + git config --global --add safe.directory "$GITHUB_WORKSPACE" # checks mbed.h is not included in MbedOS files except in tests ! git grep '^#include\s["'"']mbed.h['"'"]$' -- '*.c' '*.h' '*.cpp' '*.hpp' \ ':!*platform_mbed.h' ':!*TESTS/*' ':!TEST_APPS/' ':!UNITTESTS/' \ @@ -88,12 +86,11 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - run: | - git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: UTF-8 Check run: | + git config --global --add safe.directory "$GITHUB_WORKSPACE" # Make sure we're not introducing any text which is not UTF-8 encoded git diff origin/${GITHUB_BASE_REF} -U0 | ( grep -a '^+' || true ) | ( ! grep -axv '.*' ) @@ -102,6 +99,7 @@ jobs: name: astyle checks run: | set -x + git config --global --add safe.directory "$GITHUB_WORKSPACE" git diff --name-only --diff-filter=d origin/${GITHUB_BASE_REF} \ | ( grep '.*\.\(c\|cpp\|h\|hpp\)$' || true ) \ | ( grep -v -f .codecheckignore || true ) \ @@ -193,13 +191,12 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - run: | - git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: validate pins run: | set -x + git config --global --add safe.directory "$GITHUB_WORKSPACE" git diff --name-only --diff-filter=d origin/${GITHUB_BASE_REF} \ | ( grep '.*[\\|\/]PinNames.h$' || true ) \ | while read file; do python ./hal/tests/pinvalidate/pinvalidate.py -vvvfp "${file}"; done @@ -248,13 +245,12 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - run: | - git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: frozen tool check run: | set -x + git config --global --add safe.directory "$GITHUB_WORKSPACE" git diff --name-only origin/${GITHUB_BASE_REF} \ | egrep \ -e "^tools/build_api*" \