Skip to content
Open
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
94 changes: 94 additions & 0 deletions .github/workflows/ifx_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Copyright (c) Arduino s.r.l. and/or its affiliated companies
# SPDX-License-Identifier: Apache-2.0

# Infineon-specific counterpart of build.yml: builds the same native Zephyr
# samples upstream builds, plus each feature board's own native samples (as
# declared by <board>.build.feature_board=true and
# <board>.build.ci_native_samples in boards.txt).
#
# Kept as a separate file (instead of editing build.yml) so upstream's own
# CI workflow stays untouched and rebases/syncs from upstream/main never
# conflict here.

name: Build native Zephyr samples (Infineon)

on:
push:
branches:
- edge-main
- control-main
pull_request:
branches:
- edge-main
- control-main

permissions:
contents: read

jobs:
build:
name: Build native Zephyr samples
runs-on: ubuntu-latest
container: zephyrprojectrtos/ci-base:latest
env:
CMAKE_PREFIX_PATH: /opt/toolchains
CCACHE_IGNOREOPTIONS: -specs=*
MODULE_PATH: ../modules/lib/ArduinoCore-zephyr

# action-setup-zephyr will initialize the repo in $GITHUB_WORKSPACE/..,
# so we need to put the module in $GITHUB_WORKSPACE's parent, but
# actions/checkout would not be able to checkout the module there
# directly, so we use "subfolder" and move it later.
#
# using action-setup-zephyr also requires a local west.yml and so the
# folder must be manually added to Zephyr as a module via
# EXTRA_ZEPHYR_MODULES.

steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
path: subfolder

- name: Fix module path, list needed HALs
run: |
mkdir -p $(dirname $MODULE_PATH) && mv subfolder $MODULE_PATH
NEEDED_HALS=$(grep 'build.zephyr_hals=' $MODULE_PATH/boards.txt | cut -d '=' -f 2 | xargs -n 1 echo | sort -u)
HAL_FILTER="-hal_.*"
for hal in $NEEDED_HALS; do
HAL_FILTER="$HAL_FILTER,+$hal"
done
echo "HAL_FILTER=$HAL_FILTER" | tee -a $GITHUB_ENV

- name: Setup Zephyr project
uses: zephyrproject-rtos/action-zephyr-setup@v1
with:
toolchains: arm-zephyr-eabi
manifest-file-name: ${{ env.MODULE_PATH }}/west.yml
west-project-filter: ${{ env.HAL_FILTER }}
enable-ccache: false

- name: Add manifest path as module
run: |
echo EXTRA_ZEPHYR_MODULES="$(pwd)/$MODULE_PATH" >> $GITHUB_ENV

- name: Fetch the Arduino API
run: |
west blobs --auto-accept fetch arduino-api

- name: Build fade
run: |
west build -p -b arduino_nano_33_ble//sense $MODULE_PATH/samples/fade

- name: Build i2cdemo
run: |
west build -p -b ek_ra8d1 $MODULE_PATH/samples/i2cdemo

- name: Build adc
run: |
west build -p -b arduino_nano_33_ble/nrf52840/sense $MODULE_PATH/samples/analog_input

- name: Build feature boards' native samples
run: |
bash $MODULE_PATH/extra/ci_build_native_samples.sh $MODULE_PATH
37 changes: 37 additions & 0 deletions .github/workflows/ifx_commit_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 'Infineon Check Commit Message'

on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
branches:
- 'ifx-main'
- 'edge-main'
- 'control-main'

jobs:
check-commit-messages:
runs-on: ubuntu-latest
steps:
- name: 'Check commit messages format'
uses: gsactions/commit-message-checker@v2
with:
pattern: '^[^!]+: [A-Za-z]+.+ .+$'
flags: 'gm'
error: 'Commit subject line / PR title must match the following pattern: <scope>: <description>'
excludeTitle: 'false'
excludeDescription: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: 'Check commit messages length'
uses: gsactions/commit-message-checker@v2
with:
pattern: '^[^#].{10,80}$'
error: 'Commit subject line maximum line length of 80 characters is exceeded.'
excludeTitle: 'true'
excludeDescription: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
58 changes: 58 additions & 0 deletions .github/workflows/ifx_format_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: 'Infineon Format Check'

on:
push:
branches:
- 'ifx-main'
- 'edge-main'
- 'control-main'

pull_request:
types:
- opened
- edited
- reopened
- synchronize
branches:
- 'ifx-main'
- 'edge-main'
- 'control-main'

jobs:
verify-format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: false
persist-credentials: false
- name: Get changed source files that need format check
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: |
cores/arduino/**/*.{c,cpp,h,hpp}
loader/**/*.{c,cpp,h,hpp}
libraries/**/*.{c,cpp,h,hpp}
files_ignore: |
cores/arduino/api/**
loader/llext_exports.c
loader/blobs/4343WA1_*.c
loader/blobs/wifi_nvram_image_data.h
libraries/examples/**
libraries/extras/**
libraries/ea_malloc/**
libraries/Storage/examples/FlashFormat/4343WA1_bin.h
json: true
- name: Export changed files in a text file, one per line
if: steps.changed-files.outputs.any_changed == 'true'
run: |
echo ${{ steps.changed-files.outputs.all_changed_files }} | jq -r '.[]' > all_changed_files.txt
cat all_changed_files.txt
- name: Run clang-format check
if: steps.changed-files.outputs.any_changed == 'true'
uses: pillo79/clang-format-action@05f671e71f0758aba4d3c9dbb0ee81bc5f0137c6
with:
clang-format-version: '19'
check-files-from: all_changed_files.txt
Loading
Loading