diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
deleted file mode 100644
index a7b26c5f7215..000000000000
--- a/.github/workflows/backport.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-name: Backport
-on:
- pull_request_target:
- types:
- - closed
- - labeled
-
-jobs:
- backport:
- runs-on: ubuntu-20.04
- name: Backport
- steps:
- - name: Backport
- uses: zephyrproject-rtos/action-backport@v1.1.99
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/cancel-previous.yml b/.github/workflows/cancel-previous.yml
deleted file mode 100644
index 6bdcb65d35d3..000000000000
--- a/.github/workflows/cancel-previous.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-name: Cancel previous workflow
-on:
- workflow_run:
- # List long running github workflows here.
- workflows: ["Documentation Build"]
- types:
- - requested
-jobs:
- cancel:
- runs-on: ubuntu-latest
- timeout-minutes: 3
- steps:
- - name: Cancel Workflow Action
- uses: styfle/cancel-workflow-action@0.11.0
- with:
- workflow_id: ${{ github.event.workflow.id }}
diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml
deleted file mode 100644
index f28bbfe2be13..000000000000
--- a/.github/workflows/compliance.yml
+++ /dev/null
@@ -1,113 +0,0 @@
-name: Compliance
-
-on: pull_request
-
-jobs:
- compliance_job:
- runs-on: ubuntu-latest
- 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@v3
- with:
- path: ncs/nrf
- ref: ${{ github.event.pull_request.head.sha }}
- fetch-depth: 0
-
- - name: cache-pip
- uses: actions/cache@v3
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}-doc-pip
-
- - name: Install python dependencies
- working-directory: ncs/nrf
- run: |
- pip3 install -U pip
- pip3 install -U setuptools
- pip3 install -U wheel
- grep -E "^python-magic|^junitparser|^lxml|^gitlint|^pylint|^pykwalify|^yamllint" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
- grep -E "^west" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
- pip3 show -f west
-
- - name: West init and update
- env:
- BASE_REF: ${{ github.base_ref }}
- working-directory: ncs/nrf
- 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 .
- west update
- west zephyr-export
-
- - name: Run CODEOWNERS test
- id: codeowners
- env:
- BASE_REF: ${{ github.base_ref }}
- working-directory: ncs/nrf
- if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
- run: |
- ./scripts/ci/codeowners.py -c origin/${BASE_REF}..
-
- - name: Run Compliance Tests
- continue-on-error: true
- id: compliance
- env:
- BASE_REF: ${{ github.base_ref }}
- working-directory: ncs/nrf
- if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
- run: |
- export ZEPHYR_BASE="$(dirname "$(pwd)")/zephyr"
- # debug
- ls -la
- git log --pretty=oneline | head -n 10
- # For now we run KconfigBasic, but we should transition to Kconfig
- $ZEPHYR_BASE/scripts/ci/check_compliance.py --annotate -e Kconfig \
- -e KconfigBasicNoModules -c origin/${BASE_REF}..
-
- - name: upload-results
- uses: actions/upload-artifact@v3
- continue-on-error: true
- if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
- with:
- name: compliance.xml
- path: ncs/nrf/compliance.xml
-
- - name: check-warns
- working-directory: ncs/nrf
- if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
- run: |
- export ZEPHYR_BASE="$(dirname "$(pwd)")/zephyr"
- if [[ ! -s "compliance.xml" ]]; then
- exit 1;
- fi
-
- files=($($ZEPHYR_BASE/scripts/ci/check_compliance.py -l))
- for file in "${files[@]}"; do
- f="${file}.txt"
- if [[ -s $f ]]; then
- errors=$(cat $f)
- errors="${errors//'%'/'%25'}"
- errors="${errors//$'\n'/'%0A'}"
- errors="${errors//$'\r'/'%0D'}"
- echo "::error file=${f}::$errors"
- exit=1
- fi
- done
-
- if [ "${exit}" == "1" ]; then
- exit 1;
- fi
diff --git a/.github/workflows/contribs.yml b/.github/workflows/contribs.yml
deleted file mode 100644
index 67dc5ed61e27..000000000000
--- a/.github/workflows/contribs.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-name: Contribs
-on:
- pull_request_target:
- types: [opened, reopened]
-
-jobs:
- contribs:
- runs-on: ubuntu-latest
- name: Contribs
- steps:
- - name: Contribs
- uses: carlescufi/action-contribs@main
- with:
- github-token: ${{ secrets.NCS_GITHUB_TOKEN }}
- command: 'external'
- messages: |
- Thank you for your contribution!
- It seems you are not a member of the nrfconnect GitHub organization. External contributions are handled as follows:
- Large contributions, affecting multiple subsystems for example, may be rejected if they are complex, may introduce regressions due to lack of test coverage, or if they are not consistent with the architecture of nRF Connect SDK.
- PRs will be run in our continuous integration (CI) test system.
- If CI passes, PRs will be tagged for review and merged on successful completion of review. You may be asked to make some modifications to your contribution during review.
- If CI fails, PRs may be rejected or may be tagged for review and rework.
- PRs that become outdated due to other changes in the repository may be rejected or rework requested.
- External contributions will be prioritized for review based on the relevance to current development efforts in nRF Connect SDK. Bug fix PRs will be prioritized.
- You may raise issues or ask for help from our Technical Support team by visiting https://devzone.nordicsemi.com/.
- |
- The author of this pull request has now been added to the nrfconnect GitHub organization.
- labels: 'external'
diff --git a/.github/workflows/create-upmerge-PRs.yml b/.github/workflows/create-upmerge-PRs.yml
deleted file mode 100644
index 206610734e56..000000000000
--- a/.github/workflows/create-upmerge-PRs.yml
+++ /dev/null
@@ -1,116 +0,0 @@
-name: Zephyr upmerge
-
-# on:
-# schedule:
-# - cron: "0 0 * * *"
-on: workflow_dispatch
-
-env:
- GH_TOKEN: ${{ secrets.NCS_GITHUB_UPMERGE_TOKEN }}
- ZEPHYR_UPSTREAM: https://github.com/zephyrproject-rtos/zephyr
- MCUBOOT_UPSTREAM: https://github.com/zephyrproject-rtos/mcuboot
- PR_TARGET_BRANCH: upmerge-tmp
-
-jobs:
- auto-upmerge-create-PRs:
- if: github.repository == 'nrfconnect/sdk-nrf'
- runs-on: ubuntu-latest
- steps:
- - name: Checkout the code
- uses: actions/checkout@v3
- with:
- path: ncs/nrf
- fetch-depth: 0
-
- - name: Install base dependencies
- working-directory: ncs
- run: |
- pip3 install -r nrf/scripts/requirements-base.txt
- pip3 install -r nrf/scripts/requirements-extra.txt
-
- - name: West init and update
- working-directory: ncs
- run: |
- west init -l nrf
- west update zephyr bsim mcuboot
- git config --global user.email "noreply@nordicsemi.no"
- git config --global user.name "Nordic Builder"
- echo "SDK_ZEPHYR=$(west list zephyr -f {url} | awk -F// '{print $NF}')" >> $GITHUB_ENV
- echo "SDK_MCUBOOT=$(west list mcuboot -f {url} | awk -F// '{print $NF}')" >> $GITHUB_ENV
-
- - name: Try closing existing auto-upmerge PRs
- run: |
- SDK_ZEPHYR_PR=$(gh pr list --repo $SDK_ZEPHYR --label "auto-upmerge" --json number --jq .[0].number)
- gh pr close $SDK_ZEPHYR_PR --repo $SDK_ZEPHYR | true
- SDK_MCUBOOT_PR=$(gh pr list --repo $SDK_MCUBOOT --label "auto-upmerge" --json number --jq .[0].number)
- gh pr close $SDK_MCUBOOT_PR --repo $SDK_MCUBOOT | true
- SDK_NRF_PR=$(gh pr list --repo $GITHUB_SERVER_URL/$GITHUB_REPOSITORY --label "auto-upmerge" --json number --jq .[0].number)
- gh pr close $SDK_NRF_PR --repo $GITHUB_SERVER_URL/$GITHUB_REPOSITORY | true
-
- - name: Run ncs-upmerge and create sdk-zephyr upmerge PR
- working-directory: ncs/zephyr
- run: |
- git remote add -f upstream $ZEPHYR_UPSTREAM && git remote add -f origin https://nordicbuilder:${{secrets.NCS_GITHUB_UPMERGE_TOKEN}}@$SDK_ZEPHYR
- git checkout -b upmerge_local
- west ncs-upmerger zephyr
- git push origin upmerge_local:auto-upmerge/$GITHUB_RUN_ID -u
- MCUBOOT_UPSTREAM_REV=$(cat west.yml | awk -e '/- name: mcuboot/,/path: bootloader\/mcuboot/ { if ($0 ~ "revision:.*") { print $2; }; }')
-
- UPSTREAMHASH=$(git rev-parse --short upstream/main)
- ZEPHYR_PR_URL=$(gh pr create --base $PR_TARGET_BRANCH --title "[nrf mergeup] Merge upstream automatically up to commit $UPSTREAMHASH" --body "Automatic upmerge action" --repo $SDK_ZEPHYR --label "auto-upmerge")
- echo "ZEPHYR_PR_URL=$ZEPHYR_PR_URL" >> $GITHUB_ENV
- echo "Created PR: $ZEPHYR_PR_URL"
- echo "MCUboot revision used by upstream: ${MCUBOOT_UPSTREAM_REV}"
- echo "MCUBOOT_UPSTREAM_REV=${MCUBOOT_UPSTREAM_REV}" >> $GITHUB_ENV
-
- - name: Run ncs-upmerge and create sdk-mcuboot upmerge PR
- working-directory: ncs/bootloader/mcuboot
- run: |
- git remote add -f upstream $MCUBOOT_UPSTREAM && git remote add -f origin https://nordicbuilder:${{secrets.NCS_GITHUB_UPMERGE_TOKEN}}@$SDK_MCUBOOT
- git checkout -b upmerge_local
- west ncs-upmerger mcuboot
- git push origin upmerge_local:auto-upmerge/$GITHUB_RUN_ID -u
-
- UPSTREAMHASH=${MCUBOOT_UPSTREAM_REV}
- MCUBOOT_PR_URL=$(gh pr create --base $PR_TARGET_BRANCH --title "[nrf mergeup] Merge upstream automatically up to commit $UPSTREAMHASH" --body "Automatic upmerge action" --repo $SDK_MCUBOOT --label "auto-upmerge")
- echo "MCUBOOT_PR_URL=$MCUBOOT_PR_URL" >> $GITHUB_ENV
- echo "Created PR: $MCUBOOT_PR_URL"
-
-
- - name: create sdk-nrf PR with updated west.yml
- working-directory: ncs/nrf
- run: |
- NEW_REV=$(echo "pull/$(basename $ZEPHYR_PR_URL)/head" | sed 's/\//\\\//g')
- NEW_MCUBOOT_REV=$(echo "pull/$(basename $MCUBOOT_PR_URL)/head" | sed 's/\//\\\//g')
- OLD_REV=$(west list zephyr -f {revision})
- OLD_MCUBOOT_REV=$(west list mcuboot -f {revision})
- git checkout -b upmerge_local
- sed -i "s/revision: $OLD_REV/revision: $NEW_REV/" west.yml
- sed -i "s/revision: $OLD_MCUBOOT_REV/revision: $NEW_MCUBOOT_REV/" west.yml
- git commit -a -m "manifest: Update sdk-zephyr revision (automatic Zephyr upmerge)" -m "Automatically created by Github Action" --signoff
- git push origin upmerge_local:auto-upmerge/$GITHUB_RUN_ID -u
- gh pr create --base $PR_TARGET_BRANCH --title "manifest: Update revisions of upmerged projects (automatic upmerge)" --body "Automatic upmerge action" --label "CI-all-test" --label "auto-upmerge"
-
- failure-notifier:
- runs-on: ubuntu-latest
- if: failure()
- needs: auto-upmerge-create-PRs
- env:
- MESSAGE: "Zephyr auto-upmerge workflow has failed.
Please check action output for details: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
- steps:
- - name: Add summary (steps to reproduce)
- run: |
- echo "### :boom:Automatic zephyr upmerge action has failed :boom:" >> $GITHUB_STEP_SUMMARY
- echo "#### In case of e.g. merge conflict you can reproduce it locally with the following steps:" >> $GITHUB_STEP_SUMMARY
- echo "\`\`\`sh" >> $GITHUB_STEP_SUMMARY
- echo "west init -l nrf" >> $GITHUB_STEP_SUMMARY
- echo "west update zephyr" >> $GITHUB_STEP_SUMMARY
- echo "cd zephyr" >> $GITHUB_STEP_SUMMARY
- echo "git remote add -f upstream https://github.com/zephyrproject-rtos/zephyr" >> $GITHUB_STEP_SUMMARY
- echo "west ncs-upmerger zephyr" >> $GITHUB_STEP_SUMMARY
- echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
- echo "Solve merge-conflict locally and submit sdk-zephyr and sdk-nrf PRs" >> $GITHUB_STEP_SUMMARY
-
- - name: Send MS Teams notification
- run: |
- curl -s ${{ secrets.CONNECTOR_TEAMS_NCS_UPMERGE }} -X POST -H 'Content-type: application/json' --data '{"text": "'"$MESSAGE"'"}'
diff --git a/.github/workflows/dnm.yml b/.github/workflows/dnm.yml
deleted file mode 100644
index 783229b65252..000000000000
--- a/.github/workflows/dnm.yml
+++ /dev/null
@@ -1,17 +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') }}
- name: Prevent Merging
- runs-on: ubuntu-latest
- steps:
- - name: Check for label
- run: |
- echo "Pull request is labeled as 'DNM'"
- echo "This workflow fails so that the pull request cannot be merged"
- exit 1
diff --git a/.github/workflows/docbuild.yml b/.github/workflows/docbuild.yml
deleted file mode 100644
index 6f453075c43a..000000000000
--- a/.github/workflows/docbuild.yml
+++ /dev/null
@@ -1,115 +0,0 @@
-name: Documentation Build
-
-on:
- pull_request:
- types: [opened, synchronize, reopened]
- branches:
- - main
- - 'v*-branch'
- paths:
- - '.github/workflows/docbuild.yml'
- - '**.rst'
- - '**/Kconfig'
- - '**/sample.yaml'
- - 'doc/**'
- - 'include/**'
- - 'doc/requirements.txt'
- - 'scripts/tools-versions-*.yml'
- - 'west.yml'
- push:
- branches:
- - main
- - 'v*-branch'
- tags:
- - v*
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout the code
- uses: actions/checkout@v3
- with:
- path: ncs/nrf
- fetch-depth: 0
- - name: cache-pip
- uses: actions/cache@v3
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}-doc-pip
- - name: Install packages
- run: |
- sudo apt update
- sudo apt-get install -y ninja-build mscgen plantuml
- sudo snap install yq
- DOXYGEN_VERSION=$(yq ".doxygen.version" ./ncs/nrf/scripts/tools-versions-linux.yml)
- wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
- tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
- echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
-
- - name: Install Python dependencies
- working-directory: ncs
- run: |
- sudo pip3 install -U setuptools wheel pip
- pip3 install -r nrf/doc/requirements.txt
-
- - name: West init and update
- working-directory: ncs
- run: |
- west init -l nrf
- west update
- west zephyr-export
-
- - name: Build documentation
- working-directory: ncs/nrf
- run: |
- cmake -GNinja -Bdoc/_build -Sdoc
- ninja -C doc/_build
-
- - name: Prepare archive
- if: ${{ !contains(github.event.pull_request.labels.*.name, 'external') || contains(github.event.pull_request.labels.*.name, 'CI-trusted-author') }}
- working-directory: ncs/nrf
- run: |
- MONITOR="monitor_${{ github.run_id }}.txt"
- ARCHIVE="doc_build_${{ github.run_id }}.zip"
-
- # Create documentation upload files
- if [[ "${{ github.event_name }}" == "pull_request" ]]; then
- echo "publish2 dev PR-${{ github.event.number }} ${ARCHIVE}" > "${MONITOR}"
- echo "${{ github.event.number }}" > pr.txt
- else
- VERSION_REGEX="^v([0-9a-z\.\-]+)$"
- if [[ ${GITHUB_REF#refs/tags/} =~ $VERSION_REGEX ]]; then
- VERSION=${BASH_REMATCH[1]}
- elif [[ ${GITHUB_REF#refs/heads/} == "main" ]]; then
- VERSION="latest"
- else
- echo "Not a release or latest, skipping publish"
- exit 0
- fi
- echo "publish2 main ${VERSION} ${ARCHIVE}" > "${MONITOR}"
- fi
-
- # add zoomin metadata
- cp doc/custom.properties doc/_build/html
- sed -i 's/__VERSION__/'"${VERSION}"'/g' doc/_build/html/custom.properties
-
- # add zoomin tags file
- cp doc/tags.yml doc/_build/html
- sed -i 's/__VERSION__/'"${VERSION}"'/g' doc/_build/html/tags.yml
-
- # compress
- cd doc/_build/html
- zip -rq "${ARCHIVE}" .
- mv "${ARCHIVE}" ../../../
-
- - name: Store
- if: ${{ !contains(github.event.pull_request.labels.*.name, 'external') || contains(github.event.pull_request.labels.*.name, 'CI-trusted-author') }}
- uses: actions/upload-artifact@v3
- with:
- name: docs
- path: |
- ncs/nrf/*.zip
- ncs/nrf/monitor*.txt
- ncs/nrf/pr.txt
diff --git a/.github/workflows/docpublish.yml b/.github/workflows/docpublish.yml
deleted file mode 100644
index a0301ee53131..000000000000
--- a/.github/workflows/docpublish.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-name: Documentation Publish
-
-on:
- workflow_run:
- workflows: ["Documentation Build"]
- types:
- - completed
-
-jobs:
- build:
- runs-on: ubuntu-latest
- if: ${{ github.event.workflow_run.conclusion == 'success' }}
- steps:
- - name: Download artifacts
- uses: dawidd6/action-download-artifact@v2
- with:
- workflow: docbuild.yml
- run_id: ${{ github.event.workflow_run.id }}
-
- - name: Install dependencies
- run: |
- sudo apt install -y sshpass
-
- - name: Upload documentation
- env:
- SSHUSER: ${{ secrets.NCS_TRANSFER_DOC_USR }}
- SSHPASS: ${{ secrets.NCS_TRANSFER_DOC_PWD }}
- run: |
- # trust server
- mkdir -p ~/.ssh && \
- ssh-keyscan -p 2222 transfer.nordicsemi.no >> ~/.ssh/known_hosts
- # upload files
- for file in docs/*.zip docs/monitor*.txt; do
- echo "put ${file}" | \
- sshpass -e sftp -P 2222 -o BatchMode=no -b - $SSHUSER@transfer.nordicsemi.no
- done
-
- - name: Upload Zoomin documentation
- run: |
- for file in docs/monitor*.txt; do
- if ! grep -q main ${file}; then
- echo "Not targeting main, skipping Zoomin upload"
- exit 0
- fi
- done
-
- # trust server
- mkdir -p ~/.ssh
- ssh-keyscan upload-v1.zoominsoftware.io >> ~/.ssh/known_hosts
-
- # prepare key
- echo "${{ secrets.NCS_ZOOMIN_KEY }}" | base64 -d > zoomin_key
- chmod 600 zoomin_key
-
- # upload files
- for file in docs/*.zip; do
- sftp -v -i zoomin_key nordic@upload-v1.zoominsoftware.io < monitor_${GITHUB_RUN_ID}.txt
- # trust server
- mkdir -p ~/.ssh && \
- ssh-keyscan -p 2222 transfer.nordicsemi.no >> ~/.ssh/known_hosts
- # upload request file
- echo "put monitor_${GITHUB_RUN_ID}.txt" | \
- sshpass -e sftp -P 2222 -o BatchMode=no -b - $SSHUSER@transfer.nordicsemi.no
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
deleted file mode 100644
index 7e7a0e0913dd..000000000000
--- a/.github/workflows/labeler.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-name: 'Pull Request Labeler'
-on:
- - pull_request_target
-
-jobs:
- triage:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/labeler@v3.0.0
- with:
- repo-token: '${{ secrets.GITHUB_TOKEN }}'
diff --git a/.github/workflows/license-reusable.yml b/.github/workflows/license-reusable.yml
deleted file mode 100644
index 9ee3c87412e8..000000000000
--- a/.github/workflows/license-reusable.yml
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# You can call this workflow in your repository. See the example caller workflow:
-#
-# --------------------------------------------------------------------------------------
-# name: My License Check Caller
-# on: pull_request
-# jobs:
-# call-workflow:
-# uses: nrfconnect/sdk-nrf/.github/workflows/license-reusable.yml@main
-# with:
-# path: my_module_path
-# license_allow_list: my_module_path/license_allow_list.yaml
-# # You can find more details about the inputs below.
-# --------------------------------------------------------------------------------------
-
-name: Reusable License Check
-
-on:
- workflow_call:
- inputs:
-
- path:
- # Required path to your module relative to west workspace.
- type: string
- required: true
-
- license_allow_list:
- # Optional path to your custom license allow list file relative to west workspace.
- # By default, the list form the "sdk-nrf" repository is used. For details about
- # format of the list, see "scripts/ci/license_allow_list.yaml" in the
- # "sdk-nrf" repository.
- type: string
- default: nrf/scripts/ci/license_allow_list.yaml
-
- nrf_repo:
- # Optional URL of the custom "sdk-nrf" repository that contains license check
- # script and the west manifest. By default official "sdk-nrf" repository is used.
- type: string
- default: https://github.com/nrfconnect/sdk-nrf
-
- nrf_rev:
- # Optional revision of the "sdk-nrf" repository. By default, "main" is used.
- type: string
- default: main
-
-jobs:
- license_job:
- runs-on: ubuntu-latest
- name: Run license checks on patch series (PR)
- steps:
- - name: Checkout the code
- uses: actions/checkout@v3
- with:
- path: ncs/${{ inputs.path }}
- ref: ${{ github.event.pull_request.head.sha }}
- fetch-depth: 0
-
- - name: cache-pip
- uses: actions/cache@v1
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}-doc-pip
-
- - name: Install python dependencies
- run: |
- pip3 install -U pip
- pip3 install -U setuptools
- export PATH="$HOME/.local/bin:$PATH"
- pip3 install -U wheel
- pip3 install --user -U west
- pip3 show -f west
-
- - name: Git config and rebase
- env:
- BASE_REF: ${{ github.base_ref }}
- working-directory: ncs/${{ inputs.path }}
- run: |
- git config --global user.email "you@example.com"
- git config --global user.name "Your Name"
- git remote -v
- git branch
- git rebase origin/${BASE_REF}
- # debug
- git log --pretty=oneline | head -n 10
-
- - name: West init and update
- working-directory: ncs
- env:
- PR_REF: ${{ github.event.pull_request.head.sha }}
- run: |
- export PATH="$HOME/.local/bin:$PATH"
- export PATH="$HOME/bin:$PATH"
- if [ "${{ inputs.path }}" = "nrf" ]; then
- west init -l nrf
- else
- west init -m ${{ inputs.nrf_repo }} --mr ${{ inputs.nrf_rev }}
- fi
- west update -n zephyr bsim
- west zephyr-export
- echo "ZEPHYR_BASE=$(pwd)/zephyr" >> $GITHUB_ENV
- # debug
- ( cd ${{ inputs.path }}; echo "${{ inputs.path }}"; git log --pretty=oneline --max-count=10 )
- ( cd nrf; echo "nrf"; git log --pretty=oneline --max-count=10 )
- ( cd zephyr; echo "zephyr"; git log --pretty=oneline --max-count=10 )
-
- - name: Install license check script dependencies
- run: |
- pip3 install -U -r ncs/nrf/scripts/ci/requirements.txt
-
- - name: Run license checks
- id: license_checks
- env:
- BASE_REF: ${{ github.base_ref }}
- ZEPHYR_BASE: ${{ env.ZEPHYR_BASE }}
- working-directory: ncs/${{ inputs.path }}
- if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
- run: |
- export PATH="$HOME/.local/bin:$PATH"
- export PATH="$HOME/bin:$PATH"
- ${ZEPHYR_BASE}/../nrf/scripts/ci/check_license.py \
- --github \
- -l ${ZEPHYR_BASE}/../${{ inputs.license_allow_list }} \
- -c origin/${BASE_REF}..
-
- - name: Upload results
- uses: actions/upload-artifact@v3
- continue-on-error: true
- if: always() && contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
- with:
- name: licenses.xml
- path: ncs/${{ inputs.path }}/licenses.xml
diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml
deleted file mode 100644
index 2c0a3ca64078..000000000000
--- a/.github/workflows/license.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-name: License Check
-
-on: pull_request
-
-jobs:
- call-workflow:
- uses: ./.github/workflows/license-reusable.yml
- with:
- path: nrf
diff --git a/.github/workflows/manifest.yml b/.github/workflows/manifest.yml
deleted file mode 100644
index 89442864c08c..000000000000
--- a/.github/workflows/manifest.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-name: Manifest
-
-on:
- pull_request_target:
-
-permissions:
- contents: read
- pull-requests: write
-
-jobs:
- contribs:
- runs-on: ubuntu-latest
- name: Manifest
- steps:
- - name: Checkout the code
- uses: actions/checkout@v3
- with:
- path: ncs/nrf
- ref: ${{ github.event.pull_request.head.sha }}
- fetch-depth: 0
-
- - name: Manifest
- uses: zephyrproject-rtos/action-manifest@16c4cfa380ae2b6fa3daddb1a35032e69422a20f
- with:
- github-token: ${{ secrets.NCS_GITHUB_TOKEN }}
- manifest-path: 'west.yml'
- checkout-path: 'ncs/nrf'
- label-prefix: 'manifest-'
- verbosity-level: '1'
-
- # Add one label per line. 'manifest' always adds the label 'manifest'.
- # 'CI-all-test:zephyr;nrfxlib,' adds the 'CI-all-test' label when the
- # zephyr module or the nrfxlib module is changed. Each line is comma-
- # separated.
- labels: >
- manifest
- dnm-labels: 'DNM'
diff --git a/.github/workflows/oss-history.yml b/.github/workflows/oss-history.yml
deleted file mode 100644
index 884bd1b1ca8b..000000000000
--- a/.github/workflows/oss-history.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-name: OSS history check
-on: pull_request
-
-jobs:
- contribs:
- runs-on: ubuntu-latest
- name: Check OSS history
- steps:
- - name: Checkout the code
- uses: actions/checkout@v3
- with:
- path: ncs/nrf
- fetch-depth: 0
-
- - name: Install extra python dependencies
- run: |
- pip3 install west
- pip3 install -r ncs/nrf/scripts/requirements-extra.txt
-
- - name: Set up the workspace
- run: |
- west init -l ncs/nrf
- cd ncs
- west update
- git -C zephyr remote add upstream https://github.com/zephyrproject-rtos/zephyr
-
- - name: Check manifest userdata
- working-directory: ncs/nrf
- run: |
- python3 scripts/ci/check_manifest_userdata.py
-
- - name: Check OSS history
- uses: nrfconnect/action-oss-history@main
- with:
- workspace: 'ncs'
- args: -p zephyr -p mcuboot -p trusted-firmware-m -p hostap -p wfa-qt-control-app
diff --git a/.github/workflows/pip-requirements.yml b/.github/workflows/pip-requirements.yml
deleted file mode 100644
index 14982f54fac7..000000000000
--- a/.github/workflows/pip-requirements.yml
+++ /dev/null
@@ -1,109 +0,0 @@
-name: Validate pip requirements-fixed.txt
-
-on:
- pull_request_target:
- types: [opened, synchronize, reopened]
- branches:
- - main
- - 'v*-branch'
- paths:
- - 'scripts/requirements*.txt'
-
-env:
- REACT_EMOTE: 'eyes'
-
-jobs:
- check-requirements:
- runs-on: ubuntu-20.04
- steps:
- - name: Checkout PR target branch
- uses: actions/checkout@v4
- with:
- token: ${{ secrets.NCS_GITHUB_TOKEN }}
- path: ncs/nrf
- fetch-depth: 1
- persist-credentials: false
-
- - name: Switch to PR source branch
- working-directory: ncs/nrf
- env:
- GITHUB_TOKEN: ${{ secrets.NCS_GITHUB_TOKEN }}
- run: gh pr checkout ${{ github.event.pull_request.number }}
-
- - name: Get python version
- id: pyv
- run: |
- sudo snap install --channel=v4 yq
- PYTHON_VERSION=$(yq '.python.version' ./ncs/nrf/scripts/tools-versions-linux.yml)
- echo "python_version=$PYTHON_VERSION" >> $GITHUB_OUTPUT
-
- - name: Setup python version
- uses: actions/setup-python@v4
- with:
- python-version: '${{ steps.pyv.outputs.python_version }}'
-
- - name: Setup environment
- working-directory: ncs
- run: |
- pip3 install --user -U setuptools wheel pip virtualenv virtualenvwrapper west
- west init -l nrf
- west update --narrow mcuboot zephyr
-
- - name: Execute script diff action
- uses: nordicbuilder/action-script-diff@v0.2
- with:
- github-token: ${{ secrets.NCS_GITHUB_TOKEN }}
- message_diff: |
- This pr introduces changes to requirements files.
- The compiled requirements-fixed.txt has changed.
- To automatically add the changed file to this pr react with the :$REACT_EMOTE: emote to this comment and re-run the check.
- [Check Run]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)
-
- requirements-fixed.txt diff
-
- \`\`\` diff
- $GITDIFF
- \`\`\`
-
- message_success: |
- The changes to the 'requirements-fixed.txt' have been added to this PR.
- All further changes to any of the requirements file will automatically be applied as long an :$REACT_EMOTE: is present.
- git_diff_root: ncs/nrf
- diff_path: scripts
- diff_file: requirements-fixed.txt
- reaction_emote: "${{ env.REACT_EMOTE }}"
- git_user_name: "Nordic Builder"
- git_user_email: "pylon@nordicsemi.no"
- script_call: |
- OUT_FILE="nrf/scripts/requirements-fixed.txt"
- echo "Writing frozen requirements to: $OUT_FILE"
- echo "Log python version: $(python --version)"
-
- TOPDIR=$(west topdir)
- cd $TOPDIR
-
- source ~/.local/bin/virtualenvwrapper.sh
- [[ $? != 0 ]] && echo "error sourcing virtualenvwrapper" && exit 1
-
- rmvirtualenv pip-fixed-venv > /dev/null 2>&1
- # We need to force the result of the following command.
- # For no aparent reason it returns 1 with the same output as local.
- mkvirtualenv pip-fixed-venv > /dev/null 2>&1 || true
- workon pip-fixed-venv > /dev/null 2>&1
- pip3 install pip-tools > /dev/null 2>&1
- pip3 install setuptools --upgrade
-
- pip-compile \
- --build-isolation \
- --strip-extras \
- --annotation-style line \
- --allow-unsafe \
- --output-file $OUT_FILE \
- bootloader/mcuboot/scripts/requirements.txt \
- zephyr/scripts/requirements.txt \
- nrf/scripts/requirements.txt \
- nrf/scripts/requirements-ci.txt \
- nrf/scripts/requirements-extra.txt
-
- deactivate
- rmvirtualenv pip-fixed-venv
diff --git a/.github/workflows/reapply-ci-trusted-author.yml b/.github/workflows/reapply-ci-trusted-author.yml
deleted file mode 100644
index db2e13bb41ea..000000000000
--- a/.github/workflows/reapply-ci-trusted-author.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: Reapply CI-trusted-author label
-
-on:
- pull_request_target:
- types: [opened, reopened, synchronize]
-
-jobs:
- remove_label:
- if: ${{ contains(github.event.*.labels.*.name, 'CI-trusted-author') }}
- runs-on: ubuntu-latest
- name: Remove label
- steps:
- - name: Remove CI-trusted-author label
- uses: buildsville/add-remove-label@v2.0.0
- with:
- token: '${{ secrets.GITHUB_TOKEN }}'
- labels: CI-trusted-author
- type: remove
- - name: Add CI-trusted-author label
- uses: buildsville/add-remove-label@v2.0.0
- with:
- token: '${{ secrets.GITHUB_TOKEN }}'
- labels: CI-trusted-author
- type: add
diff --git a/.github/workflows/remove-ci-requested.yml b/.github/workflows/remove-ci-requested.yml
deleted file mode 100644
index a2f4a285d9c3..000000000000
--- a/.github/workflows/remove-ci-requested.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-name: Remove CI requested label
-
-on:
- pull_request_target:
- types: [opened, reopened, synchronize]
-
-jobs:
- remove_label:
- runs-on: ubuntu-latest
- name: Remove label
- steps:
- - name: removelabel
- uses: buildsville/add-remove-label@v2.0.0
- with:
- token: '${{ secrets.GITHUB_TOKEN }}'
- labels: CI-Requested
- type: remove
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
deleted file mode 100644
index 5eb7352ddff2..000000000000
--- a/.github/workflows/stale.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: "Close stale pull requests/issues"
-on:
- schedule:
- - cron: "16 00 * * *"
-
-jobs:
- stale:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/stale@v3
- with:
- repo-token: ${{ secrets.GITHUB_TOKEN }}
- 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: 'DNM,In progress,RFC'
- exempt-issue-labels: 'In progress,Enhancement,Feature,Feature Request,RFC,Meta'
diff --git a/.github/workflows/uploadv4.yml b/.github/workflows/uploadv4.yml
new file mode 100644
index 000000000000..3250f124a9b1
--- /dev/null
+++ b/.github/workflows/uploadv4.yml
@@ -0,0 +1,25 @@
+name: Upload Artifact Example
+
+on:
+ pull_request:
+ branches:
+ - 'v*-branch'
+ push:
+ branches:
+ - 'v*-branch'
+
+jobs:
+ upload-artifact:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Create directories and file to upload
+ run: |
+ mkdir -p playground/buran
+ echo "Hello, World!" > playground/buran/artifact.txt
+
+ - name: Upload artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: my-artifact
+ path: playground/buran/artifact.txt
+ overwrite: true
diff --git a/.github/workflows/west-commands.yml b/.github/workflows/west-commands.yml
deleted file mode 100644
index 0eb54f61bac5..000000000000
--- a/.github/workflows/west-commands.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-name: NCS west commands
-
-on:
- pull_request:
- branches: [main]
- paths:
- - scripts/west_commands/mypy.ini
- - scripts/west_commands/ncs_commands.py
- - scripts/west_commands/ncs_west_helpers.py
- - scripts/west_commands/pygit2_helpers.py
-
-jobs:
- west_commands_job:
- runs-on: ubuntu-latest
- name: Run Python checks for west commands on patch series (PR)
- steps:
- - name: Checkout the code
- uses: actions/checkout@v3
- with:
- path: ncs/nrf
- ref: ${{ github.event.pull_request.head.sha }}
- fetch-depth: 0
- - name: cache-pip
- uses: actions/cache@v3
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}-doc-pip
- - name: Install python dependencies
- working-directory: ncs/nrf
- run: |
- pip3 install -U pip
- pip3 install -U setuptools
- pip3 install -U wheel
- pip3 install -U mypy types-colorama types-editdistance types-PyYAML
- grep -E "west" scripts/requirements-fixed.txt | xargs pip3 install -U
- pip3 show -f west
- - name: Run mypy
- working-directory: ncs/nrf/scripts/west_commands
- run: |
- python3 -m mypy --config-file mypy.ini ncs_west_helpers.py pygit2_helpers.py ncs_commands.py