diff --git a/.github/workflows/buildmgr.yml b/.github/workflows/buildmgr.yml index 8bd09a6a5..0b86a1bdd 100644 --- a/.github/workflows/buildmgr.yml +++ b/.github/workflows/buildmgr.yml @@ -32,7 +32,7 @@ on: types: [ published ] concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + group: buildmgr-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true permissions: @@ -57,7 +57,7 @@ jobs: name: build (${{ matrix.runs_on }}, ${{ matrix.arch }}) needs: [ setup, matrix_prep ] runs-on: ${{ matrix.runs_on }} - timeout-minutes: 15 + timeout-minutes: 25 strategy: fail-fast: true matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} @@ -121,7 +121,7 @@ jobs: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/buildmgr/')) || ((github.event.schedule != '') && (!github.event.repository.private)) runs-on: ubuntu-22.04 - timeout-minutes: 15 + timeout-minutes: 25 permissions: contents: write steps: @@ -222,7 +222,7 @@ jobs: needs: [ setup, build, docs ] # Debian package generation in ubuntu 22.04 produces incompatible metadata runs-on: ubuntu-22.04 - timeout-minutes: 15 + timeout-minutes: 25 permissions: contents: write steps: @@ -344,7 +344,7 @@ jobs: test: needs: [ setup, matrix_prep, create_installer ] - timeout-minutes: 15 + timeout-minutes: 25 runs-on: ${{ matrix.runs_on }} name: test (${{ matrix.runs_on }}, ${{ matrix.arch }}) env: @@ -512,7 +512,7 @@ jobs: GCC_TOOLCHAIN_10_3_1: ${{ github.workspace }}/${{ matrix.toolchain_root }} AC6_TOOLCHAIN_6_18_0: ${{ github.workspace }}/${{ matrix.toolchain_root }} runs-on: ubuntu-22.04 - timeout-minutes: 15 + timeout-minutes: 25 steps: - name: Harden Runner @@ -630,7 +630,7 @@ jobs: sanity-check-native: needs: [ matrix_prep, create_installer ] - timeout-minutes: 15 + timeout-minutes: 25 runs-on: ${{ matrix.runs_on }} name: sanity check native (${{ matrix.runs_on }}, ${{ matrix.arch }}) env: @@ -674,7 +674,7 @@ jobs: sanity-check-docker: needs: create_installer - timeout-minutes: 15 + timeout-minutes: 25 runs-on: ubuntu-22.04 container: image: ${{ matrix.image }} @@ -720,6 +720,7 @@ jobs: test-results-preparation: name: "Publish Tests Results" + if: ${{ always() }} needs: [ test ] runs-on: ubuntu-22.04 steps: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index bb03e9545..fe16d73b3 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -8,33 +8,46 @@ on: permissions: contents: write +concurrency: + group: nightly-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: false + jobs: buildmgr: if: github.repository == 'Open-CMSIS-Pack/devtools' uses: ./.github/workflows/buildmgr.yml secrets: inherit + packchk: - needs: [buildmgr] + if: github.repository == 'Open-CMSIS-Pack/devtools' uses: ./.github/workflows/packchk.yml secrets: inherit + packgen: - needs: [packchk] + if: github.repository == 'Open-CMSIS-Pack/devtools' uses: ./.github/workflows/packgen.yml secrets: inherit + projmgr: - needs: [packgen] + if: github.repository == 'Open-CMSIS-Pack/devtools' uses: ./.github/workflows/projmgr.yml secrets: inherit + svdconv: - needs: [projmgr] + if: github.repository == 'Open-CMSIS-Pack/devtools' uses: ./.github/workflows/svdconv.yml secrets: inherit + test_libs: - needs: [svdconv] + if: github.repository == 'Open-CMSIS-Pack/devtools' uses: ./.github/workflows/test_libs.yml + secrets: inherit + coverage: + if: github.repository == 'Open-CMSIS-Pack/devtools' runs-on: ubuntu-22.04 needs: [ buildmgr, packchk, packgen, projmgr, svdconv, test_libs ] + steps: - name: Harden Runner if: ${{ !github.event.repository.private }} @@ -45,8 +58,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install \ - lcov + sudo apt-get install lcov - name: Download coverage report uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 @@ -57,7 +69,13 @@ jobs: - name: Consolidate coverage data run: | - lcov --rc lcov_branch_coverage=1 --add-tracefile coverage_packchk.info -a coverage_packgen.info -a coverage_projmgr.info -a coverage_buildmgr.info -a coverage_svdconv.info -o merged_coverage.info + lcov --rc lcov_branch_coverage=1 \ + --add-tracefile coverage_packchk.info \ + -a coverage_packgen.info \ + -a coverage_projmgr.info \ + -a coverage_buildmgr.info \ + -a coverage_svdconv.info \ + -o merged_coverage.info working-directory: coverage/ - name: Archive merged coverage report @@ -66,3 +84,30 @@ jobs: name: merged-coverage-report path: ./coverage/merged_coverage.info if-no-files-found: error + + publish-test-results: + if: always() && github.repository == 'Open-CMSIS-Pack/devtools' + name: Publish Test Results + runs-on: ubuntu-22.04 + needs: [ buildmgr, packchk, packgen, projmgr, svdconv, test_libs ] + permissions: + checks: write + pull-requests: write + steps: + - name: Harden Runner + if: ${{ !github.event.repository.private }} + uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0 + with: + egress-policy: audit + + - name: Download and Extract Artifacts + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + path: artifacts + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@c950f6fb443cb5af20a377fd0dfaa78838901040 # v2.23.0 + with: + commit: ${{ github.sha }} + report_individual_runs: true + files: "artifacts/**/*.xml" diff --git a/.github/workflows/packchk.yml b/.github/workflows/packchk.yml index 675145742..b79be81af 100644 --- a/.github/workflows/packchk.yml +++ b/.github/workflows/packchk.yml @@ -37,7 +37,7 @@ on: types: [published] concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + group: packchk-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true permissions: @@ -62,7 +62,7 @@ jobs: needs: [ setup, matrix_prep ] runs-on: ${{ matrix.runs_on }} name: build (${{ matrix.runs_on }}, ${{ matrix.arch }}) - timeout-minutes: 15 + timeout-minutes: 25 strategy: fail-fast: true matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} @@ -153,7 +153,7 @@ jobs: needs: [ setup, matrix_prep ] runs-on: ${{ matrix.runs_on }} name: test (${{ matrix.runs_on }}, ${{ matrix.arch }}) - timeout-minutes: 15 + timeout-minutes: 25 strategy: fail-fast: false matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} @@ -226,7 +226,7 @@ jobs: lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/ lcov_installer: lcov-1.15.tar.gz runs-on: ubuntu-22.04 - timeout-minutes: 15 + timeout-minutes: 25 steps: - name: Harden Runner if: ${{ !github.event.repository.private }} @@ -337,7 +337,7 @@ jobs: startsWith(github.ref, 'refs/tags/tools/packchk/') needs: [ build, test, coverage ] runs-on: ubuntu-22.04 - timeout-minutes: 15 + timeout-minutes: 25 permissions: contents: write steps: @@ -369,6 +369,7 @@ jobs: test-results-preparation: name: "Publish Tests Results" + if: ${{ always() }} needs: [ test ] runs-on: ubuntu-22.04 steps: diff --git a/.github/workflows/packgen.yml b/.github/workflows/packgen.yml index 785fd568f..4cb282334 100644 --- a/.github/workflows/packgen.yml +++ b/.github/workflows/packgen.yml @@ -32,7 +32,7 @@ on: types: [published] concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + group: packgen-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true permissions: @@ -57,7 +57,7 @@ jobs: needs: [ setup, matrix_prep ] runs-on: ${{ matrix.runs_on }} name: build (${{ matrix.runs_on }}, ${{ matrix.arch }}) - timeout-minutes: 15 + timeout-minutes: 25 strategy: fail-fast: true matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} @@ -119,7 +119,7 @@ jobs: startsWith(github.ref, 'refs/tags/tools/packgen/') needs: [ build, unittest ] runs-on: ubuntu-22.04 - timeout-minutes: 15 + timeout-minutes: 25 permissions: contents: write steps: @@ -187,7 +187,7 @@ jobs: needs: [ setup, matrix_prep ] name: unittest (${{ matrix.runs_on }}, ${{ matrix.arch }}) runs-on: ${{ matrix.runs_on }} - timeout-minutes: 15 + timeout-minutes: 25 strategy: fail-fast: true matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} @@ -237,7 +237,7 @@ jobs: lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/ lcov_installer: lcov-1.15.tar.gz runs-on: ubuntu-22.04 - timeout-minutes: 15 + timeout-minutes: 25 steps: - name: Harden Runner if: ${{ !github.event.repository.private }} @@ -326,6 +326,7 @@ jobs: test-results-preparation: name: "Publish Tests Results" + if: ${{ always() }} needs: [ unittest ] runs-on: ubuntu-22.04 steps: diff --git a/.github/workflows/projmgr.yml b/.github/workflows/projmgr.yml index c1a944fc7..5e5910a0d 100644 --- a/.github/workflows/projmgr.yml +++ b/.github/workflows/projmgr.yml @@ -36,7 +36,7 @@ on: types: [published] concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + group: projmgr-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true permissions: @@ -61,7 +61,7 @@ jobs: needs: [ setup, matrix_prep ] runs-on: ${{ matrix.runs_on }} name: build (${{ matrix.runs_on }},${{ matrix.arch }}) - timeout-minutes: 20 + timeout-minutes: 25 strategy: # fail-fast: true matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} @@ -139,7 +139,7 @@ jobs: needs: [ setup, matrix_prep ] name: build-swig (${{ matrix.runs_on }}, ${{ matrix.arch }}) runs-on: ${{ matrix.runs_on }} - timeout-minutes: 20 + timeout-minutes: 25 strategy: # fail-fast: true matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} @@ -208,7 +208,7 @@ jobs: startsWith(github.ref, 'refs/tags/tools/projmgr/') needs: [ build, build-swig, unittest, coverage ] runs-on: ubuntu-22.04 - timeout-minutes: 15 + timeout-minutes: 25 permissions: contents: write @@ -369,7 +369,7 @@ jobs: needs: [ setup, matrix_prep ] name: unittest (${{ matrix.runs_on }}, ${{ matrix.arch }}) runs-on: ${{ matrix.runs_on }} - timeout-minutes: 15 + timeout-minutes: 25 strategy: fail-fast: false matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} @@ -429,7 +429,7 @@ jobs: lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/ lcov_installer: lcov-1.15.tar.gz runs-on: ubuntu-22.04 - timeout-minutes: 15 + timeout-minutes: 25 steps: - name: Harden Runner if: ${{ !github.event.repository.private }} @@ -518,6 +518,7 @@ jobs: test-results-preparation: name: "Publish Tests Results" + if: ${{ always() }} needs: [ unittest ] runs-on: ubuntu-22.04 steps: diff --git a/.github/workflows/svdconv.yml b/.github/workflows/svdconv.yml index aed448f3f..5b50bb266 100644 --- a/.github/workflows/svdconv.yml +++ b/.github/workflows/svdconv.yml @@ -29,7 +29,7 @@ on: types: [published] concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + group: svdconv-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true permissions: @@ -54,7 +54,7 @@ jobs: needs: [ setup, matrix_prep ] name: build (${{ matrix.runs_on }}, ${{ matrix.arch }}) runs-on: ${{ matrix.runs_on }} - timeout-minutes: 15 + timeout-minutes: 25 strategy: fail-fast: true matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} @@ -143,7 +143,7 @@ jobs: needs: [ setup, matrix_prep ] name: test (${{ matrix.runs_on }}, ${{ matrix.arch }}) runs-on: ${{ matrix.runs_on }} - timeout-minutes: 15 + timeout-minutes: 25 strategy: fail-fast: false matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} @@ -216,7 +216,7 @@ jobs: lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/ lcov_installer: lcov-1.15.tar.gz runs-on: ubuntu-22.04 - timeout-minutes: 15 + timeout-minutes: 25 steps: - name: Harden Runner if: ${{ !github.event.repository.private }} @@ -335,7 +335,7 @@ jobs: startsWith(github.ref, 'refs/tags/tools/svdconv/') needs: [ build, test, coverage ] runs-on: ubuntu-22.04 - timeout-minutes: 15 + timeout-minutes: 25 permissions: contents: write steps: @@ -367,6 +367,7 @@ jobs: test-results-preparation: name: "Publish Tests Results" + if: ${{ always() }} needs: [ test ] runs-on: ubuntu-22.04 steps: diff --git a/.github/workflows/test_libs.yml b/.github/workflows/test_libs.yml index 20e124b3e..696c40a74 100644 --- a/.github/workflows/test_libs.yml +++ b/.github/workflows/test_libs.yml @@ -21,7 +21,7 @@ on: - 'test/**' concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + group: test_libs-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true permissions: @@ -46,7 +46,7 @@ jobs: runs-on: ${{ matrix.runs_on }} name: test_libs (${{ matrix.runs_on }}, ${{ matrix.arch }}) needs: [ setup, matrix_prep ] - timeout-minutes: 15 + timeout-minutes: 25 strategy: fail-fast: false matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} @@ -97,6 +97,7 @@ jobs: test-results-preparation: name: "Publish Tests Results" + if: ${{ always() }} needs: [ test_libs ] runs-on: ubuntu-22.04 steps: diff --git a/.github/workflows/unit_test_results.yml b/.github/workflows/unit_test_results.yml index c55a90b22..df1776008 100644 --- a/.github/workflows/unit_test_results.yml +++ b/.github/workflows/unit_test_results.yml @@ -10,7 +10,7 @@ on: jobs: publish-test-results: - name: Publish Test Results + name: Publish Test Results for ${{ github.event.workflow_run.name }} runs-on: ubuntu-22.04 if: github.event.workflow_run.conclusion != 'skipped' steps: diff --git a/codecov.yml b/codecov.yml index 7e695138c..8e4f81216 100644 --- a/codecov.yml +++ b/codecov.yml @@ -5,24 +5,34 @@ coverage: patch: false project: default: false + packchk-cov: target: auto + threshold: 0.1% flags: - packchk-cov + projmgr-cov: target: auto + threshold: 0.1% flags: - projmgr-cov + packgen-cov: target: auto + threshold: 0.1% flags: - packgen-cov + buildmgr-cov: target: auto + threshold: 0.1% flags: - buildmgr-cov + svdconv-cov: target: auto + threshold: 0.1% flags: - svdconv-cov