diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bb37d78c3..faa8b429f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,22 +6,44 @@ name: CI Build # Controls when the workflow will run on: + # run pipeline on push event of main branch + push: + branches: + - main # run pipeline on pull request pull_request: # run pipeline on merge queue merge_group: # run this workflow manually from the Actions tab workflow_dispatch: + schedule: + - cron: "0 2 * * *" # Based on UTC time concurrency: group: ${{ github.workflow }}-${{ github.ref }}-ci-build cancel-in-progress: true jobs: - main: - uses: "./.github/workflows/main.yml" + build-test-release: + uses: "./.github/workflows/build-test-release.yml" permissions: contents: write with: - release: false - clang-tidy-target: "all power_grid_model_benchmark_cpp" + create_release: false + + check-code-quality: + uses: "./.github/workflows/check-code-quality.yml" + + reuse-compliance: + uses: "./.github/workflows/reuse-compliance.yml" + + clang-tidy: + uses: "./.github/workflows/clang-tidy.yml" + with: + target: "all power_grid_model_benchmark_cpp" + + citations: + uses: "./.github/workflows/citations.yml" + + sonar: + uses: "./.github/workflows/sonar.yml" diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 6739e5577..32fd89085 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -6,10 +6,6 @@ name: Build and Test C++ and Python # Controls when the workflow will run on: - # run pipeline on push event of main branch - push: - branches: - - main # run pipeline from another workflow workflow_call: inputs: diff --git a/.github/workflows/check-code-quality.yml b/.github/workflows/check-code-quality.yml index c7cc8f213..45eedfe19 100644 --- a/.github/workflows/check-code-quality.yml +++ b/.github/workflows/check-code-quality.yml @@ -11,10 +11,6 @@ name: Check Code Quality on: - # run pipeline on push event of main branch - push: - branches: - - main # run pipeline from another workflow workflow_call: diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index fc20f64ab..7d103e29f 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -5,10 +5,6 @@ name: Clang Tidy on: - # run pipeline on push event of main branch - push: - branches: - - main # run pipeline from another workflow workflow_call: inputs: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index bd8dc7a52..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,45 +0,0 @@ -# SPDX-FileCopyrightText: Contributors to the Power Grid Model project -# -# SPDX-License-Identifier: MPL-2.0 - -name: Main Build - -# Controls when the workflow will run -on: - # run pipeline from another workflow - workflow_call: - inputs: - release: - required: true - type: boolean - clang-tidy-target: - required: true - type: string - # run this workflow manually from the Actions tab - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-main-build - cancel-in-progress: true - -jobs: - build-test-release: - uses: "./.github/workflows/build-test-release.yml" - permissions: - contents: write - with: - create_release: ${{ inputs.release }} - - check-code-quality: - uses: "./.github/workflows/check-code-quality.yml" - - reuse-compliance: - uses: "./.github/workflows/reuse-compliance.yml" - - clang-tidy: - uses: "./.github/workflows/clang-tidy.yml" - with: - target: ${{ inputs.clang-tidy-target }} - - citations: - uses: "./.github/workflows/citations.yml" diff --git a/.github/workflows/reuse-compliance.yml b/.github/workflows/reuse-compliance.yml index 6819cf173..d4f34fb58 100644 --- a/.github/workflows/reuse-compliance.yml +++ b/.github/workflows/reuse-compliance.yml @@ -5,10 +5,6 @@ name: REUSE Compliance Check on: - # run pipeline on push event of main branch - push: - branches: - - main # run pipeline from another workflow workflow_call: # run this workflow manually from the Actions tab diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 761a69ae7..52343b9fc 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -5,14 +5,10 @@ name: Sonar Cloud on: - # run pipeline on push event of main branch - push: - branches: - - main - # run pipeline on pull request - pull_request: - # run pipeline on merge queue - merge_group: + # run pipeline from another workflow + workflow_call: + # run this workflow manually from the Actions tab + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }}-sonar