From 01fc4b6d2123fcd444fbedaec619ec0125c0b6bb Mon Sep 17 00:00:00 2001 From: Sourabh Mehta <73165318+soumeh01@users.noreply.github.com> Date: Fri, 26 Sep 2025 14:21:41 +0200 Subject: [PATCH] Workflow cleanup (#1317) --- .github/workflows/buildmgr.yml | 21 +++++++++------------ .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/packchk.yml | 4 +++- .github/workflows/packgen.yml | 4 +++- .github/workflows/projmgr.yml | 5 ++++- .github/workflows/scorecard.yml | 1 + .github/workflows/shared_setup_env.yml | 2 +- .github/workflows/svdconv.yml | 4 +++- .github/workflows/test_libs.yml | 1 + 9 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/workflows/buildmgr.yml b/.github/workflows/buildmgr.yml index 23d7f9a05..c214bddd7 100644 --- a/.github/workflows/buildmgr.yml +++ b/.github/workflows/buildmgr.yml @@ -24,14 +24,7 @@ on: - '.github/workflows/buildmgr.yml' - '.github/matrix_includes_buildmgr.json' - 'CMakeLists.txt' - - 'libs/crossplatform/**' - - 'libs/errlog/**' - - 'libs/xmlreader/**' - - 'libs/xmltree/**' - - 'libs/xmltreeslim/**' - - 'libs/rteutils/**' - - 'libs/rtemodel/**' - - 'libs/rtefsutils/**' + - 'libs/**' - 'tools/buildmgr/**' - '!**/docs/**/*' - '!**/*.md' @@ -55,6 +48,7 @@ jobs: workflow_name: buildmgr build: + name: build (${{ matrix.runs_on }}, ${{ matrix.arch }}) needs: [ setup, matrix_prep ] runs-on: ${{ matrix.runs_on }} timeout-minutes: 15 @@ -96,7 +90,7 @@ jobs: github.event_name == 'release' && (startsWith(matrix.runs_on, 'macos') || startsWith(matrix.runs_on, 'ubuntu')) run: | - binary_path="./build/tools/buildmgr/cbuildgen/${{ matrix.target }}-${{ matrix.arch }}/Release/cbuildgen${{ matrix.binary_extension }}" + binary_path="./build/tools/buildmgr/cbuildgen/${{ matrix.target }}-${{ matrix.arch }}/Release/cbuildgen${{ matrix.binary_extension }}" echo "Stripping binary at: $binary_path" # Use appropriate strip tool based on architecture and target if [[ "${{ matrix.arch }}" == "arm64" && "${{ matrix.target }}" == "linux" ]]; then @@ -164,7 +158,7 @@ jobs: id: var run: | echo "retention_days=$(echo '${{ (!github.event.repository.private && (github.event_name == 'push' || github.event.schedule != '')) && '7' || '1' }}')" >> $GITHUB_OUTPUT - + - name: Upload documentation uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: @@ -338,10 +332,11 @@ jobs: tag: ${{ github.ref }} overwrite: true - tests: + test: needs: [ setup, matrix_prep, create_installer ] timeout-minutes: 15 runs-on: ${{ matrix.runs_on }} + name: test (${{ matrix.runs_on }}, ${{ matrix.arch }}) env: arm_gcc_install_base: ${{ matrix.arm_gcc_install_base }} CI_CBUILD_DEB_PKG: ${{ github.workspace }} @@ -631,6 +626,7 @@ jobs: needs: [ matrix_prep, create_installer ] timeout-minutes: 15 runs-on: ${{ matrix.runs_on }} + name: sanity check native (${{ matrix.runs_on }}, ${{ matrix.arch }}) env: CMSIS_PACK_ROOT: ${{ github.workspace }}/packs AC6_TOOLCHAIN_ROOT: "" @@ -669,6 +665,7 @@ jobs: shell: bash run: | ${{ github.workspace }}/cbuild/bin/cbuildgen | grep "(cbuildgen): Build Process Manager" + sanity-check-docker: needs: create_installer timeout-minutes: 15 @@ -717,7 +714,7 @@ jobs: test-results-preparation: name: "Publish Tests Results" - needs: [ tests ] + needs: [ test ] runs-on: ubuntu-22.04 steps: - name: Harden Runner diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 8f5312d49..8fb26eb0c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,7 +44,7 @@ jobs: languages: cpp queries: security-and-quality config-file: ./.github/codeql-config.yml - + - name: Create build folder run: mkdir build diff --git a/.github/workflows/packchk.yml b/.github/workflows/packchk.yml index 2e4718dc5..1c6cdb4c4 100644 --- a/.github/workflows/packchk.yml +++ b/.github/workflows/packchk.yml @@ -55,6 +55,7 @@ jobs: build: needs: [ setup, matrix_prep ] runs-on: ${{ matrix.runs_on }} + name: build (${{ matrix.runs_on }}, ${{ matrix.arch }}) timeout-minutes: 15 strategy: fail-fast: true @@ -105,7 +106,7 @@ jobs: shell: bash working-directory: build/tools/packchk/ run: | - mkdir -p packchk_release_bin + mkdir -p packchk_release_bin # Extract the binary tarball into the release directory tar -xvf packchk-*-${{ matrix.target }}-${{ matrix.arch }}.tbz2 -C packchk_release_bin @@ -143,6 +144,7 @@ jobs: test: needs: [ setup, matrix_prep ] runs-on: ${{ matrix.runs_on }} + name: test (${{ matrix.runs_on }}, ${{ matrix.arch }}) timeout-minutes: 15 strategy: fail-fast: false diff --git a/.github/workflows/packgen.yml b/.github/workflows/packgen.yml index 6f32b388a..9d9c277c2 100644 --- a/.github/workflows/packgen.yml +++ b/.github/workflows/packgen.yml @@ -50,6 +50,7 @@ jobs: build: needs: [ setup, matrix_prep ] runs-on: ${{ matrix.runs_on }} + name: build (${{ matrix.runs_on }}, ${{ matrix.arch }}) timeout-minutes: 15 strategy: fail-fast: true @@ -89,7 +90,7 @@ jobs: github.event_name == 'release' && (startsWith(matrix.runs_on, 'macos') || startsWith(matrix.runs_on, 'ubuntu')) run: | - binary_path="./build/tools/packgen/${{ matrix.target }}-${{ matrix.arch }}/Release/${{ matrix.binary }}" + binary_path="./build/tools/packgen/${{ matrix.target }}-${{ matrix.arch }}/Release/${{ matrix.binary }}" echo "Stripping binary at: $binary_path" # Use appropriate strip tool based on architecture and target if [[ "${{ matrix.arch }}" == "arm64" && "${{ matrix.target }}" == "linux" ]]; then @@ -177,6 +178,7 @@ jobs: unittest: needs: [ setup, matrix_prep ] + name: unittest (${{ matrix.runs_on }}, ${{ matrix.arch }}) runs-on: ${{ matrix.runs_on }} timeout-minutes: 15 strategy: diff --git a/.github/workflows/projmgr.yml b/.github/workflows/projmgr.yml index 004aeaf38..88e3bd703 100644 --- a/.github/workflows/projmgr.yml +++ b/.github/workflows/projmgr.yml @@ -55,6 +55,7 @@ jobs: build: needs: [ setup, matrix_prep ] runs-on: ${{ matrix.runs_on }} + name: build (${{ matrix.runs_on }},${{ matrix.arch }}) timeout-minutes: 15 strategy: # fail-fast: true @@ -94,7 +95,7 @@ jobs: github.event_name == 'release' && (startsWith(matrix.runs_on, 'macos') || startsWith(matrix.runs_on, 'ubuntu')) run: | - binary_path="./build/tools/projmgr/${{ matrix.target }}-${{ matrix.arch }}/Release/${{ matrix.binary }}" + binary_path="./build/tools/projmgr/${{ matrix.target }}-${{ matrix.arch }}/Release/${{ matrix.binary }}" echo "Stripping binary at: $binary_path" # Use appropriate strip tool based on architecture and target if [[ "${{ matrix.arch }}" == "arm64" && "${{ matrix.target }}" == "linux" ]]; then @@ -131,6 +132,7 @@ jobs: build-swig: needs: [ setup, matrix_prep ] + name: build-swig (${{ matrix.runs_on }}, ${{ matrix.arch }}) runs-on: ${{ matrix.runs_on }} timeout-minutes: 15 strategy: @@ -358,6 +360,7 @@ jobs: unittest: needs: [ setup, matrix_prep ] + name: unittest (${{ matrix.runs_on }}, ${{ matrix.arch }}) runs-on: ${{ matrix.runs_on }} timeout-minutes: 15 strategy: diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 5334ba0bd..9cccce862 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -16,6 +16,7 @@ permissions: read-all jobs: analysis: + if: github.repository == 'Open-CMSIS-Pack/devtools' name: Scorecard analysis runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/shared_setup_env.yml b/.github/workflows/shared_setup_env.yml index 92ee00f76..857cd9d49 100644 --- a/.github/workflows/shared_setup_env.yml +++ b/.github/workflows/shared_setup_env.yml @@ -5,7 +5,7 @@ on: inputs: run_if: description: 'True if workflow needs to run' - default: false + default: false required: true type: boolean outputs: diff --git a/.github/workflows/svdconv.yml b/.github/workflows/svdconv.yml index 591a8036e..2f400fee1 100644 --- a/.github/workflows/svdconv.yml +++ b/.github/workflows/svdconv.yml @@ -46,6 +46,7 @@ jobs: build: needs: [ setup, matrix_prep ] + name: build (${{ matrix.runs_on }}, ${{ matrix.arch }}) runs-on: ${{ matrix.runs_on }} timeout-minutes: 15 strategy: @@ -101,7 +102,7 @@ jobs: tar -xvf svdconv-*-${{ matrix.target }}-${{ matrix.arch }}.tbz2 -C svdconv_release_bin # Construct the path to the extracted binary - binary_path="./svdconv_release_bin/${{ matrix.binary }}" + binary_path="./svdconv_release_bin/${{ matrix.binary }}" echo "Stripping binary at: $binary_path" # Use appropriate strip tool based on architecture and target @@ -132,6 +133,7 @@ jobs: test: needs: [ setup, matrix_prep ] + name: test (${{ matrix.runs_on }}, ${{ matrix.arch }}) runs-on: ${{ matrix.runs_on }} timeout-minutes: 15 strategy: diff --git a/.github/workflows/test_libs.yml b/.github/workflows/test_libs.yml index 118005cd8..1e8541559 100644 --- a/.github/workflows/test_libs.yml +++ b/.github/workflows/test_libs.yml @@ -40,6 +40,7 @@ jobs: test_libs: runs-on: ${{ matrix.runs_on }} + name: test_libs (${{ matrix.runs_on }}, ${{ matrix.arch }}) needs: [ setup, matrix_prep ] timeout-minutes: 15 strategy: