From 78c79e7474e499aa4140dffc0e118f4ecd7a0202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Ga=C5=82at?= Date: Fri, 5 Apr 2024 13:37:53 +0000 Subject: [PATCH] doc: remove legacy label from readme.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit on_commit uses the newest NCS revision, there is no longer need for second action Signed-off-by: Robert Gałat --- .github/workflows/on-pr.yml | 12 ++++- .github/workflows/run_tests.yml | 55 ++++++++--------------- .github/workflows/run_tests_dut.yml | 8 +--- .github/workflows/samples_build.yml | 53 +++++----------------- .github/workflows/validate_code_style.yml | 9 ++++ README.rst | 3 -- 6 files changed, 52 insertions(+), 88 deletions(-) diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index e0b287f0de..a5529c59b4 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -13,10 +13,18 @@ jobs: - name: Get nrf revision id: config + shell: bash {0} run: | grep -oP "(NRF_revision=)[a-zA-Z0-9/_-]*" pr_body.md > config - if [ $? != 0 ]; then echo NRF_revision=main > config; fi - cat config >> $GITHUB_OUTPUT + if [ $? != 0 ]; then + echo "NRF_revision=main" >> $GITHUB_OUTPUT; + else + cat config >> $GITHUB_OUTPUT; + fi; + + - name: print nrf revision + run: | + echo ${{ steps.config.outputs.NRF_revision }} verify_PR: uses: ./.github/workflows/validate_code_style.yml diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 2a5120d957..d0b9464e67 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -15,9 +15,9 @@ jobs: build_manual_tests: strategy: matrix: - subset: [1, 2, 3] + subset: [1, 2, 3, 4, 5] env: - MAX_SUBSETS: 3 + MAX_SUBSETS: 5 runs-on: ubuntu-latest container: @@ -85,26 +85,14 @@ jobs: merge_manual_tests: needs: build_manual_tests runs-on: ubuntu-latest - permissions: - actions: write + permissions: write-all steps: - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - path: manual-tests-artifacts - pattern: manual-tests-artifacts-* - merge-multiple: true - - - name: Delete manual-tests-artifacts - uses: geekyeggo/delete-artifact@v4 - with: - name: manual-tests-artifacts-* - - - name: Upload metadata - uses: actions/upload-artifact@v4 + - name: Merge Artifacts + uses: actions/upload-artifact/merge@v4 with: + delete-merged: true name: manual-tests-artifacts - path: manual-tests-artifacts + pattern: manual-tests-artifacts-* build_and_run_x86_tests: runs-on: ubuntu-latest @@ -162,12 +150,12 @@ jobs: strategy: fail-fast: true matrix: - subset: [1, 2, 3] + subset: [1, 2, 3, 4] board: ${{ fromJson(inputs.boards_to_test) }} uses: ./.github/workflows/run_tests_dut.yml with: subset: ${{ matrix.subset }} - max_subsets: 3 + max_subsets: 4 run_tests: true target_board: ${{ matrix.board }} nrf_revision: ${{ inputs.nrf_revision }} @@ -175,23 +163,18 @@ jobs: merge_tests_on_hw: needs: build-and-test_on_hw runs-on: ubuntu-latest - permissions: - actions: write + permissions: write-all steps: - - name: Download build artifacts - uses: actions/download-artifact@v4 + - name: Merge Artifacts + uses: actions/upload-artifact/merge@v4 with: - path: tests-dut_result + delete-merged: true + name: tests-dut_result pattern: tests-dut_result_* - merge-multiple: true - - - name: Delete tests-dut_result - uses: geekyeggo/delete-artifact@v4 - with: - name: tests-dut_result_* - - name: Upload metadata - uses: actions/upload-artifact@v4 + - name: Merge Artifacts + uses: actions/upload-artifact/merge@v4 with: - name: tests-dut_result - path: tests-dut_result + delete-merged: true + name: tests-dut_artifacts + pattern: DUT_artifacts_* diff --git a/.github/workflows/run_tests_dut.yml b/.github/workflows/run_tests_dut.yml index b9dc15a11e..40eb272014 100644 --- a/.github/workflows/run_tests_dut.yml +++ b/.github/workflows/run_tests_dut.yml @@ -68,7 +68,7 @@ jobs: source zephyr/zephyr-env.sh west twister --platform ${{inputs.target_board}} --testsuite-root sidewalk --filter runnable --shuffle-tests --shuffle-tests-seed 123 --inline-logs --overflow-as-errors -vvv --prep-artifacts-for-testing --package-artifacts PACKAGE_ARTIFACTS_${{ inputs.subset }}.tar.bz2 --subset ${{ inputs.subset }}/${{ inputs.max_subsets }} - - name: save build artifacts + - name: Save build artifacts uses: actions/upload-artifact@v4 with: path: PACKAGE_ARTIFACTS_${{ inputs.subset }}.tar.bz2 @@ -86,6 +86,7 @@ jobs: volumes: - /dev:/dev - /run/udev:/run/udev + permissions: write-all defaults: run: shell: nrfutil toolchain-manager launch --install-dir /root/ncs bash -- {0} @@ -122,11 +123,6 @@ jobs: with: name: DUT_artifacts_${{inputs.target_board}}_${{ inputs.subset }} - - name: Delete artifacts - uses: geekyeggo/delete-artifact@v4 - with: - name: DUT_artifacts_${{inputs.target_board}}_${{ inputs.subset }} - - name: Unwrap artifacts run: | tar -xf PACKAGE_ARTIFACTS_${{ inputs.subset }}.tar.bz2 diff --git a/.github/workflows/samples_build.yml b/.github/workflows/samples_build.yml index 421d8f7cb9..fa11b2a611 100644 --- a/.github/workflows/samples_build.yml +++ b/.github/workflows/samples_build.yml @@ -15,9 +15,9 @@ jobs: build_samples: strategy: matrix: - subset: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + subset: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] env: - MAX_SUBSETS: 10 + MAX_SUBSETS: 15 runs-on: ubuntu-latest container: @@ -89,50 +89,21 @@ jobs: twister-out/**/merged_domains.hex twister-out/**/dfu_application.zip - merge_artifacts_meta: + merge_sample_artifacts: needs: build_samples runs-on: ubuntu-latest - permissions: - actions: write + permissions: write-all steps: - - name: Download metadata from build - uses: actions/download-artifact@v4 - with: - path: sample-artifacts-meta - pattern: sample-artifacts-meta-* - merge-multiple: true - - - name: Delete sample-artifacts-meta - uses: geekyeggo/delete-artifact@v4 - with: - name: sample-artifacts-meta-* - - - name: Upload metadata - uses: actions/upload-artifact@v4 + - name: Merge Artifacts + uses: actions/upload-artifact/merge@v4 with: + delete-merged: true name: sample-artifacts-meta - path: sample-artifacts-meta - - merge_artifacts_images: - needs: build_samples - runs-on: ubuntu-latest - permissions: - actions: write - steps: - - name: Download images - uses: actions/download-artifact@v4 - with: - path: sample-artifacts - pattern: sample-artifacts-build-* - merge-multiple: true - - - name: Delete sample-artifacts - uses: geekyeggo/delete-artifact@v4 - with: - name: sample-artifacts-build-* + pattern: sample-artifacts-meta-* - - name: Upload build images - uses: actions/upload-artifact@v4 + - name: Merge Artifacts + uses: actions/upload-artifact/merge@v4 with: + delete-merged: true name: sample-artifacts - path: sample-artifacts + pattern: sample-artifacts-build-* diff --git a/.github/workflows/validate_code_style.yml b/.github/workflows/validate_code_style.yml index 872048eea4..1ba3af78c8 100644 --- a/.github/workflows/validate_code_style.yml +++ b/.github/workflows/validate_code_style.yml @@ -44,11 +44,20 @@ jobs: steps: - name: Checkout + if: ${{github.event_name != 'pull_request'}} uses: actions/checkout@v4 with: fetch-depth: 0 path: sidewalk + - name: Checkout + if: ${{github.event_name == 'pull_request'}} + uses: actions/checkout@v4 + with: + fetch-depth: 0 + path: sidewalk + ref: ${{ github.event.pull_request.head.sha }} + - name: update NRF run: | cd sidewalk && git rev-parse HEAD > /workdir/sidewalk_hash; cd .. diff --git a/README.rst b/README.rst index fefbcac574..b6ed354722 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,6 @@ .. image:: https://github.com/nrfconnect/sdk-sidewalk/actions/workflows/on-commit.yml/badge.svg?branch=main :target: https://github.com/nrfconnect/sdk-sidewalk/actions/workflows/on-commit.yml -.. image:: https://github.com/nrfconnect/sdk-sidewalk/actions/workflows/verify-new-ncs.yml/badge.svg - :target: https://github.com/nrfconnect/sdk-sidewalk/actions/workflows/verify-new-ncs.yml - nRF Connect SDK: sdk-sidewalk #############################