Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: a change #262

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Backport
on:
pull_request_target:
types:



- closed
- labeled
branches:
Expand Down
102 changes: 20 additions & 82 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,97 +11,35 @@ jobs:
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Checkout sources
uses: nrfconnect/action-checkout-west-update@main
- name: Checkout the code
uses: actions/checkout@v4
with:
git-fetch-depth: 0
git-ref: ${{ github.event.pull_request.head.sha }}

- 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
path: ncs/nrf
#ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false

- name: Run merge commits test
env:
BASE_REF: ${{ github.base_ref }}
BASE_REV: ${{ github.event.pull_request.base.sha }}
HEAD_REV: ${{ github.event.pull_request.head.sha }}
working-directory: ncs/nrf
run: |
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 rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \
#(echo "::error ::Merge commits not allowed, rebase instead";false)

git rebase origin/${BASE_REF}
#git rebase origin/${BASE_REF}
# debug
echo "base.sha: ${BASE_REV}"
echo "head.sha: ${HEAD_REV}"
echo "Branches:"
git branch -v
echo "Current branch:"
git branch --show-current
echo "Git log:"
git log --pretty=oneline | head -n 10

- 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
git show HEAD
git rev-parse HEAD^1
1 change: 1 addition & 0 deletions .github/workflows/contribs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Contribs

on:
pull_request_target:
types: [opened, reopened]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dnm.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Do Not Merge


on:
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Build and Push Docker Image


on:
push:
tags:
Expand Down
29 changes: 10 additions & 19 deletions .github/workflows/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Manifest

on:
pull_request_target:
on: pull_request

permissions:
contents: read
Expand All @@ -19,20 +18,12 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false

- 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'

- name: Scripts
env:
BASE_REF: ${{ github.base_ref }}
working-directory: ncs/nrf
run: |
git remote -v
echo "Git log:"
git log --pretty=oneline | head -n 10
Loading