diff --git a/.github/workflows/assigner.yml b/.github/workflows/assigner.yml deleted file mode 100644 index 6e4e01c8ea1..00000000000 --- a/.github/workflows/assigner.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Pull Request Assigner - -on: - pull_request_target: - types: - - opened - - synchronize - - reopened - - ready_for_review - branches: - - main - - collab-* - - v*-branch - issues: - types: - - labeled - -jobs: - assignment: - name: Pull Request Assignment - if: github.event.pull_request.draft == false - runs-on: ubuntu-22.04 - - steps: - - name: Install Python dependencies - run: | - sudo pip3 install -U setuptools wheel pip - pip3 install -U PyGithub>=1.55 west - - - name: Check out source code - uses: actions/checkout@v4 - - - name: Run assignment script - env: - GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }} - run: | - FLAGS="-v" - FLAGS+=" -o ${{ github.event.repository.owner.login }}" - FLAGS+=" -r ${{ github.event.repository.name }}" - FLAGS+=" -M MAINTAINERS.yml" - if [ "${{ github.event_name }}" = "pull_request_target" ]; then - FLAGS+=" -P ${{ github.event.pull_request.number }}" - elif [ "${{ github.event_name }}" = "issues" ]; then - FLAGS+=" -I ${{ github.event.issue.number }}" - elif [ "${{ github.event_name }}" = "schedule" ]; then - FLAGS+=" --modules" - else - echo "Unknown event: ${{ github.event_name }}" - exit 1 - fi - - python3 scripts/set_assignees.py $FLAGS diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml deleted file mode 100644 index 5e28332c2a2..00000000000 --- a/.github/workflows/backport.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Backport -on: - pull_request_target: - types: - - closed - - labeled - branches: - - main - -jobs: - backport: - name: Backport - runs-on: ubuntu-22.04 - # Only react to merged PRs for security reasons. - # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. - if: > - github.event.pull_request.merged && - ( - github.event.action == 'closed' || - ( - github.event.action == 'labeled' && - contains(github.event.label.name, 'backport') - ) - ) - steps: - - name: Backport - uses: zephyrproject-rtos/action-backport@v2.0.3-3 - with: - github_token: ${{ secrets.ZB_GITHUB_TOKEN }} - issue_labels: Backport - labels_template: '["Backport"]' diff --git a/.github/workflows/backport_issue_check.yml b/.github/workflows/backport_issue_check.yml deleted file mode 100644 index ecaaf352827..00000000000 --- a/.github/workflows/backport_issue_check.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Backport Issue Check - -on: - pull_request_target: - types: - - edited - - opened - - reopened - - synchronize - branches: - - v*-branch - -jobs: - backport: - name: Backport Issue Check - concurrency: - group: backport-issue-check-${{ github.ref }} - cancel-in-progress: true - runs-on: ubuntu-22.04 - if: github.repository == 'zephyrproject-rtos/zephyr' - - steps: - - name: Check out source code - uses: actions/checkout@v4 - - - name: Install Python dependencies - run: | - sudo pip3 install -U setuptools wheel pip - pip3 install -U pygithub - - - name: Run backport issue checker - env: - GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }} - run: | - ./scripts/release/list_backports.py \ - -o ${{ github.event.repository.owner.login }} \ - -r ${{ github.event.repository.name }} \ - -b ${{ github.event.pull_request.base.ref }} \ - -p ${{ github.event.pull_request.number }} diff --git a/.github/workflows/bsim-tests-publish.yaml b/.github/workflows/bsim-tests-publish.yaml deleted file mode 100644 index 72608b36b24..00000000000 --- a/.github/workflows/bsim-tests-publish.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: Publish BabbleSim Tests Results - -on: - workflow_run: - workflows: ["BabbleSim Tests"] - types: - - completed -jobs: - bsim-test-results: - name: "Publish BabbleSim Test Results" - runs-on: ubuntu-22.04 - if: github.event.workflow_run.conclusion != 'skipped' - - steps: - - name: Download artifacts - uses: dawidd6/action-download-artifact@v6 - with: - run_id: ${{ github.event.workflow_run.id }} - - - name: Publish BabbleSim Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - with: - check_name: BabbleSim Test Results - comment_mode: off - commit: ${{ github.event.workflow_run.head_sha }} - event_file: event/event.json - event_name: ${{ github.event.workflow_run.event }} - files: "bsim-test-results/**/bsim_results.xml" diff --git a/.github/workflows/bsim-tests.yaml b/.github/workflows/bsim-tests.yaml deleted file mode 100644 index 0c50ca5d6fd..00000000000 --- a/.github/workflows/bsim-tests.yaml +++ /dev/null @@ -1,195 +0,0 @@ -name: BabbleSim Tests - -on: - pull_request: - paths: - - ".github/workflows/bsim-tests.yaml" - - ".github/workflows/bsim-tests-publish.yaml" - - "west.yml" - - "subsys/bluetooth/**" - - "tests/bsim/**" - - "boards/nordic/nrf5*/*dt*" - - "dts/*/nordic/**" - - "tests/bluetooth/common/testlib/**" - - "samples/bluetooth/**" - - "boards/posix/**" - - "soc/posix/**" - - "arch/posix/**" - - "include/zephyr/arch/posix/**" - - "scripts/native_simulator/**" - - "samples/net/sockets/echo_*/**" - - "modules/openthread/**" - - "subsys/net/l2/openthread/**" - - "include/zephyr/net/openthread.h" - - "drivers/ieee802154/**" - - "include/zephyr/net/ieee802154*" - - "drivers/serial/*nrfx*" - - "tests/drivers/uart/**" - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -jobs: - bsim-test: - if: github.repository_owner == 'zephyrproject-rtos' - runs-on: - group: zephyr-runner-v2-linux-x64-4xlarge - container: - image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823 - options: '--entrypoint /bin/bash' - env: - ZEPHYR_TOOLCHAIN_VARIANT: zephyr - BSIM_OUT_PATH: /opt/bsim/ - BSIM_COMPONENTS_PATH: /opt/bsim/components - EDTT_PATH: ../tools/edtt - steps: - - name: Apply container owner mismatch workaround - run: | - # FIXME: The owner UID of the GITHUB_WORKSPACE directory may not - # match the container user UID because of the way GitHub - # Actions runner is implemented. Remove this workaround when - # GitHub comes up with a fundamental fix for this problem. - git config --global --add safe.directory ${GITHUB_WORKSPACE} - - - name: Print cloud service information - run: | - echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}" - echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}" - echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}" - - - name: Clone cached Zephyr repository - continue-on-error: true - run: | - git clone --shared /repo-cache/zephyrproject/zephyr . - git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} - - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Environment Setup - env: - BASE_REF: ${{ github.base_ref }} - run: | - git config --global user.email "bot@zephyrproject.org" - git config --global user.name "Zephyr Bot" - rm -fr ".git/rebase-apply" - git rebase origin/${BASE_REF} - git log --pretty=oneline | head -n 10 - west init -l . || true - west config manifest.group-filter -- +ci - west config --global update.narrow true - west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /repo-cache/zephyrproject) - west forall -c 'git reset --hard HEAD' - - echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV - - - name: Check common triggering files - uses: tj-actions/changed-files@v45 - id: check-common-files - with: - files: | - .github/workflows/bsim-tests.yaml - .github/workflows/bsim-tests-publish.yaml - west.yml - boards/posix/ - soc/posix/ - arch/posix/ - include/zephyr/arch/posix/ - scripts/native_simulator/ - tests/bsim/* - boards/nordic/nrf5*/*dt* - dts/*/nordic/ - - - name: Check if Bluethooth files changed - uses: tj-actions/changed-files@v45 - id: check-bluetooth-files - with: - files: | - tests/bsim/bluetooth/ - samples/bluetooth/ - subsys/bluetooth/ - - - name: Check if Networking files changed - uses: tj-actions/changed-files@v45 - id: check-networking-files - with: - files: | - tests/bsim/net/ - samples/net/sockets/echo_*/ - modules/openthread/ - subsys/net/l2/openthread/ - include/zephyr/net/openthread.h - drivers/ieee802154/ - include/zephyr/net/ieee802154* - - - name: Check if UART files changed - uses: tj-actions/changed-files@v45 - id: check-uart-files - with: - files: | - tests/bsim/drivers/uart/ - drivers/serial/*nrfx* - tests/drivers/uart/ - - - name: Update BabbleSim to manifest revision - if: > - steps.check-bluetooth-files.outputs.any_modified == 'true' - || steps.check-networking-files.outputs.any_modified == 'true' - || steps.check-uart-files.outputs.any_modified == 'true' - || steps.check-common-files.outputs.any_modified == 'true' - run: | - export BSIM_VERSION=$( west list bsim -f {revision} ) - echo "Manifest points to bsim sha $BSIM_VERSION" - cd /opt/bsim_west/bsim - git fetch -n origin ${BSIM_VERSION} - git -c advice.detachedHead=false checkout ${BSIM_VERSION} - west update - make everything -s -j 8 - - - name: Run Bluetooth Tests with BSIM - if: steps.check-bluetooth-files.outputs.any_modified == 'true' || steps.check-common-files.outputs.any_modified == 'true' - run: | - tests/bsim/ci.bt.sh - - - name: Run Networking Tests with BSIM - if: steps.check-networking-files.outputs.any_modified == 'true' || steps.check-common-files.outputs.any_modified == 'true' - run: | - tests/bsim/ci.net.sh - - - name: Run UART Tests with BSIM - if: steps.check-uart-files.outputs.any_modified == 'true' || steps.check-common-files.outputs.any_modified == 'true' - run: | - tests/bsim/ci.uart.sh - - - name: Merge Test Results - run: | - pip3 install junitparser junit2html - junitparser merge --glob "./bsim_*/*bsim_results.*.xml" "./twister-out/twister.xml" junit.xml - junit2html junit.xml junit.html - - - name: Upload Unit Test Results in HTML - if: always() - uses: actions/upload-artifact@v4 - with: - name: HTML Unit Test Results - if-no-files-found: ignore - path: | - junit.html - - - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - with: - check_name: Bsim Test Results - files: "junit.xml" - comment_mode: off - - - name: Upload Event Details - if: always() - uses: actions/upload-artifact@v4 - with: - name: event - path: | - ${{ github.event_path }} diff --git a/.github/workflows/bug_snapshot.yaml b/.github/workflows/bug_snapshot.yaml deleted file mode 100644 index b4f9022bf28..00000000000 --- a/.github/workflows/bug_snapshot.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) 2021, 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Make a snapshot of open bugs as a python pickle file, compressed -# using xz. Upload the xz file to Amazon S3. - -name: Bug Snapshot - -on: - workflow_dispatch: - branches: [main] - schedule: - # Run daily at 14:05 - - cron: '5 14 * * *' - -jobs: - make_bugs_pickle: - name: Make bugs pickle - runs-on: ubuntu-22.04 - if: github.repository_owner == 'zephyrproject-rtos' - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Python dependencies - run: | - sudo pip3 install -U setuptools wheel pip - pip3 install -U pygithub - - - name: Snapshot bugs - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - BUGS_PICKLE_FILENAME="zephyr-bugs-$(date -I).pickle.xz" - BUGS_PICKLE_PATH="${RUNNER_TEMP}/${BUGS_PICKLE_FILENAME}" - - set -euo pipefail - python3 scripts/make_bugs_pickle.py | xz > ${BUGS_PICKLE_PATH} - - echo "BUGS_PICKLE_FILENAME=${BUGS_PICKLE_FILENAME}" >> ${GITHUB_ENV} - echo "BUGS_PICKLE_PATH=${BUGS_PICKLE_PATH}" >> ${GITHUB_ENV} - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ vars.AWS_BUILDS_ZEPHYR_BUG_SNAPSHOT_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_BUILDS_ZEPHYR_BUG_SNAPSHOT_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Upload to AWS S3 - run: | - REPOSITORY_NAME="${GITHUB_REPOSITORY#*/}" - - PUBLISH_BUCKET="builds.zephyrproject.org" - PUBLISH_DOMAIN="builds.zephyrproject.io" - if [ "${{github.event_name}}" = "schedule" ]; then - PUBLISH_ROOT="${REPOSITORY_NAME}/bug-snapshot/daily" - else - PUBLISH_ROOT="${REPOSITORY_NAME}/bug-snapshot" - fi - - PUBLISH_UPLOAD_URI="s3://${PUBLISH_BUCKET}/${PUBLISH_ROOT}/${BUGS_PICKLE_FILENAME}" - PUBLISH_DOWNLOAD_URI="https://${PUBLISH_DOMAIN}/${PUBLISH_ROOT}/${BUGS_PICKLE_FILENAME}" - - aws s3 cp --quiet ${BUGS_PICKLE_PATH} ${PUBLISH_UPLOAD_URI} - echo "Bug pickle is available at: ${PUBLISH_DOWNLOAD_URI}" >> ${GITHUB_STEP_SUMMARY} diff --git a/.github/workflows/clang.yaml b/.github/workflows/clang.yaml deleted file mode 100644 index e88141a9e23..00000000000 --- a/.github/workflows/clang.yaml +++ /dev/null @@ -1,164 +0,0 @@ -name: Build with Clang/LLVM - -on: pull_request_target - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -jobs: - clang-build: - if: github.repository_owner == 'zephyrproject-rtos' - runs-on: - group: zephyr-runner-v2-linux-x64-4xlarge - container: - image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823 - options: '--entrypoint /bin/bash' - strategy: - fail-fast: false - matrix: - platform: ["native_sim"] - env: - CCACHE_DIR: /node-cache/ccache-zephyr - CCACHE_REMOTE_STORAGE: "redis://cache-*.keydb-cache.svc.cluster.local|shards=1,2,3" - CCACHE_REMOTE_ONLY: "true" - LLVM_TOOLCHAIN_PATH: /usr/lib/llvm-16 - COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} - BASE_REF: ${{ github.base_ref }} - outputs: - report_needed: ${{ steps.twister.outputs.report_needed }} - steps: - - name: Apply container owner mismatch workaround - run: | - # FIXME: The owner UID of the GITHUB_WORKSPACE directory may not - # match the container user UID because of the way GitHub - # Actions runner is implemented. Remove this workaround when - # GitHub comes up with a fundamental fix for this problem. - git config --global --add safe.directory ${GITHUB_WORKSPACE} - - - name: Print cloud service information - run: | - echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}" - echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}" - echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}" - - - name: Clone cached Zephyr repository - continue-on-error: true - run: | - git clone --shared /repo-cache/zephyrproject/zephyr . - git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} - - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - persist-credentials: false - - - name: Environment Setup - run: | - echo "$HOME/.local/bin" >> $GITHUB_PATH - git config --global user.email "bot@zephyrproject.org" - git config --global user.name "Zephyr Bot" - rm -fr ".git/rebase-apply" - git rebase origin/${BASE_REF} - git log --pretty=oneline | head -n 10 - west init -l . || true - west config --global update.narrow true - west config manifest.group-filter -- +ci,+optional - # In some cases modules are left in a state where they can't be - # updated (i.e. when we cancel a job and the builder is killed), - # So first retry to update, if that does not work, remove all modules - # and start over. (Workaround until we implement more robust module - # west caching). - west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.log || west update --path-cache /repo-cache/zephyrproject 2>&1 1> west2.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /repo-cache/zephyrproject) - - echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV - - - name: Check Environment - run: | - cmake --version - ${LLVM_TOOLCHAIN_PATH}/bin/clang --version - gcc --version - ls -la - - - name: Set up ccache - run: | - mkdir -p ${CCACHE_DIR} - ccache -M 10G - ccache -p - ccache -z -s -vv - - - name: Update BabbleSim to manifest revision - run: | - export BSIM_VERSION=$( west list bsim -f {revision} ) - echo "Manifest points to bsim sha $BSIM_VERSION" - cd /opt/bsim_west/bsim - git fetch -n origin ${BSIM_VERSION} - git -c advice.detachedHead=false checkout ${BSIM_VERSION} - west update - make everything -s -j 8 - - - name: Run Tests with Twister - id: twister - run: | - export ZEPHYR_BASE=${PWD} - export ZEPHYR_TOOLCHAIN_VARIANT=llvm - - # check if we need to run a full twister or not based on files changed - python3 ./scripts/ci/test_plan.py --platform ${{ matrix.platform }} -c origin/${BASE_REF}.. - - # We can limit scope to just what has changed - if [ -s testplan.json ]; then - echo "report_needed=1" >> $GITHUB_OUTPUT - # Full twister but with options based on changes - ./scripts/twister --force-color --inline-logs -M -N -v --load-tests testplan.json --retry-failed 2 - else - # if nothing is run, skip reporting step - echo "report_needed=0" >> $GITHUB_OUTPUT - fi - - - name: Print ccache stats - if: always() - run: | - ccache -s -vv - - - name: Upload Unit Test Results - if: always() && steps.twister.outputs.report_needed != 0 - uses: actions/upload-artifact@v4 - with: - name: Unit Test Results (Subset ${{ matrix.platform }}) - path: twister-out/twister.xml - - clang-build-results: - name: "Publish Unit Tests Results" - needs: clang-build - runs-on: ubuntu-22.04 - if: (success() || failure() ) && needs.clang-build.outputs.report_needed != 0 - steps: - - name: Download Artifacts - uses: actions/download-artifact@v4 - with: - path: artifacts - - name: Merge Test Results - run: | - pip3 install junitparser junit2html - junitparser merge artifacts/*/twister.xml junit.xml - junit2html junit.xml junit-clang.html - - - name: Upload Unit Test Results in HTML - if: always() - uses: actions/upload-artifact@v4 - with: - name: HTML Unit Test Results - if-no-files-found: ignore - path: | - junit-clang.html - - - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - if: always() - with: - check_name: Unit Test Results - files: "**/twister.xml" - comment_mode: off diff --git a/.github/workflows/codecov.yaml b/.github/workflows/codecov.yaml deleted file mode 100644 index aa81056cdfd..00000000000 --- a/.github/workflows/codecov.yaml +++ /dev/null @@ -1,229 +0,0 @@ -name: Code Coverage with codecov - -on: - schedule: - - cron: '25 06,18 * * *' - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -jobs: - codecov: - if: github.repository_owner == 'zephyrproject-rtos' - runs-on: - group: zephyr-runner-v2-linux-x64-4xlarge - container: - image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823 - options: '--entrypoint /bin/bash' - strategy: - fail-fast: false - matrix: - platform: ["mps2/an385", "native_sim", "qemu_x86", "unit_testing"] - include: - - platform: 'mps2/an385' - normalized: 'mps2_an385' - - platform: 'native_sim' - normalized: 'native_sim' - - platform: 'qemu_x86' - normalized: 'qemu_x86' - - platform: 'unit_testing' - normalized: 'unit_testing' - env: - CCACHE_DIR: /node-cache/ccache-zephyr - CCACHE_REMOTE_STORAGE: "redis://cache-*.keydb-cache.svc.cluster.local|shards=1,2,3" - CCACHE_REMOTE_ONLY: "true" - # `--specs` is ignored because ccache is unable to resovle the toolchain specs file path. - CCACHE_IGNOREOPTIONS: '--specs=*' - steps: - - name: Apply container owner mismatch workaround - run: | - # FIXME: The owner UID of the GITHUB_WORKSPACE directory may not - # match the container user UID because of the way GitHub - # Actions runner is implemented. Remove this workaround when - # GitHub comes up with a fundamental fix for this problem. - git config --global --add safe.directory ${GITHUB_WORKSPACE} - - - name: Print cloud service information - run: | - echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}" - echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}" - echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}" - - - name: Update PATH for west - run: | - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Clone cached Zephyr repository - continue-on-error: true - run: | - git clone --shared /repo-cache/zephyrproject/zephyr . - git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} - - - name: checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: west setup - run: | - west init -l . || true - west update 1> west.update.log || west update 1> west.update-2.log - - - name: Environment Setup - run: | - cmake --version - gcc --version - ls -la - - echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV - - - name: Set up ccache - run: | - mkdir -p ${CCACHE_DIR} - ccache -M 10G - ccache -p - ccache -z -s -vv - - - name: Update BabbleSim to manifest revision - run: | - export BSIM_VERSION=$( west list bsim -f {revision} ) - echo "Manifest points to bsim sha $BSIM_VERSION" - cd /opt/bsim_west/bsim - git fetch -n origin ${BSIM_VERSION} - git -c advice.detachedHead=false checkout ${BSIM_VERSION} - west update - make everything -s -j 8 - - - name: Run Tests with Twister (Push) - continue-on-error: true - run: | - export ZEPHYR_BASE=${PWD} - export ZEPHYR_TOOLCHAIN_VARIANT=zephyr - mkdir -p coverage/reports - pip3 install gcovr==6.0 - ./scripts/twister -E ${{matrix.normalized}}-testplan.json - ls -la - ./scripts/twister \ - -i --force-color -N -v --filter runnable -p ${{ matrix.platform }} --coverage \ - -T tests --coverage-tool gcovr -xCONFIG_TEST_EXTRA_STACK_SIZE=4096 -e nano \ - --timeout-multiplier 2 - - - name: Print ccache stats - if: always() - run: | - ccache -s -vv - - - name: Rename coverage files - if: always() - run: | - mv twister-out/coverage.json coverage/reports/${{matrix.normalized}}.json - - - name: Upload Coverage Results - if: always() - uses: actions/upload-artifact@v4 - with: - name: Coverage Data (Subset ${{ matrix.normalized }}) - path: | - coverage/reports/${{ matrix.normalized }}.json - ${{ matrix.normalized }}-testplan.json - - codecov-results: - name: "Publish Coverage Results" - needs: codecov - runs-on: ubuntu-22.04 - # the codecov job might be skipped, we don't need to run this job then - if: success() || failure() - - steps: - - name: checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Download Artifacts - uses: actions/download-artifact@v4 - with: - path: coverage/reports - - - name: Move coverage files - run: | - ls -lRt ./coverage/reports - mv ./coverage/reports/*/*testplan.json . - mv ./coverage/reports/*/coverage/reports/*.json ./coverage/reports - ls -la ./coverage/reports - - - name: Generate list of coverage files - id: get-coverage-files - shell: cmake -P {0} - run: | - file(GLOB INPUT_FILES_LIST "coverage/reports/*.json") - set(MERGELIST "") - set(FILELIST "") - foreach(ITEM ${INPUT_FILES_LIST}) - get_filename_component(f ${ITEM} NAME) - if(FILELIST STREQUAL "") - set(FILELIST "${f}") - else() - set(FILELIST "${FILELIST},${f}") - endif() - endforeach() - foreach(ITEM ${INPUT_FILES_LIST}) - get_filename_component(f ${ITEM} NAME) - if(MERGELIST STREQUAL "") - set(MERGELIST "--add-tracefile ${f}") - else() - set(MERGELIST "${MERGELIST} -a ${f}") - endif() - endforeach() - file(APPEND $ENV{GITHUB_OUTPUT} "mergefiles=${MERGELIST}\n") - file(APPEND $ENV{GITHUB_OUTPUT} "covfiles=${FILELIST}\n") - - - name: Merge coverage files - run: | - pushd ./coverage/reports - pip3 install gcovr==6.0 - gcovr ${{ steps.get-coverage-files.outputs.mergefiles }} --merge-mode-functions=separate --json merged.json - gcovr ${{ steps.get-coverage-files.outputs.mergefiles }} --merge-mode-functions=separate --cobertura merged.xml - popd - - - name: Get current date - id: run_date - run: | - echo "run_date=$(date --iso-8601=minutes)" >> "$GITHUB_OUTPUT" - echo "run_date_short=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT" - echo "run_date_year=$(date +'%Y')" >> "$GITHUB_OUTPUT" - echo "run_date_month=$(date +'%m')" >> "$GITHUB_OUTPUT" - - - name: Generate Coverage Report - if: always() - run: | - pip install xlsxwriter ijson - python3 ./scripts/ci/coverage/coverage_analysis.py \ - -t native_sim-testplan.json \ - -m MAINTAINERS.yml \ - -c coverage/reports/merged.json \ - -o coverage-report-${{ steps.run_date.outputs.run_date_short }} \ - -f all - cp coverage-report-* coverage/reports/ - - - name: Upload Merged Coverage Results and Report - if: always() - uses: actions/upload-artifact@v4 - with: - name: Coverage Data and report - path: | - coverage/reports/merged.json - coverage/reports/merged.xml - coverage/reports/coverage-report-${{ steps.run_date.outputs.run_date_short }}.json - coverage/reports/coverage-report-${{ steps.run_date.outputs.run_date_short }}.xlsx - - - name: Upload coverage to Codecov - if: always() - uses: codecov/codecov-action@v4 - with: - env_vars: OS,PYTHON - fail_ci_if_error: false - verbose: true - token: ${{ secrets.CODECOV_TOKEN }} - files: coverage/reports/merged.xml diff --git a/.github/workflows/coding_guidelines.yml b/.github/workflows/coding_guidelines.yml deleted file mode 100644 index 1bc6ee2e666..00000000000 --- a/.github/workflows/coding_guidelines.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Coding Guidelines - -on: pull_request - -jobs: - compliance_job: - runs-on: ubuntu-22.04 - name: Run coding guidelines checks on patch series (PR) - steps: - - name: Checkout the code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - - name: cache-pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/coding_guidelines.yml') }} - - - name: Install python dependencies - run: | - pip3 install unidiff - pip3 install wheel - pip3 install sh - - - name: Install Packages - run: | - sudo apt-get update - sudo apt-get install coccinelle - - - name: Run Coding Guildeines Checks - continue-on-error: true - id: coding_guidelines - env: - BASE_REF: ${{ github.base_ref }} - run: | - export ZEPHYR_BASE=$PWD - git config --global user.email "actions@zephyrproject.org" - git config --global user.name "Github Actions" - git remote -v - git rebase origin/${BASE_REF} - source zephyr-env.sh - # debug - ls -la - git log --pretty=oneline | head -n 10 - ./scripts/ci/guideline_check.py --output output.txt -c origin/${BASE_REF}.. - - - name: check-warns - run: | - if [[ -s "output.txt" ]]; then - errors=$(cat output.txt) - errors="${errors//'%'/'%25'}" - errors="${errors//$'\n'/'%0A'}" - errors="${errors//$'\r'/'%0D'}" - echo "::error file=output.txt::$errors" - exit 1; - fi diff --git a/.github/workflows/commit-tags.yml b/.github/workflows/commit-tags.yml deleted file mode 100644 index 828f0297167..00000000000 --- a/.github/workflows/commit-tags.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Commit tags - -on: - pull_request: - types: [synchronize, opened, reopened, edited, labeled, unlabeled, - milestoned, demilestoned, assigned, unassigned, ready_for_review, - review_requested] - -jobs: - commit_tags: - runs-on: ubuntu-22.04 - name: Run commit tags checks on patch series (PR) - steps: - - name: Update PATH for west - run: | - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Checkout the code - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - - name: Run the commit tags - uses: nrfconnect/action-commit-tags@main - with: - target: . - upstream: zephyrproject-rtos/zephyr/main diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml deleted file mode 100644 index c8ffedcb77b..00000000000 --- a/.github/workflows/compliance.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: Compliance Checks - -on: - pull_request: - types: - - edited - - opened - - reopened - - synchronize - -jobs: - check_compliance: - runs-on: ubuntu-22.04 - name: Run compliance checks on patch series (PR) - steps: - - name: Update PATH for west - run: | - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Checkout the code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: cache-pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/compliance.yml') }} - - - name: Install python dependencies - run: | - pip3 install setuptools - pip3 install wheel - pip3 install python-magic lxml junitparser gitlint pylint pykwalify yamllint clang-format unidiff sphinx-lint - pip3 install west - - - name: west setup - env: - BASE_REF: ${{ github.base_ref }} - run: | - git config --global user.email "you@example.com" - git config --global user.name "Your Name" - git remote -v - # Ensure there's no merge commits in the PR - #[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \ - #(echo "::error ::Merge commits not allowed, rebase instead";false) - git rebase origin/${BASE_REF} - # debug - git log --pretty=oneline | head -n 10 - west init -l . || true - west config manifest.group-filter -- +ci,-optional - west update -o=--depth=1 -n 2>&1 1> west.update.log || west update -o=--depth=1 -n 2>&1 1> west.update2.log - - - name: Check for PR description - if: ${{ github.event.pull_request.body == '' }} - continue-on-error: true - id: pr_description - run: | - echo "Pull request description cannot be empty." - exit 1 - - - name: Run Compliance Tests - continue-on-error: true - id: compliance - env: - BASE_REF: ${{ github.base_ref }} - run: | - export ZEPHYR_BASE=$PWD - # debug - ls -la - git log --pretty=oneline | head -n 10 - # Increase rename limit to allow for large PRs - git config diff.renameLimit 10000 - ./scripts/ci/check_compliance.py --annotate -e KconfigBasic -e Kconfig \ - -e KconfigBasicNoModules -e ModulesMaintainers -c origin/${BASE_REF}.. - - - name: upload-results - uses: actions/upload-artifact@v4 - continue-on-error: true - with: - name: compliance.xml - path: compliance.xml - - - name: check-warns - run: | - if [[ ! -s "compliance.xml" ]]; then - exit 1; - fi - - warns=("ClangFormat") - files=($(./scripts/ci/check_compliance.py -l)) - - for file in "${files[@]}"; do - f="${file}.txt" - if [[ -s $f ]]; then - results=$(cat $f) - results="${results//'%'/'%25'}" - results="${results//$'\n'/'%0A'}" - results="${results//$'\r'/'%0D'}" - - if [[ "${warns[@]}" =~ "${file}" ]]; then - echo "::warning file=${f}::$results" - else - echo "::error file=${f}::$results" - exit=1 - fi - fi - done - - if [ "${exit}" == "1" ]; then - echo "Compliance error, check for error messages in the \"Run Compliance Tests\" step" - echo "You can run this step locally with the ./scripts/ci/check_compliance.py script." - exit 1; - fi - - if [ "${{ steps.pr_description.outcome }}" == "failure" ]; then - echo "PR description cannot be empty" - exit 1; - fi diff --git a/.github/workflows/daily_test_version.yml b/.github/workflows/daily_test_version.yml deleted file mode 100644 index 1886b4a8c80..00000000000 --- a/.github/workflows/daily_test_version.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2020 Intel Corp. -# SPDX-License-Identifier: Apache-2.0 - -name: Publish commit for daily testing - -on: - schedule: - - cron: '50 22 * * *' - push: - branches: - - refs/tags/* - -jobs: - get_version: - runs-on: ubuntu-22.04 - if: github.repository == 'zephyrproject-rtos/zephyr' - - steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ vars.AWS_TESTING_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_TESTING_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: install-pip - run: | - pip3 install gitpython - - - name: checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Upload to AWS S3 - run: | - python3 scripts/ci/version_mgr.py --update . - aws s3 cp versions.json s3://testing.zephyrproject.org/daily_tests/versions.json diff --git a/.github/workflows/devicetree_checks.yml b/.github/workflows/devicetree_checks.yml deleted file mode 100644 index 060a5d95973..00000000000 --- a/.github/workflows/devicetree_checks.yml +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (c) 2020 Linaro Limited. -# Copyright (c) 2020 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -name: Devicetree script tests - -on: - push: - branches: - - main - - v*-branch - paths: - - 'scripts/dts/**' - - '.github/workflows/devicetree_checks.yml' - pull_request: - branches: - - main - - v*-branch - paths: - - 'scripts/dts/**' - - '.github/workflows/devicetree_checks.yml' - -jobs: - devicetree-checks: - name: Devicetree script tests - runs-on: ${{ matrix.os }} - strategy: - matrix: - python-version: ['3.10', '3.11', '3.12'] - os: [ubuntu-22.04, macos-14, windows-2022] - steps: - - name: checkout - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: cache-pip-linux - if: startsWith(runner.os, 'Linux') - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }} - - name: cache-pip-mac - if: startsWith(runner.os, 'macOS') - uses: actions/cache@v4 - with: - path: ~/Library/Caches/pip - # Trailing '-' was just to get a different cache name - key: ${{ runner.os }}-pip-${{ matrix.python-version }}- - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }}- - - name: cache-pip-win - if: startsWith(runner.os, 'Windows') - uses: actions/cache@v4 - with: - path: ~\AppData\Local\pip\Cache - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }} - - name: install python dependencies - run: | - pip3 install wheel - pip3 install pytest pyyaml tox - - name: run tox - working-directory: scripts/dts/python-devicetree - run: | - tox diff --git a/.github/workflows/do_not_merge.yml b/.github/workflows/do_not_merge.yml deleted file mode 100644 index b6954e288c9..00000000000 --- a/.github/workflows/do_not_merge.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Do Not Merge - -on: - pull_request: - types: [synchronize, opened, reopened, labeled, unlabeled] - -jobs: - do-not-merge: - if: ${{ contains(github.event.*.labels.*.name, 'DNM') || - contains(github.event.*.labels.*.name, 'TSC') || - contains(github.event.*.labels.*.name, 'Architecture Review') || - contains(github.event.*.labels.*.name, 'dev-review') }} - name: Prevent Merging - runs-on: ubuntu-22.04 - steps: - - name: Check for label - run: | - echo "Pull request is labeled as 'DNM', 'TSC', 'Architecture Review' or 'dev-review'." - echo "This workflow fails so that the pull request cannot be merged." - exit 1 diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml deleted file mode 100644 index 1872a824604..00000000000 --- a/.github/workflows/doc-build.yml +++ /dev/null @@ -1,265 +0,0 @@ -# Copyright (c) 2020 Linaro Limited. -# SPDX-License-Identifier: Apache-2.0 - -name: Documentation Build - -on: - schedule: - - cron: '0 */3 * * *' - push: - tags: - - v* - pull_request: - -env: - # NOTE: west docstrings will be extracted from the version listed here - WEST_VERSION: 1.2.0 - # The latest CMake available directly with apt is 3.18, but we need >=3.20 - # so we fetch that through pip. - CMAKE_VERSION: 3.20.5 - DOXYGEN_VERSION: 1.12.0 - # Job count is set to 2 less than the vCPU count of 16 because the total available RAM is 32GiB - # and each sphinx-build process may use more than 2GiB of RAM. - JOB_COUNT: 14 - -jobs: - doc-file-check: - name: Check for doc changes - runs-on: ubuntu-22.04 - if: > - github.repository_owner == 'zephyrproject-rtos' - outputs: - file_check: ${{ steps.check-doc-files.outputs.any_modified }} - steps: - - name: checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - name: Check if Documentation related files changed - uses: tj-actions/changed-files@v45 - id: check-doc-files - with: - files: | - doc/ - **.rst - include/ - kernel/include/kernel_arch_interface.h - lib/libc/** - subsys/testsuite/ztest/include/** - tests/ - **/Kconfig* - west.yml - scripts/dts/ - doc/requirements.txt - .github/workflows/doc-build.yml - scripts/pylib/pytest-twister-harness/src/twister_harness/device/device_adapter.py - scripts/pylib/pytest-twister-harness/src/twister_harness/helpers/shell.py - - doc-build-html: - name: "Documentation Build (HTML)" - needs: [doc-file-check] - if: > - github.repository_owner == 'zephyrproject-rtos' && - ( needs.doc-file-check.outputs.file_check == 'true' || github.event_name != 'pull_request' ) - runs-on: ubuntu-22.04 - timeout-minutes: 90 - concurrency: - group: doc-build-html-${{ github.ref }} - cancel-in-progress: true - - steps: - - name: install-pkgs - run: | - sudo apt-get update - sudo apt-get install -y wget python3-pip git ninja-build graphviz lcov - wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz" - sudo tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz -C /opt - echo "/opt/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH - echo "${HOME}/.local/bin" >> $GITHUB_PATH - - - name: checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - - name: Rebase - if: github.event_name == 'pull_request' - continue-on-error: true - env: - BASE_REF: ${{ github.base_ref }} - PR_HEAD: ${{ github.event.pull_request.head.sha }} - run: | - git config --global user.email "actions@zephyrproject.org" - git config --global user.name "Github Actions" - git rebase origin/${BASE_REF} - git log --graph --oneline HEAD...${PR_HEAD} - - - name: cache-pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: pip-${{ hashFiles('doc/requirements.txt') }} - - - name: install-pip - run: | - sudo pip3 install -U setuptools wheel pip - pip3 install -r doc/requirements.txt - pip3 install west==${WEST_VERSION} - pip3 install cmake==${CMAKE_VERSION} - pip3 install coverxygen - - - name: west setup - run: | - west init -l . - - - name: build-docs - shell: bash - run: | - if [[ "$GITHUB_REF" =~ "refs/tags/v" ]]; then - DOC_TAG="release" - else - DOC_TAG="development" - fi - - if [[ "${{ github.event_name }}" == "pull_request" ]]; then - DOC_TARGET="html-fast" - else - DOC_TARGET="html" - fi - - DOC_TAG=${DOC_TAG} \ - SPHINXOPTS="-j ${JOB_COUNT} -W --keep-going -T" \ - SPHINXOPTS_EXTRA="-q -t publish" \ - make -C doc ${DOC_TARGET} - - # API documentation coverage - python3 -m coverxygen --xml-dir doc/_build/html/doxygen/xml/ --src-dir include/ --output doc-coverage.info - # deprecated page causing issues - lcov --remove doc-coverage.info \*/deprecated > new.info - genhtml --no-function-coverage --no-branch-coverage new.info -o coverage-report - - - name: compress-docs - run: | - tar --use-compress-program="xz -T0" -cf html-output.tar.xz --directory=doc/_build html - tar --use-compress-program="xz -T0" -cf api-output.tar.xz --directory=doc/_build html/doxygen/html - tar --use-compress-program="xz -T0" -cf api-coverage.tar.xz coverage-report - - - name: upload-build - uses: actions/upload-artifact@v4 - with: - name: html-output - path: html-output.tar.xz - - - name: upload-api-coverage - uses: actions/upload-artifact@v4 - with: - name: api-coverage - path: api-coverage.tar.xz - - - name: process-pr - if: github.event_name == 'pull_request' - run: | - REPO_NAME="${{ github.event.repository.name }}" - PR_NUM="${{ github.event.pull_request.number }}" - DOC_URL="https://builds.zephyrproject.io/${REPO_NAME}/pr/${PR_NUM}/docs/" - API_DOC_URL="https://builds.zephyrproject.io/${REPO_NAME}/pr/${PR_NUM}/docs/doxygen/html/" - API_COVERAGE_URL="https://builds.zephyrproject.io/${REPO_NAME}/pr/${PR_NUM}/api-coverage/" - - echo "${PR_NUM}" > pr_num - echo "Documentation will be available shortly at: ${DOC_URL}" >> $GITHUB_STEP_SUMMARY - echo "API Documentation will be available shortly at: ${API_DOC_URL}" >> $GITHUB_STEP_SUMMARY - echo "API Coverage Report will be available shortly at: ${API_COVERAGE_URL}" >> $GITHUB_STEP_SUMMARY - - - name: upload-pr-number - uses: actions/upload-artifact@v4 - if: github.event_name == 'pull_request' - with: - name: pr_num - path: pr_num - - doc-build-pdf: - name: "Documentation Build (PDF)" - needs: [doc-file-check] - if: | - github.event_name != 'pull_request' && - github.repository_owner == 'zephyrproject-rtos' - runs-on: ubuntu-22.04 - container: texlive/texlive:latest - timeout-minutes: 120 - concurrency: - group: doc-build-pdf-${{ github.ref }} - cancel-in-progress: true - - steps: - - name: Apply container owner mismatch workaround - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - - - name: checkout - uses: actions/checkout@v4 - - - name: install-pkgs - run: | - apt-get update - apt-get install -y python3-pip python3-venv ninja-build doxygen graphviz librsvg2-bin imagemagick - - - name: cache-pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: pip-${{ hashFiles('doc/requirements.txt') }} - - - name: setup-venv - run: | - python3 -m venv .venv - . .venv/bin/activate - echo PATH=$PATH >> $GITHUB_ENV - - - name: install-pip - run: | - pip3 install -U setuptools wheel pip - pip3 install -r doc/requirements.txt - pip3 install west==${WEST_VERSION} - pip3 install cmake==${CMAKE_VERSION} - - - name: west setup - run: | - west init -l . - - - name: build-docs - shell: bash - continue-on-error: true - run: | - if [[ "$GITHUB_REF" =~ "refs/tags/v" ]]; then - DOC_TAG="release" - else - DOC_TAG="development" - fi - - DOC_TAG=${DOC_TAG} \ - SPHINXOPTS="-q -j ${JOB_COUNT}" \ - LATEXMKOPTS="-quiet -halt-on-error" \ - make -C doc pdf - - - name: upload-build - if: always() - uses: actions/upload-artifact@v4 - with: - name: pdf-output - if-no-files-found: ignore - path: | - doc/_build/latex/zephyr.pdf - doc/_build/latex/zephyr.log - - doc-build-status-check: - if: always() - name: "Documentation Build Status" - needs: - - doc-build-pdf - - doc-file-check - - doc-build-html - uses: ./.github/workflows/ready-to-merge.yml - with: - needs_context: ${{ toJson(needs) }} diff --git a/.github/workflows/doc-publish-pr.yml b/.github/workflows/doc-publish-pr.yml deleted file mode 100644 index b202b0a790a..00000000000 --- a/.github/workflows/doc-publish-pr.yml +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright (c) 2020 Linaro Limited. -# Copyright (c) 2021 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -name: Documentation Publish (Pull Request) - -on: - workflow_run: - workflows: ["Documentation Build"] - types: - - completed - -jobs: - doc-publish: - name: Publish Documentation - runs-on: ubuntu-22.04 - if: | - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' && - github.repository == 'zephyrproject-rtos/zephyr' - - steps: - - name: Download artifacts - uses: dawidd6/action-download-artifact@v6 - with: - workflow: doc-build.yml - run_id: ${{ github.event.workflow_run.id }} - - - name: Load PR number - run: | - echo "PR_NUM=$(> $GITHUB_ENV - - - name: Check PR number - id: check-pr - uses: carpentries/actions/check-valid-pr@v0.14.0 - with: - pr: ${{ env.PR_NUM }} - sha: ${{ github.event.workflow_run.head_sha }} - - - name: Validate PR number - if: steps.check-pr.outputs.VALID != 'true' - run: | - echo "ABORT: PR number validation failed!" - exit 1 - - - name: Uncompress HTML docs - run: | - tar xf html-output/html-output.tar.xz -C html-output - if [ -f api-coverage/api-coverage.tar.xz ]; then - tar xf api-coverage/api-coverage.tar.xz -C api-coverage - fi - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ vars.AWS_BUILDS_ZEPHYR_PR_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_BUILDS_ZEPHYR_PR_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Upload to AWS S3 - env: - HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }} - run: | - aws s3 sync --quiet html-output/html \ - s3://builds.zephyrproject.org/${{ github.event.repository.name }}/pr/${PR_NUM}/docs \ - --delete - if [ -d api-coverage/coverage-report ]; then - aws s3 sync --quiet api-coverage/coverage-report/ \ - s3://builds.zephyrproject.org/${{ github.event.repository.name }}/pr/${PR_NUM}/api-coverage \ - --delete - fi diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml deleted file mode 100644 index 51c451c75ea..00000000000 --- a/.github/workflows/doc-publish.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) 2020 Linaro Limited. -# Copyright (c) 2021 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -name: Documentation Publish - -on: - workflow_run: - workflows: ["Documentation Build"] - branches: - - main - - v* - types: - - completed - -jobs: - doc-publish: - name: Publish Documentation - runs-on: ubuntu-22.04 - if: | - github.event.workflow_run.event != 'pull_request' && - github.event.workflow_run.conclusion == 'success' && - github.repository == 'zephyrproject-rtos/zephyr' - - steps: - - name: Download artifacts - uses: dawidd6/action-download-artifact@v6 - with: - workflow: doc-build.yml - run_id: ${{ github.event.workflow_run.id }} - - - name: Uncompress HTML docs - run: | - tar xf html-output/html-output.tar.xz -C html-output - if [ -f api-coverage/api-coverage.tar.xz ]; then - tar xf api-coverage/api-coverage.tar.xz -C api-coverage - fi - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ vars.AWS_DOCS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_DOCS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Upload to AWS S3 - env: - HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }} - run: | - if [ "${HEAD_BRANCH:0:1}" == "v" ]; then - VERSION=${HEAD_BRANCH:1} - else - VERSION="latest" - fi - - aws s3 sync --quiet html-output/html s3://docs.zephyrproject.org/${VERSION} --delete - aws s3 sync --quiet html-output/html/doxygen/html s3://docs.zephyrproject.org/apidoc/${VERSION} --delete - if [ -d api-coverage/coverage-report ]; then - aws s3 sync --quiet api-coverage/coverage-report/ s3://docs.zephyrproject.org/api-coverage/${VERSION} --delete - fi - aws s3 cp --quiet pdf-output/zephyr.pdf s3://docs.zephyrproject.org/${VERSION}/zephyr.pdf diff --git a/.github/workflows/errno.yml b/.github/workflows/errno.yml deleted file mode 100644 index b1f7e6f4e62..00000000000 --- a/.github/workflows/errno.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Error numbers -on: - pull_request: - paths: - - '.github/workflows/errno.yml' - - 'lib/libc/minimal/include/errno.h' - - 'scripts/ci/errno.py' - -jobs: - check-errno: - runs-on: ubuntu-22.04 - container: - image: ghcr.io/zephyrproject-rtos/ci:v0.26.13 - - steps: - - name: Apply container owner mismatch workaround - run: | - # FIXME: The owner UID of the GITHUB_WORKSPACE directory may not - # match the container user UID because of the way GitHub - # Actions runner is implemented. Remove this workaround when - # GitHub comes up with a fundamental fix for this problem. - git config --global --add safe.directory ${GITHUB_WORKSPACE} - - - name: checkout - uses: actions/checkout@v4 - - - name: Environment Setup - run: | - echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV - - - name: Run errno.py - run: | - export ZEPHYR_BASE=${PWD} - ./scripts/ci/errno.py diff --git a/.github/workflows/footprint-tracking.yml b/.github/workflows/footprint-tracking.yml deleted file mode 100644 index 08b858af477..00000000000 --- a/.github/workflows/footprint-tracking.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Footprint Tracking - -# Run every 12 hours and on tags -on: - schedule: - - cron: '50 1/12 * * *' - push: - paths: - - 'VERSION' - - '.github/workflows/footprint-tracking.yml' - branches: - - main - - v*-branch - tags: - # only publish v* tags, do not care about zephyr-v* which point to the - # same commit - - 'v*' - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -jobs: - footprint-tracking: - runs-on: - group: zephyr-runner-v2-linux-x64-4xlarge - if: github.repository_owner == 'zephyrproject-rtos' - container: - image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823 - options: '--entrypoint /bin/bash' - strategy: - fail-fast: false - env: - ZEPHYR_TOOLCHAIN_VARIANT: zephyr - steps: - - name: Apply container owner mismatch workaround - run: | - # FIXME: The owner UID of the GITHUB_WORKSPACE directory may not - # match the container user UID because of the way GitHub - # Actions runner is implemented. Remove this workaround when - # GitHub comes up with a fundamental fix for this problem. - git config --global --add safe.directory ${GITHUB_WORKSPACE} - - - name: Print cloud service information - run: | - echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}" - echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}" - echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}" - - - name: Update PATH for west - run: | - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Install packages - run: | - sudo apt-get update - sudo apt-get install -y python3-venv - sudo pip3 install -U setuptools wheel pip gitpython - - - name: checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - - name: Environment Setup - run: | - echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV - - - name: west setup - run: | - west init -l . || true - west config --global update.narrow true - west update 2>&1 1> west.update.log || west update 2>&1 1> west.update2.log - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ vars.AWS_TESTING_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_TESTING_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Record Footprint - env: - BASE_REF: ${{ github.base_ref }} - run: | - export ZEPHYR_BASE=${PWD} - ./scripts/footprint/track.py -p scripts/footprint/plan.txt - - - name: Upload footprint data - run: | - python3 -m venv .venv - . .venv/bin/activate - pip3 install awscli - aws s3 sync --quiet footprint_data/ s3://testing.zephyrproject.org/footprint_data/ diff --git a/.github/workflows/greet_first_time_contributor.yml b/.github/workflows/greet_first_time_contributor.yml deleted file mode 100644 index 5f62c03d6de..00000000000 --- a/.github/workflows/greet_first_time_contributor.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Greet first time contributor - -on: - issues: - types: [opened] - pull_request_target: - types: [opened, closed] - -jobs: - check_for_first_interaction: - runs-on: ubuntu-22.04 - if: github.repository == 'zephyrproject-rtos/zephyr' - - steps: - - uses: actions/checkout@v4 - - uses: zephyrproject-rtos/action-first-interaction@v1.1.1-zephyr-5 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - issue-message: > - Hi @${{github.event.issue.user.login}}! We appreciate you submitting your first issue - for our open-source project. 🌟 - - - Even though I'm a bot, I can assure you that the whole community is genuinely grateful - for your time and effort. 🤖💙 - - pr-opened-message: > - Hello @${{ github.event.pull_request.user.login }}, and thank you very much for your - first pull request to the Zephyr project! - - Our Continuous Integration pipeline will execute a series of checks on your Pull Request - commit messages and code, and you are expected to address any failures by updating the PR. - Please take a look at [our commit message guidelines](https://docs.zephyrproject.org/latest/contribute/guidelines.html#commit-message-guidelines) - to find out how to format your commit messages, and at [our contribution workflow](https://docs.zephyrproject.org/latest/contribute/guidelines.html#contribution-workflow) - to understand how to update your Pull Request. - If you haven't already, please make sure to review the project's [Contributor - Expectations](https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html) - and update (by amending and force-pushing the commits) your pull request if necessary. - - If you are stuck or need help please join us on [Discord](https://chat.zephyrproject.org/) - and ask your question there. Additionally, you can [escalate the review](https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#pr-review-escalation) - when applicable. 😊 - - pr-merged-message: > - Hi @${{ github.event.pull_request.user.login }}! - - Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a - fantastic achievement, and we're thrilled to have you as part of our community! - - - To celebrate this milestone and showcase your contribution, we'd love to award you the - Zephyr Technical Contributor badge. If you're interested, please claim your badge by - filling out this form: [Claim Your Zephyr Badge](https://forms.gle/oCw9iAPLhUsHTapc8). - - - Thank you for your valuable input, and we look forward to seeing more of your - contributions in the future! 🪁 diff --git a/.github/workflows/hello_world_multiplatform.yaml b/.github/workflows/hello_world_multiplatform.yaml deleted file mode 100644 index 08fd42d7866..00000000000 --- a/.github/workflows/hello_world_multiplatform.yaml +++ /dev/null @@ -1,79 +0,0 @@ -name: Hello World (Multiplatform) - -on: - push: - branches: - - main - - v*-branch - - collab-* - pull_request: - branches: - - main - - v*-branch - - collab-* - paths: - - 'scripts/build/**' - - 'scripts/requirements*.txt' - - '.github/workflows/hello_world_multiplatform.yaml' - - 'SDK_VERSION' - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -jobs: - build: - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14, windows-2022] - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: zephyr - fetch-depth: 0 - - - name: Rebase - if: github.event_name == 'pull_request' - env: - BASE_REF: ${{ github.base_ref }} - PR_HEAD: ${{ github.event.pull_request.head.sha }} - working-directory: zephyr - shell: bash - run: | - git config --global user.email "actions@zephyrproject.org" - git config --global user.name "Github Actions" - git rebase origin/${BASE_REF} - git log --graph --oneline HEAD...${PR_HEAD} - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Setup Zephyr project - uses: zephyrproject-rtos/action-zephyr-setup@v1 - with: - app-path: zephyr - toolchains: all - - - name: Build firmware - working-directory: zephyr - shell: bash - run: | - if [ "${{ runner.os }}" = "macOS" ]; then - EXTRA_TWISTER_FLAGS="-P native_sim --build-only" - elif [ "${{ runner.os }}" = "Windows" ]; then - EXTRA_TWISTER_FLAGS="-P native_sim --short-build-path -O/tmp/twister-out" - fi - ./scripts/twister --force-color --inline-logs -T samples/hello_world -v $EXTRA_TWISTER_FLAGS - - - name: Upload artifacts - if: failure() - uses: actions/upload-artifact@v4 - with: - if-no-files-found: ignore - path: - zephyr/twister-out/*/samples/hello_world/sample.basic.helloworld/build.log diff --git a/.github/workflows/issue_count.yml b/.github/workflows/issue_count.yml deleted file mode 100644 index 7d6ed6dfc3e..00000000000 --- a/.github/workflows/issue_count.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Issue Tracker - -on: - schedule: - - cron: '*/10 * * * *' - -env: - OUTPUT_FILE_NAME: IssuesReport.md - COMMITTER_EMAIL: actions@github.com - COMMITTER_NAME: github-actions - COMMITTER_USERNAME: github-actions - - -jobs: - track-issues: - name: "Collect Issue Stats" - runs-on: ubuntu-22.04 - if: github.repository == 'zephyrproject-rtos/zephyr' - - steps: - - name: Download configuration file - run: | - wget -q https://raw.githubusercontent.com/$GITHUB_REPOSITORY/main/.github/workflows/issues-report-config.json - - - name: install-packages - run: | - sudo apt-get update - sudo apt-get install discount - - - uses: brcrista/summarize-issues@v4 - with: - title: 'Issues Report for ${{ github.repository }}' - configPath: 'issues-report-config.json' - outputPath: ${{ env.OUTPUT_FILE_NAME }} - token: ${{ secrets.GITHUB_TOKEN }} - - - name: upload-stats - uses: actions/upload-artifact@v4 - continue-on-error: true - with: - name: ${{ env.OUTPUT_FILE_NAME }} - path: ${{ env.OUTPUT_FILE_NAME }} - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ vars.AWS_TESTING_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_TESTING_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Post Results - run: | - mkd2html IssuesReport.md IssuesReport.html - aws s3 cp --quiet IssuesReport.html s3://testing.zephyrproject.org/issues/$GITHUB_REPOSITORY/index.html diff --git a/.github/workflows/issues-report-config.json b/.github/workflows/issues-report-config.json deleted file mode 100644 index ad069b99c8b..00000000000 --- a/.github/workflows/issues-report-config.json +++ /dev/null @@ -1,37 +0,0 @@ -[ - { - "section": "High Priority Bugs", - "labels": ["bug", "priority: high"], - "threshold": 0 - }, - { - "section": "Medium Priority Bugs", - "labels": ["bug", "priority: medium"], - "threshold": 20 - }, - { - "section": "Low Priority Bugs", - "labels": ["bug", "priority: low"], - "threshold": 100 - }, - { - "section": "Enhancements", - "labels": ["Enhancement"], - "threshold": 500 - }, - { - "section": "Features", - "labels": ["Feature"], - "threshold": 100 - }, - { - "section": "Questions", - "labels": ["question"], - "threshold": 100 - }, - { - "section": "Static Analysis", - "labels": ["Coverity"], - "threshold": 100 - } -] diff --git a/.github/workflows/license_check.yml b/.github/workflows/license_check.yml deleted file mode 100644 index 7d2d083faae..00000000000 --- a/.github/workflows/license_check.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Scancode - -on: [pull_request] - -jobs: - scancode_job: - runs-on: ubuntu-22.04 - name: Scan code for licenses - steps: - - name: Checkout the code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Scan the code - id: scancode - uses: zephyrproject-rtos/action_scancode@v4 - with: - directory-to-scan: 'scan/' - - name: Artifact Upload - uses: actions/upload-artifact@v4 - with: - name: scancode - path: ./artifacts - - - name: Verify - run: | - if [ -s ./artifacts/report.txt ]; then - report=$(cat ./artifacts/report.txt) - report="${report//'%'/'%25'}" - report="${report//$'\n'/'%0A'}" - report="${report//$'\r'/'%0D'}" - echo "::error file=./artifacts/report.txt::$report" - exit 1 - fi diff --git a/.github/workflows/manifest-PR.yml b/.github/workflows/manifest-PR.yml index a871aa381de..98d2e2334e7 100644 --- a/.github/workflows/manifest-PR.yml +++ b/.github/workflows/manifest-PR.yml @@ -15,3 +15,5 @@ jobs: with: token: ${{ secrets.NCS_GITHUB_TOKEN }} manifest-pr-title-details: ${{ github.event.pull_request.title }} + target-repo: nrfconnect/sdk-nrf-testing + forked-repo: nordicbuilder/sdk-nrf-testing diff --git a/.github/workflows/manifest.yml b/.github/workflows/manifest.yml deleted file mode 100644 index 76b80f66504..00000000000 --- a/.github/workflows/manifest.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Manifest -on: - pull_request_target: - -jobs: - contribs: - runs-on: ubuntu-22.04 - name: Manifest - steps: - - name: Checkout the code - uses: actions/checkout@v4 - with: - path: zephyrproject/zephyr - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - persist-credentials: false - - - name: west setup - env: - BASE_REF: ${{ github.base_ref }} - working-directory: zephyrproject/zephyr - run: | - pip3 install west - git config --global user.email "you@example.com" - git config --global user.name "Your Name" - west init -l . || true - - - name: Manifest - uses: zephyrproject-rtos/action-manifest@v1.3.1 - with: - github-token: ${{ secrets.ZB_GITHUB_TOKEN }} - manifest-path: 'west.yml' - checkout-path: 'zephyrproject/zephyr' - use-tree-checkout: 'true' - check-impostor-commits: 'true' - label-prefix: 'manifest-' - verbosity-level: '1' - labels: 'manifest' - dnm-labels: 'DNM' diff --git a/.github/workflows/pylib_tests.yml b/.github/workflows/pylib_tests.yml deleted file mode 100644 index 8827acebdb4..00000000000 --- a/.github/workflows/pylib_tests.yml +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2023 Intel Corporation. -# SPDX-License-Identifier: Apache-2.0 - -name: Misc. Pylib Scripts TestSuite - -on: - push: - branches: - - main - - v*-branch - paths: - - 'scripts/pylib/build_helpers/**' - - '.github/workflows/pylib_tests.yml' - pull_request: - branches: - - main - - v*-branch - paths: - - 'scripts/pylib/build_helpers/**' - - '.github/workflows/pylib_tests.yml' - -jobs: - pylib-tests: - name: Misc. Pylib Unit Tests - runs-on: ${{ matrix.os }} - strategy: - matrix: - python-version: ['3.10', '3.11', '3.12'] - os: [ubuntu-22.04] - steps: - - name: checkout - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: cache-pip-linux - if: startsWith(runner.os, 'Linux') - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }} - - name: install-packages - run: | - pip3 install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt - - name: Run pytest for build_helpers - env: - ZEPHYR_BASE: ./ - ZEPHYR_TOOLCHAIN_VARIANT: zephyr - run: | - echo "Run build_helpers tests" - PYTHONPATH=./scripts/tests pytest ./scripts/tests/build_helpers diff --git a/.github/workflows/ready-to-merge.yml b/.github/workflows/ready-to-merge.yml deleted file mode 100644 index 897a6044522..00000000000 --- a/.github/workflows/ready-to-merge.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: ready to merge - -on: - workflow_call: - inputs: - needs_context: - type: string - required: true - -jobs: - all_jobs_passed: - name: all jobs passed - runs-on: ubuntu-latest - steps: - - name: "Check status of all required jobs" - run: |- - NEEDS_CONTEXT='${{ inputs.needs_context }}' - JOB_IDS=$(echo "$NEEDS_CONTEXT" | jq -r 'keys[]') - for JOB_ID in $JOB_IDS; do - RESULT=$(echo "$NEEDS_CONTEXT" | jq -r ".[\"$JOB_ID\"].result") - echo "$JOB_ID job result: $RESULT" - if [[ $RESULT != "success" && $RESULT != "skipped" ]]; then - echo "***" - echo "Error: The $JOB_ID job did not pass." - exit 1 - fi - done - echo "All jobs passed or were skipped." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 002485b9d80..00000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Create a Release - -on: - push: - tags: - - 'v*' - - '!v*rc*' - -jobs: - release: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Get the version - id: get_version - run: | - echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - echo "TRIMMED_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT - - - name: REUSE Compliance Check - uses: fsfe/reuse-action@v4 - with: - args: spdx -o zephyr-${{ steps.get_version.outputs.VERSION }}.spdx - - - name: upload-results - uses: actions/upload-artifact@v4 - continue-on-error: true - with: - name: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx - path: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx - - - name: Create empty release notes body - run: | - echo "TODO: add release overview and notes link" > release-notes.txt - - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Zephyr ${{ steps.get_version.outputs.TRIMMED_VERSION }} - body_path: release-notes.txt - draft: true - prerelease: true - - - name: Upload Release Assets - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx - asset_name: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx - asset_content_type: text/plain diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml deleted file mode 100644 index e2325da0a4a..00000000000 --- a/.github/workflows/scorecards.yml +++ /dev/null @@ -1,61 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. They are provided -# by a third-party and are governed by separate terms of service, privacy -# policy, and support documentation. - -name: Scorecards supply-chain security -on: - # For Branch-Protection check. Only the default branch is supported. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection - branch_protection_rule: - # To guarantee Maintained check is occasionally updated. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained - schedule: - - cron: '43 7 * * 6' - push: - branches: - - main - -permissions: read-all - -jobs: - analysis: - name: Scorecard analysis - runs-on: ubuntu-latest - permissions: - # Needed for Code scanning upload - security-events: write - # Needed for GitHub OIDC token if publish_results is true - id-token: write - - steps: - - name: "Checkout code" - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: "Run analysis" - uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 - with: - results_file: results.sarif - results_format: sarif - # Publish results to OpenSSF REST API for easy access by consumers. - # - Allows the repository to include the Scorecard badge. - # - See https://github.com/ossf/scorecard-action#publishing-results. - publish_results: true - - # Upload the results as artifacts (optional). Commenting out will disable - # uploads of run results in SARIF format to the repository Actions tab. - # https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts - - name: "Upload artifact" - uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 - with: - name: SARIF file - path: results.sarif - retention-days: 5 - - # Upload the results to GitHub's code scanning dashboard (optional). - # Commenting out will disable upload of results to your repo's Code Scanning dashboard - - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 - with: - sarif_file: results.sarif diff --git a/.github/workflows/scripts_tests.yml b/.github/workflows/scripts_tests.yml deleted file mode 100644 index 86db35ae02e..00000000000 --- a/.github/workflows/scripts_tests.yml +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 2023 Google LLC -# SPDX-License-Identifier: Apache-2.0 - -name: Scripts tests - -on: - push: - branches: - - main - - v*-branch - paths: - - 'scripts/build/**' - - '.github/workflows/scripts_tests.yml' - pull_request: - branches: - - main - - v*-branch - paths: - - 'scripts/build/**' - - '.github/workflows/scripts_tests.yml' - -jobs: - scripts-tests: - name: Scripts tests - runs-on: ${{ matrix.os }} - strategy: - matrix: - python-version: ['3.10', '3.11', '3.12'] - os: [ubuntu-20.04] - steps: - - name: checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - - name: Rebase - continue-on-error: true - env: - BASE_REF: ${{ github.base_ref }} - PR_HEAD: ${{ github.event.pull_request.head.sha }} - run: | - git config --global user.email "actions@zephyrproject.org" - git config --global user.name "Github Actions" - git rebase origin/${BASE_REF} - git log --graph --oneline HEAD...${PR_HEAD} - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: cache-pip-linux - if: startsWith(runner.os, 'Linux') - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }} - - - name: install-packages - run: | - pip3 install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt - - - name: Run pytest - env: - ZEPHYR_BASE: ./ - run: | - echo "Run script tests" - pytest ./scripts/build diff --git a/.github/workflows/stale-workflow-queue-cleanup.yml b/.github/workflows/stale-workflow-queue-cleanup.yml deleted file mode 100644 index ec1a4cc716f..00000000000 --- a/.github/workflows/stale-workflow-queue-cleanup.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Stale Workflow Queue Cleanup - -on: - workflow_dispatch: - branches: [main] - schedule: - # everyday at 15:00 - - cron: '0 15 * * *' - -concurrency: - group: stale-workflow-queue-cleanup - cancel-in-progress: true - -jobs: - cleanup: - name: Cleanup - runs-on: ubuntu-22.04 - - steps: - - name: Delete stale queued workflow runs - uses: MajorScruffy/delete-old-workflow-runs@v0.3.0 - with: - repository: ${{ github.repository }} - # Remove any workflow runs in "queued" state for more than 1 day - older-than-seconds: 86400 - status: queued - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale_issue.yml b/.github/workflows/stale_issue.yml deleted file mode 100644 index f71e485ff8e..00000000000 --- a/.github/workflows/stale_issue.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Close stale pull requests/issues" -on: - schedule: - - cron: "16 00 * * *" - -jobs: - stale: - name: Find Stale issues and PRs - runs-on: ubuntu-22.04 - if: github.repository == 'zephyrproject-rtos/zephyr' - steps: - - uses: actions/stale@v9 - with: - stale-pr-message: 'This pull request has been marked as stale because it has been open (more - than) 60 days with no activity. Remove the stale label or add a comment saying that you - would like to have the label removed otherwise this pull request will automatically be - closed in 14 days. Note, that you can always re-open a closed pull request at any time.' - stale-issue-message: 'This issue has been marked as stale because it has been open (more - than) 60 days with no activity. Remove the stale label or add a comment saying that you - would like to have the label removed otherwise this issue will automatically be closed in - 14 days. Note, that you can always re-open a closed issue at any time.' - days-before-stale: 60 - days-before-close: 14 - stale-issue-label: 'Stale' - stale-pr-label: 'Stale' - exempt-pr-labels: 'Blocked,In progress' - exempt-issue-labels: 'In progress,Enhancement,Feature,Feature Request,RFC,Meta,Process,Coverity' - operations-per-run: 400 diff --git a/.github/workflows/stats_merged_prs.yml b/.github/workflows/stats_merged_prs.yml deleted file mode 100644 index cd874b65b1a..00000000000 --- a/.github/workflows/stats_merged_prs.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Merged PR stats - -on: - pull_request_target: - branches: - - main - - v*-branch - types: [closed] -jobs: - record_merged: - if: github.event.pull_request.merged == true && github.repository == 'zephyrproject-rtos/zephyr' - runs-on: ubuntu-22.04 - steps: - - name: checkout - uses: actions/checkout@v4 - - name: PR event - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }} - ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443" - PR_STAT_ES_INDEX: ${{ vars.PR_STAT_ES_INDEX }} - run: | - pip3 install pygithub elasticsearch - python3 ./scripts/ci/stats/merged_prs.py --pull-request ${{ github.event.pull_request.number }} --repo ${{ github.repository }} diff --git a/.github/workflows/twister.yaml b/.github/workflows/twister.yaml deleted file mode 100644 index cc3c9e3ffdf..00000000000 --- a/.github/workflows/twister.yaml +++ /dev/null @@ -1,369 +0,0 @@ -name: Run tests with twister - -on: - push: - branches: - - main - - v*-branch - - collab-* - pull_request_target: - branches: - - main - - v*-branch - - collab-* - schedule: - # Run at 03:00 UTC on every Sunday - - cron: '0 3 * * 0' - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -jobs: - twister-build-prep: - if: github.repository_owner == 'zephyrproject-rtos' - runs-on: - group: zephyr-runner-v2-linux-x64-4xlarge - container: - image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823 - options: '--entrypoint /bin/bash' - outputs: - subset: ${{ steps.output-services.outputs.subset }} - size: ${{ steps.output-services.outputs.size }} - fullrun: ${{ steps.output-services.outputs.fullrun }} - env: - MATRIX_SIZE: 10 - PUSH_MATRIX_SIZE: 20 - DAILY_MATRIX_SIZE: 80 - BSIM_OUT_PATH: /opt/bsim/ - BSIM_COMPONENTS_PATH: /opt/bsim/components - TESTS_PER_BUILDER: 700 - COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} - BASE_REF: ${{ github.base_ref }} - steps: - - name: Apply container owner mismatch workaround - run: | - # FIXME: The owner UID of the GITHUB_WORKSPACE directory may not - # match the container user UID because of the way GitHub - # Actions runner is implemented. Remove this workaround when - # GitHub comes up with a fundamental fix for this problem. - git config --global --add safe.directory ${GITHUB_WORKSPACE} - - - name: Print cloud service information - run: | - echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}" - echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}" - echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}" - - - name: Clone cached Zephyr repository - if: github.event_name == 'pull_request_target' - continue-on-error: true - run: | - git clone --shared /repo-cache/zephyrproject/zephyr . - git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} - - - name: Checkout - if: github.event_name == 'pull_request_target' - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - persist-credentials: false - - - name: Environment Setup - if: github.event_name == 'pull_request_target' - run: | - git config --global user.email "bot@zephyrproject.org" - git config --global user.name "Zephyr Bot" - rm -fr ".git/rebase-apply" - git rebase origin/${BASE_REF} - git log --pretty=oneline | head -n 10 - west init -l . || true - west config manifest.group-filter -- +ci,+optional - west config --global update.narrow true - west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /repo-cache/zephyrproject) - west forall -c 'git reset --hard HEAD' - - echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV - - - name: Generate Test Plan with Twister - if: github.event_name == 'pull_request_target' - id: test-plan - run: | - export ZEPHYR_BASE=${PWD} - export ZEPHYR_TOOLCHAIN_VARIANT=zephyr - python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request -t $TESTS_PER_BUILDER - if [ -s .testplan ]; then - cat .testplan >> $GITHUB_ENV - else - echo "TWISTER_NODES=${MATRIX_SIZE}" >> $GITHUB_ENV - fi - rm -f testplan.json .testplan - - - name: Determine matrix size - id: output-services - run: | - if [ "${{github.event_name}}" = "pull_request_target" ]; then - if [ -n "${TWISTER_NODES}" ]; then - subset="[$(seq -s',' 1 ${TWISTER_NODES})]" - else - subset="[$(seq -s',' 1 ${MATRIX_SIZE})]" - fi - size=${TWISTER_NODES} - elif [ "${{github.event_name}}" = "push" ]; then - subset="[$(seq -s',' 1 ${PUSH_MATRIX_SIZE})]" - size=${MATRIX_SIZE} - elif [ "${{github.event_name}}" = "schedule" -a "${{github.repository}}" = "zephyrproject-rtos/zephyr" ]; then - subset="[$(seq -s',' 1 ${DAILY_MATRIX_SIZE})]" - size=${DAILY_MATRIX_SIZE} - else - size=0 - fi - echo "subset=${subset}" >> $GITHUB_OUTPUT - echo "size=${size}" >> $GITHUB_OUTPUT - echo "fullrun=${TWISTER_FULL}" >> $GITHUB_OUTPUT - - twister-build: - runs-on: - group: zephyr-runner-v2-linux-x64-4xlarge - needs: twister-build-prep - if: needs.twister-build-prep.outputs.size != 0 - container: - image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823 - options: '--entrypoint /bin/bash' - strategy: - fail-fast: false - matrix: - subset: ${{fromJSON(needs.twister-build-prep.outputs.subset)}} - timeout-minutes: 1440 - env: - CCACHE_DIR: /node-cache/ccache-zephyr - CCACHE_REMOTE_STORAGE: "redis://cache-*.keydb-cache.svc.cluster.local|shards=1,2,3" - CCACHE_REMOTE_ONLY: "true" - # `--specs` is ignored because ccache is unable to resolve the toolchain specs file path. - CCACHE_IGNOREOPTIONS: '--specs=*' - BSIM_OUT_PATH: /opt/bsim/ - BSIM_COMPONENTS_PATH: /opt/bsim/components - TWISTER_COMMON: ' --force-color --inline-logs -v -N -M --retry-failed 3 --timeout-multiplier 2 ' - DAILY_OPTIONS: ' -M --build-only --all --show-footprint' - PR_OPTIONS: ' --clobber-output --integration' - PUSH_OPTIONS: ' --clobber-output -M --show-footprint' - COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} - BASE_REF: ${{ github.base_ref }} - steps: - - name: Print cloud service information - run: | - echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}" - echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}" - echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}" - - - name: Apply container owner mismatch workaround - run: | - # FIXME: The owner UID of the GITHUB_WORKSPACE directory may not - # match the container user UID because of the way GitHub - # Actions runner is implemented. Remove this workaround when - # GitHub comes up with a fundamental fix for this problem. - git config --global --add safe.directory ${GITHUB_WORKSPACE} - - - name: Clone cached Zephyr repository - continue-on-error: true - run: | - git clone --shared /repo-cache/zephyrproject/zephyr . - git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} - - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - persist-credentials: false - - - name: Environment Setup - run: | - if [ "${{github.event_name}}" = "pull_request_target" ]; then - git config --global user.email "bot@zephyrproject.org" - git config --global user.name "Zephyr Builder" - rm -fr ".git/rebase-apply" - git rebase origin/${BASE_REF} - git log --pretty=oneline | head -n 10 - fi - echo "$HOME/.local/bin" >> $GITHUB_PATH - - west init -l . || true - west config manifest.group-filter -- +ci,+optional - west config --global update.narrow true - west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /repo-cache/zephyrproject) - west forall -c 'git reset --hard HEAD' - - echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV - - - name: Check Environment - run: | - cmake --version - gcc --version - ls -la - echo "github.ref: ${{ github.ref }}" - echo "github.base_ref: ${{ github.base_ref }}" - echo "github.ref_name: ${{ github.ref_name }}" - - - name: Set up ccache - run: | - mkdir -p ${CCACHE_DIR} - ccache -M 10G - ccache -p - ccache -z -s -vv - - - name: Update BabbleSim to manifest revision - run: | - export BSIM_VERSION=$( west list bsim -f {revision} ) - echo "Manifest points to bsim sha $BSIM_VERSION" - cd /opt/bsim_west/bsim - git fetch -n origin ${BSIM_VERSION} - git -c advice.detachedHead=false checkout ${BSIM_VERSION} - west update - make everything -s -j 8 - - - if: github.event_name == 'push' - name: Run Tests with Twister (Push) - run: | - export ZEPHYR_BASE=${PWD} - export ZEPHYR_TOOLCHAIN_VARIANT=zephyr - ./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${PUSH_OPTIONS} - if [ "${{matrix.subset}}" = "1" ]; then - ./scripts/zephyr_module.py --twister-out module_tests.args - if [ -s module_tests.args ]; then - ./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PUSH_OPTIONS} - fi - fi - - - if: github.event_name == 'pull_request_target' - name: Run Tests with Twister (Pull Request) - run: | - rm -f testplan.json - export ZEPHYR_BASE=${PWD} - export ZEPHYR_TOOLCHAIN_VARIANT=zephyr - python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request - ./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} --load-tests testplan.json ${TWISTER_COMMON} ${PR_OPTIONS} - if [ "${{matrix.subset}}" = "1" -a ${{needs.twister-build-prep.outputs.fullrun}} = 'True' ]; then - ./scripts/zephyr_module.py --twister-out module_tests.args - if [ -s module_tests.args ]; then - ./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PR_OPTIONS} - fi - fi - - - if: github.event_name == 'schedule' - name: Run Tests with Twister (Daily) - run: | - export ZEPHYR_BASE=${PWD} - export ZEPHYR_TOOLCHAIN_VARIANT=zephyr - ./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${DAILY_OPTIONS} - if [ "${{matrix.subset}}" = "1" ]; then - ./scripts/zephyr_module.py --twister-out module_tests.args - if [ -s module_tests.args ]; then - ./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${DAILY_OPTIONS} - fi - fi - - - name: Print ccache stats - if: always() - run: | - ccache -s -vv - - - name: Upload Unit Test Results - if: always() - uses: actions/upload-artifact@v4 - with: - name: Unit Test Results (Subset ${{ matrix.subset }}) - if-no-files-found: ignore - path: | - twister-out/twister.xml - twister-out/twister.json - module_tests/twister.xml - testplan.json - - - if: matrix.subset == 1 && github.event_name == 'push' - name: Save the list of Python packages - shell: bash - run: | - FREEZE_FILE="frozen-requirements.txt" - timestamp="$(date)" - version="$(git describe --abbrev=12 --always)" - echo -e "# Generated at $timestamp ($version)\n" > $FREEZE_FILE - pip3 freeze | tee -a $FREEZE_FILE - - - if: matrix.subset == 1 && github.event_name == 'push' - name: Upload the list of Python packages - uses: actions/upload-artifact@v4 - with: - name: Frozen PIP package set - path: | - frozen-requirements.txt - - twister-test-results: - name: "Publish Unit Tests Results" - env: - ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }} - ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443" - needs: twister-build - runs-on: ubuntu-22.04 - # the build-and-test job might be skipped, we don't need to run this job then - if: success() || failure() - - steps: - # Needed for elasticearch and upload script - - if: github.event_name == 'push' || github.event_name == 'schedule' - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - persist-credentials: false - - - name: Download Artifacts - uses: actions/download-artifact@v4 - with: - path: artifacts - - - if: github.event_name == 'push' || github.event_name == 'schedule' - name: Upload to elasticsearch - run: | - pip3 install elasticsearch - # set run date on upload to get consistent and unified data across the matrix. - run_date=`date --iso-8601=minutes` - if [ "${{github.event_name}}" = "push" ]; then - python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \ - --index zephyr-main-ci-push-1 artifacts/*/*/twister.json - elif [ "${{github.event_name}}" = "schedule" ]; then - python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \ - --index zephyr-main-ci-weekly-1 artifacts/*/*/twister.json - fi - - - name: Merge Test Results - run: | - pip3 install junitparser junit2html - junitparser merge artifacts/*/*/twister.xml junit.xml - junit2html junit.xml junit.html - - - name: Upload Unit Test Results in HTML - if: always() - uses: actions/upload-artifact@v4 - with: - name: HTML Unit Test Results - if-no-files-found: ignore - path: | - junit.html - - - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - with: - check_name: Unit Test Results - files: "**/twister.xml" - comment_mode: off - twister-status-check: - if: always() - name: "Check Twister Status" - needs: - - twister-build-prep - - twister-build - uses: ./.github/workflows/ready-to-merge.yml - with: - needs_context: ${{ toJson(needs) }} diff --git a/.github/workflows/twister_tests.yml b/.github/workflows/twister_tests.yml deleted file mode 100644 index fa6737badb8..00000000000 --- a/.github/workflows/twister_tests.yml +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (c) 2020 Intel Corporation. -# SPDX-License-Identifier: Apache-2.0 - -name: Twister TestSuite - -on: - push: - branches: - - main - - v*-branch - - collab-* - paths: - - 'scripts/pylib/**' - - 'scripts/twister' - - 'scripts/tests/twister/**' - - '.github/workflows/twister_tests.yml' - - 'scripts/schemas/twister/' - pull_request: - branches: - - main - - v*-branch - paths: - - 'scripts/pylib/**' - - 'scripts/twister' - - 'scripts/tests/twister/**' - - '.github/workflows/twister_tests.yml' - - 'scripts/schemas/twister/' - -jobs: - twister-tests: - name: Twister Unit Tests - runs-on: ${{ matrix.os }} - strategy: - matrix: - python-version: ['3.10', '3.11', '3.12'] - os: [ubuntu-22.04] - steps: - - name: checkout - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: cache-pip-linux - if: startsWith(runner.os, 'Linux') - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }} - - name: install-packages - run: | - pip3 install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt -r scripts/requirements-run-test.txt - - name: Run pytest for twisterlib - env: - ZEPHYR_BASE: ./ - ZEPHYR_TOOLCHAIN_VARIANT: zephyr - run: | - echo "Run twister tests" - PYTHONPATH=./scripts/tests pytest ./scripts/tests/twister - - name: Run pytest for pytest-twister-harness - env: - ZEPHYR_BASE: ./ - ZEPHYR_TOOLCHAIN_VARIANT: zephyr - PYTHONPATH: ./scripts/pylib/pytest-twister-harness/src:${PYTHONPATH} - run: | - echo "Run twister tests" - pytest ./scripts/pylib/pytest-twister-harness/tests diff --git a/.github/workflows/twister_tests_blackbox.yml b/.github/workflows/twister_tests_blackbox.yml deleted file mode 100644 index 8845c7eddd4..00000000000 --- a/.github/workflows/twister_tests_blackbox.yml +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright (c) 2023 Intel Corporation. -# SPDX-License-Identifier: Apache-2.0 - -name: Twister BlackBox TestSuite - -on: - pull_request: - branches: - - main - - collab-* - - v*-branch - paths: - - 'scripts/pylib/twister/**' - - 'scripts/twister' - - 'scripts/tests/twister_blackbox/**' - - '.github/workflows/twister_tests_blackbox.yml' - -jobs: - twister-tests: - name: Twister Black Box Tests - runs-on: ${{ matrix.os }} - strategy: - matrix: - python-version: ['3.10', '3.11', '3.12'] - os: [ubuntu-22.04] - container: - image: ghcr.io/zephyrproject-rtos/ci:v0.26.13 - - steps: - - name: Apply Container Owner Mismatch Workaround - run: | - # FIXME: The owner UID of the GITHUB_WORKSPACE directory may not - # match the container user UID because of the way GitHub - # Actions runner is implemented. Remove this workaround when - # GitHub comes up with a fundamental fix for this problem. - git config --global --add safe.directory ${GITHUB_WORKSPACE} - - - name: Checkout - uses: actions/checkout@v4 - - - name: Environment Setup - run: | - echo "$HOME/.local/bin" >> $GITHUB_PATH - - west init -l . || true - # we do not depend on any hals, tools or bootloader, save some time and space... - west config manifest.group-filter -- -hal,-tools,-bootloader - west config --global update.narrow true - west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject) - west forall -c 'git reset --hard HEAD' - - echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV - - - name: Set Up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Go Into Venv - shell: bash - run: | - python3 -m pip install --user virtualenv - python3 -m venv env - source env/bin/activate - echo "$(which python)" - - - name: Install Packages - run: | - python3 -m pip install -U -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt -r scripts/requirements-run-test.txt - - - name: Run Pytest For Twister Black Box Tests - shell: bash - env: - ZEPHYR_BASE: ./ - ZEPHYR_TOOLCHAIN_VARIANT: zephyr - run: | - echo "Run twister tests" - source zephyr-env.sh - PYTHONPATH="./scripts/tests" pytest ./scripts/tests/twister_blackbox diff --git a/.github/workflows/west_cmds.yml b/.github/workflows/west_cmds.yml deleted file mode 100644 index d910bf15a29..00000000000 --- a/.github/workflows/west_cmds.yml +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (c) 2020 Linaro Limited. -# SPDX-License-Identifier: Apache-2.0 - -name: Zephyr West Command Tests - -on: - push: - branches: - - main - - v*-branch - - collab-* - paths: - - 'scripts/west-commands.yml' - - 'scripts/west_commands/**' - - '.github/workflows/west_cmds.yml' - pull_request: - branches: - - main - - v*-branch - - collab-* - paths: - - 'scripts/west-commands.yml' - - 'scripts/west_commands/**' - - '.github/workflows/west_cmds.yml' - -jobs: - west-commnads: - name: West Command Tests - runs-on: ${{ matrix.os }} - strategy: - matrix: - python-version: ['3.10', '3.11', '3.12'] - os: [ubuntu-22.04, macos-14, windows-2022] - steps: - - name: checkout - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: cache-pip-linux - if: startsWith(runner.os, 'Linux') - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }} - - name: cache-pip-mac - if: startsWith(runner.os, 'macOS') - uses: actions/cache@v4 - with: - path: ~/Library/Caches/pip - # Trailing '-' was just to get a different cache name - key: ${{ runner.os }}-pip-${{ matrix.python-version }}- - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }}- - - name: cache-pip-win - if: startsWith(runner.os, 'Windows') - uses: actions/cache@v4 - with: - path: ~\AppData\Local\pip\Cache - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }} - - name: install pytest - run: | - pip3 install wheel - pip3 install pytest west pyelftools canopen natsort progress mypy intelhex psutil ply pyserial - - name: run pytest-win - if: runner.os == 'Windows' - run: | - python ./scripts/west_commands/run_tests.py - - name: run pytest-mac-linux - if: runner.os != 'Windows' - run: | - ./scripts/west_commands/run_tests.py