From 0826bdc2e501be5cfa0ccafc33ec6007306f6433 Mon Sep 17 00:00:00 2001 From: lukasz126 Date: Wed, 6 Mar 2024 00:28:34 +0100 Subject: [PATCH] separate pre-commit workflow --- .github/workflows/ci_basic.yaml | 11 +---------- .github/workflows/pre-commit.yaml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/pre-commit.yaml diff --git a/.github/workflows/ci_basic.yaml b/.github/workflows/ci_basic.yaml index b3c0b12..758e43d 100644 --- a/.github/workflows/ci_basic.yaml +++ b/.github/workflows/ci_basic.yaml @@ -35,15 +35,6 @@ jobs: # Build your program with the given configuration run: cmake --build ${{env.BUILD_PATH}} --config ${{env.BUILD_TYPE}} - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y llvm cppcheck - sudo apt-get install -y iwyu - - - name: Pre-commit actions - uses: pre-commit/action@v3.0.1 - - name: Configure Test CMake run: cmake -B ${{env.TEST_BUILD_PATH}} -S ${{env.TEST_SOURCE}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} @@ -54,4 +45,4 @@ jobs: - name: Test working-directory: ${{env.TEST_BUILD_PATH}} run: ctest -C ${{env.BUILD_TYPE}} - + \ No newline at end of file diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000..9c1a9e7 --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,23 @@ +name: Pre-commit ubuntu + +on: [push, pull_request] + +env: + BUILD_TYPE: Release + +jobs: + pre-commit: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y llvm cppcheck + sudo apt-get install -y iwyu + + - name: Pre-commit actions + uses: pre-commit/action@v3.0.1 + \ No newline at end of file