Skip to content
Closed

dummy #327

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
2 changes: 1 addition & 1 deletion .github/workflows/clang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
clang-build:
if: github.repository_owner == 'zephyrproject-rtos'
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
group: test-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.27.4.20241026
options: '--entrypoint /bin/bash'
Expand Down
101 changes: 31 additions & 70 deletions .github/workflows/twister-prep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,21 @@ on:
outputs:
subset:
description: subset
value: ${{ jobs.prep_push.outputs.subset != '' && jobs.prep_push.outputs.subset || jobs.prep_pr.outputs.subset }}
value: ${{ jobs.prep.outputs.subset }}
size:
description: size
value: ${{ jobs.prep_push.outputs.size != '' && jobs.prep_push.outputs.size || jobs.prep_pr.outputs.size }}
value: ${{ jobs.prep.outputs.size }}
fullrun:
description: fullrun
value: ${{ jobs.prep_push.outputs.fullrun != '' && jobs.prep_push.outputs.fullrun || jobs.prep_pr.outputs.size }}
value: ${{ jobs.prep.outputs.fullrun }}

permissions:
contents: read

jobs:
prep_pr:
if: github.repository_owner == 'zephyrproject-rtos' && github.event_name == 'pull_request'
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.27.4.20241026
options: '--entrypoint /bin/bash'
prep:
if: github.repository_owner == 'zephyrproject-rtos'
runs-on: ubuntu-24.04
outputs:
subset: ${{ steps.output-services.outputs.subset }}
size: ${{ steps.output-services.outputs.size }}
Expand All @@ -38,34 +34,29 @@ jobs:
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
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'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false

- name: Set up Python
if: github.event_name == 'pull_request'
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: 3.12
cache: pip
cache-dependency-path: scripts/requirements-actions.txt

- name: install-packages
if: github.event_name == 'pull_request'
run: |
pip install -r scripts/requirements-actions.txt --require-hashes

- name: Environment Setup
if: github.event_name == 'pull_request'
run: |
git config --global user.email "[email protected]"
git config --global user.name "Zephyr Bot"
Expand All @@ -75,14 +66,14 @@ jobs:
git clean -f -d
git log --pretty=oneline | head -n 10
west init -l . || true
west config manifest.group-filter -- +ci,+optional
west config manifest.group-filter -- +ci,+optional,-hal
west config manifest.project-filter -- -nrf_hw_models
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'
id: test-plan
run: |
export ZEPHYR_BASE=${PWD}
Expand All @@ -95,49 +86,19 @@ jobs:
fi
rm -f testplan.json .testplan

- name: Determine matrix size
id: output-services
run: |
if [ -n "${TWISTER_NODES}" ]; then
subset="[$(seq -s',' 1 ${TWISTER_NODES})]"
else
subset="[$(seq -s',' 1 ${MATRIX_SIZE})]"
fi
size=${TWISTER_NODES}

echo "subset=${subset}" >> $GITHUB_OUTPUT
echo "size=${size}" >> $GITHUB_OUTPUT
echo "fullrun=${TWISTER_FULL}" >> $GITHUB_OUTPUT

prep_push:
if: github.repository_owner == 'zephyrproject-rtos' && (github.event_name == 'push' || github.event_name == 'schedule')
runs-on: ubuntu-22.04
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
WEEKLY_MATRIX_SIZE: 200
BSIM_OUT_PATH: /opt/bsim/
BSIM_COMPONENTS_PATH: /opt/bsim/components
TESTS_PER_BUILDER: 900
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: Determine matrix size
id: output-services
run: |
if [ "${{github.event_name}}" = "push" ]; then
subset="[$(seq -s',' 1 ${PUSH_MATRIX_SIZE})]"
size=${MATRIX_SIZE}
elif [ "${{github.event_name}}" = "pull_request" ]; 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}}" = "schedule" -a "${{github.repository}}" = "zephyrproject-rtos/zephyr" ]; then
subset="[$(seq -s',' 1 ${WEEKLY_MATRIX_SIZE})]"
size=${WEEKLY_MATRIX_SIZE}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/twister.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

twister-build:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
group: test-runner-v2-linux-x64-4xlarge
needs: twister-build-prep
if: needs.twister-build-prep.outputs.size != 0
container:
Expand Down
1 change: 1 addition & 0 deletions kernel/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/


/**
* @file
* @brief Kernel initialization module
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/test_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def process(self):

def get_plan(self, options, integration=False, use_testsuite_root=True):
fname = "_test_plan_partial.json"
cmd = [f"{zephyr_base}/scripts/twister", "-c"] + options + ["--save-tests", fname ]
cmd = [f"{zephyr_base}/scripts/twister", "-c", "--force-toolchain-variant", "zephyr"] + options + ["--save-tests", fname ]
if not self.detailed_test_id:
cmd += ["--no-detailed-test-id"]
if self.testsuite_root and use_testsuite_root:
Expand Down
10 changes: 9 additions & 1 deletion scripts/pylib/twister/twisterlib/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,11 @@ def add_parse_arguments(parser = None) -> argparse.ArgumentParser:
help="Do not filter based on toolchain, use the set "
" toolchain unconditionally")

parser.add_argument("--force-toolchain-variant",
help="Use provided toolchain variant and do not attempt to auto-detect "
"the toolchain using cmake. Useful when creating test plans "
"without the need for the Zephyr SDK to be installed.")

footprint_group.add_argument(
"--create-rom-ram-report",
action="store_true",
Expand Down Expand Up @@ -1106,7 +1111,10 @@ def non_default_options(self) -> dict:

def discover(self):
self.check_zephyr_version()
self.get_toolchain()
if self.options.force_toolchain_variant:
self.toolchain = self.options.force_toolchain_variant
else:
self.get_toolchain()
self.run_date = datetime.now(timezone.utc).isoformat(timespec='seconds')

def check_zephyr_version(self):
Expand Down
41 changes: 41 additions & 0 deletions scripts/requirements-actions.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# zephyr-keep-sorted-start
anytree
awscli
canopen
clang-format>=15.0.0
elasticsearch
exceptiongroup>=1.0.0rc8
gcovr
gitlint>=0.19.1
gitpython>=3.1.41
ijson
intelhex
junit2html
junitparser>=2
lxml>=5.3.0
mock
mypy
natsort
ply>=3.10
progress
psutil>=5.6.6
pyelftools>=0.29
pygithub
pykwalify
pylint>=3
pyserial
pytest
python-magic-bin; sys_platform == "win32"
python-magic; sys_platform != "win32"
pyyaml
ruff==0.8.1
setuptools>=70.2.0
sphinx-lint
tabulate
tomli>=1.1.0
tox
unidiff
west>=0.14.0
xlsxwriter
yamllint
# zephyr-keep-sorted-stop
Loading
Loading