diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 0000000000..40ee39b2f9 --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1,18 @@ +# Github Workflows + +## Overview + +![gh_actions.drawio.png](gh_actions.drawio.png) + +## PR verification + +To ensure a stable main branch we verify PRs once they are created/updated and again when they are accepted and enter the merge queue. Therefore each verification workflow needs to have both ``pull_request`` and ``merge_group`` set in the trigger conditions. +Additionally all jobs for the merge queue have to be explicitly added in the [otterdog configuration](https://github.com/eclipse-openbsw/.eclipsefdn/blob/main/otterdog/eclipse-openbsw.jsonnet). + +## General guidelines + +1. Don't waste compute time. +2. Each job should have a specific purpose. +3. Each artifact produced should make sense on it's own. +4. Don't rely on a different job running afterwards. Keep cohesion low. +5. Each job should have a unique name. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d63c56c077..9b27dcbbad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,9 @@ name: Build S32k and posix platform -on: [push, pull_request] +on: [ merge_group, pull_request ] jobs: - run-command: + build-executable: runs-on: ubuntu-latest strategy: matrix: @@ -45,4 +45,4 @@ jobs: - name: Build for ${{ matrix.platform }} if: steps.cache-cmake.outputs.cache-hit != 'true' - run: cmake --build cmake-build-${{ matrix.platform }} --target app.referenceApp -j \ No newline at end of file + run: cmake --build cmake-build-${{ matrix.platform }} --target app.referenceApp -j diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index e674f58d03..42d2110a3b 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -1,13 +1,13 @@ name: Code Coverage Report -on: [workflow_call, push, pull_request] +on: [ merge_group, workflow_call, pull_request ] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Debug jobs: - build: + code-coverage: runs-on: ubuntu-latest permissions: contents: write @@ -64,4 +64,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: code_coverage - path: code_coverage.zip \ No newline at end of file + path: code_coverage.zip diff --git a/.github/workflows/doxygen-build.yml b/.github/workflows/doxygen-build.yml index 86e68af528..1021855de5 100644 --- a/.github/workflows/doxygen-build.yml +++ b/.github/workflows/doxygen-build.yml @@ -1,9 +1,9 @@ -name: Build and Deploy Doxygen Documentation +name: Build Doxygen Documentation -on: [workflow_call, pull_request] +on: [ merge_group, workflow_call, pull_request ] jobs: - build: + doxygen-build: runs-on: ubuntu-latest permissions: contents: write diff --git a/.github/workflows/gh_actions.drawio.png b/.github/workflows/gh_actions.drawio.png new file mode 100644 index 0000000000..aed82c1930 Binary files /dev/null and b/.github/workflows/gh_actions.drawio.png differ diff --git a/.github/workflows/sphinx-doc-build.yml b/.github/workflows/sphinx-doc-build.yml index b1e9bee10f..67a0dba6b0 100644 --- a/.github/workflows/sphinx-doc-build.yml +++ b/.github/workflows/sphinx-doc-build.yml @@ -1,12 +1,12 @@ name: Build Sphinx Documentation -on: [workflow_call, pull_request] +on: [ merge_group, workflow_call, pull_request ] permissions: contents: write jobs: - build: + sphinx-doc-build: runs-on: ubuntu-latest permissions: contents: write