From 0ca8a2bdb9506e9ceadc9ab19357f1161be3ae3b Mon Sep 17 00:00:00 2001 From: Julian Eder Date: Wed, 10 Jun 2026 16:51:16 +0200 Subject: [PATCH 1/3] tools/ci.sh: Fix commit check base branch for 3.x. The ci_commit_formatting_run function compared against upstream/master, which caused verifygitlog.py to check all 700+ historical commits on master-2.x-3.x. Many of those were merged with noreply GitHub emails, making the check always fail for any feature branch based on master-2.x-3.x. Fix the base reference to upstream/master-2.x-3.x so only the commits added by a feature branch are verified. Also add --ignore-rebase to match the behaviour of the master branch ci.sh. Signed-off-by: Julian Eder --- tools/ci.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/ci.sh b/tools/ci.sh index 1bc76c90..53a4cb85 100644 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -14,10 +14,9 @@ ulimit -n 1024 function ci_commit_formatting_run { git remote add upstream https://github.com/Infineon/XMC-for-Arduino.git - git fetch --depth=100 upstream master + git fetch --depth=100 upstream master-2.x-3.x # If the common ancestor commit hasn't been found, fetch more. - git merge-base upstream/master HEAD || git fetch upstream master - # For a PR, upstream/master..HEAD ends with a merge commit into master, exclude that one. - python tools/verifygitlog.py -v upstream/master..HEAD --no-merges + git merge-base upstream/master-2.x-3.x HEAD || git fetch upstream master-2.x-3.x + # For a PR, upstream/master-2.x-3.x..HEAD ends with a merge commit, exclude that one. + python tools/verifygitlog.py --ignore-rebase -v upstream/master-2.x-3.x..HEAD --no-merges } - From 49789213c7df94d76afba532306006b9e7fc07a5 Mon Sep 17 00:00:00 2001 From: Julian Eder Date: Wed, 10 Jun 2026 16:58:57 +0200 Subject: [PATCH 2/3] .github/workflows: Remove hil-unity-checks.yml for 3.x branch. The HIL self-hosted runner infrastructure is not configured for the master-2.x-3.x branch, causing the workflow to always fail on every push. Remove it until the HIL setup supports this branch. Signed-off-by: Julian Eder --- .github/workflows/hil-unity-checks.yml | 237 ------------------------- 1 file changed, 237 deletions(-) delete mode 100644 .github/workflows/hil-unity-checks.yml diff --git a/.github/workflows/hil-unity-checks.yml b/.github/workflows/hil-unity-checks.yml deleted file mode 100644 index 3e1aa01b..00000000 --- a/.github/workflows/hil-unity-checks.yml +++ /dev/null @@ -1,237 +0,0 @@ -name: Hil unity library checks - -# on which event should we start push, pull request or schedule dispatches -on: - - push - -env: - TEST_VERSION: 1.0.0 - -permissions: - contents: write - -# This template runes multiple workflows -jobs: - - - ############################################################################# - # This action sets common variables for the flow and - # identifies the libs to compile - setup: - - # we run this on self hosted runner, use labels to be more specific - # add specific names if there are some, otherwise self-hosted, X64, Linux are the default ones - runs-on: - - self-hosted - - X64 - - Linux - - steps: - # checkout the latest github action code - - name: Checkout actions - uses: actions/checkout@v4 - with: - token: ${{ secrets.UNITY_TOKEN }} - submodules: recursive - - # checkout the latest arduino-cli compiler - - name: Setup Arduino CLI - uses: arduino/setup-arduino-cli@master - - # Update the arduino code. Attention this does not setup XMC packages as this are set inside the self hosted runner - # the arduino board support packages can be updated automatically - # the XMC board support package is only linked inside the self hosted runner, which allows - # to use none official and beta versions - # arduino-cli core install "infineon:xmc" - - name: Install/Update Arduino Platform - run: | - arduino-cli core update-index - arduino-cli core install "arduino:avr" - - # Fetch variables and move them to the GITHUB_OUTPUT and fetch HIL information - - id: startup - run: | - # switch on the HIL - cd /opt/runner_support/ - REPO="$(basename "$GITHUB_REPOSITORY")" - ./py_checkusb.py --switch repo --namelist $REPO --onoff on - - # set the hil-unity-checks - hil=$(./py_checkusb.py --readyaml $GITHUB_WORKSPACE/tests/hil-unity-checklist.yaml --json) - echo "hil=${hil}" >> $GITHUB_OUTPUT - - # fetch unity libraries - readarray -t data < <(echo $hil | jq -r '.|keys[]') - export dev=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${data[@]}") - echo "devices=${dev}" >> $GITHUB_OUTPUT - echo "devices=${dev}" - - # Connect the GITHUB_OUTPUT to the variables and the workflow output mechanism - outputs: - hil: ${{ steps.startup.outputs.hil }} - devices: ${{ steps.startup.outputs.devices }} - - - ############################################################################# - # This step allows HIL (Hardware in the loop), therefore - # is searches for the given board/sensor combination and tries to find the actual port - # on the self hosted runner. (see documentation for the board2port finder) - flash: - - # We need a successful build before we can run the deploy - needs: [setup] - - # we run this on self hosted runner, use labels to be more specific - # add specific names if there are some, otherwise self-hosted, X64, Linux are the default ones - runs-on: - - self-hosted - - X64 - - Linux - - # do not stop if a single job fails - continue-on-error: true - - strategy: - - # the code to flash - matrix: - # the serials of the hardware boards - device: ${{ fromJson(needs.setup.outputs.devices) }} - - # These are the steps which should run for each combination of fqbn and lib code - steps: - # checkout the latest github action code - - name: Checkout actions - uses: actions/checkout@v4 - with: - token: ${{ secrets.UNITY_TOKEN }} - submodules: recursive - - # setup environment - - name: Environment - run: | - cd $HOME - rm -rf ~/.arduino15/packages/Infineon/hardware/xmc/* - ln -s $GITHUB_WORKSPACE ~/.arduino15/packages/Infineon/hardware/xmc/$TEST_VERSION - - hil=${{ toJson(needs.setup.outputs.hil) }} - REPO="$(basename "$GITHUB_REPOSITORY")" - DEVICE="$(basename ${{ matrix.device }} )" - LIBRARY=$(echo $hil | jq ".\"${DEVICE}\"" -r --compact-output) - FQBN=`tr '.' ':' <<<"${DEVICE}"` - - echo "repo=$REPO" >> $GITHUB_ENV - echo "device=$DEVICE" >> $GITHUB_ENV - echo "version=$TEST_VERSION" >> $GITHUB_ENV - echo "library=$LIBRARY" >> $GITHUB_ENV - echo "fqbn=$FQBN" >> $GITHUB_ENV - - echo "Repo " $REPO - echo "Device " $DEVICE - echo "Library " $LIBRARY - echo "FQBN " $FQBN - echo "Version " ${TEST_VERSION} - - # Build the test code with make and flash it to the board - # runs via nested loops: - # - first loop over the libraries mentioned for a device in the yaml file - # - selects the serial ids and ports for all devices connected with this device and library - # - second loop over the examples mentioned below the selected device for a library in the yaml file - # - third loop over the tests mentioned below the selected example for a device and library in the yaml file - # - fourth loop over the make commands mentioned below the selected test for a device, example and library in the yaml file - - - name: Build - run: | - export TMPDIR=$HOME/tmp - mkdir -p $TMPDIR - rm -rf $HOME/artefact - mkdir -p $HOME/artefact - - lib=${{ toJson(env.library) }} - readarray -t LIBS < <(echo ${lib} | jq ".|keys[]" -r --compact-output) - - # loop over all libs in the unity test yaml - for LIB in "${LIBS[@]}"; do - cd /opt/runner_support/ - readarray -t SERIALS < <(echo $(./py_checkusb.py --type ${LIB} --json) | jq ".\"${LIB}\".\"${{ env.device }}\"|keys[]" -r) - - # check if we have one or more serial numbers for this lib or stop here - if [[ -z $SERIALS ]]; then - echo "No serial or library information found" - exit 0 - fi - - # loop over all serials and fetch the ports - declare -a PORTS - for SERIAL in "${SERIALS[@]}"; do - PORTS+=($(/opt/runner_support/find_usb.sh $SERIAL)) - done - - # loop over all examples for one library - readarray -t EXAMPLES < <(echo $lib | jq ".\"${LIB}\"|keys[]" -r --compact-output) - for EXAMPLE in "${EXAMPLES[@]}"; do - echo "==============================================================================================================" - echo "Run for EXAMPLE: ${EXAMPLE} under LIB: ${LIB}" - echo "==============================================================================================================" - - # loop over all tests for one example and compile7flash the devices - readarray -t TESTS < <(echo $lib | jq ".\"${LIB}\".\"${EXAMPLE}\"[]" -r --compact-output) - for ((idx=0; idx<${#TESTS[@]}; ++idx)); do - cd $GITHUB_WORKSPACE/tests/arduino-core-tests/ - echo "==============================================================================================================" - echo "Run on index $idx for TEST: ${TESTS[idx]} under EXAMPLE: ${EXAMPLE} and LIB: ${LIB} on port: ${PORTS[idx]}" - echo "==============================================================================================================" - make FQBN=${{ env.fqbn }} PORT=${PORTS[idx]} UNITY_PATH=/opt/Unity ${TESTS[idx]} - mkdir -p ~/artefact/${LIB}/${EXAMPLE}/${TESTS[idx]}/ - mv ./build/build/* ~/artefact/${LIB}/${EXAMPLE}/${TESTS[idx]}/. - echo "==============================================================================================================" - done # end of TEST loop flash - - # loop over all tests for one example and monitor the serial output - for ((idx=0; idx<${#TESTS[@]}; ++idx)); do - echo "==============================================================================================================" - echo "Monitor on index $idx for TEST: ${TESTS[idx]} under EXAMPLE: ${EXAMPLE} and LIB: ${LIB}" - timeout 1m \ - /opt/runner_support/py_console.py \ - --port ${PORTS[idx]} \ - --baud 115200 \ - --report ~/artefact/${LIB}/${EXAMPLE}/${TESTS[idx]}/${{ env.device }}/report.json - - echo "==============================================================================================================" - done # end of TEST loop monitor - - done # end of EXAMPLE loop - done # end of LIB loop - - # Upload the compiled HEX files to the GitHub server - - name: Artefact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.device }} - path: ~/artefact/* - if-no-files-found: ignore - - - ############################################################################# - # Switch off the HIL after all tests are done - post: - - # we run this no matter if before fails - if: always() - # wait on first setup run before starting main function - needs: [setup, flash] - - # we run this on self hosted runner, use labels to be more specific - # add specific names if there are some, otherwise self-hosted, X64, Linux are the default ones - runs-on: - - self-hosted - - X64 - - Linux - - steps: - - name: Switch off HIL - run: | - cd /opt/runner_support/ - REPO="$(basename "$GITHUB_REPOSITORY")" - ./py_checkusb.py --switch repo --namelist $REPO --onoff off - From fa43325b8191cc53399b2417aa0ed4d49a35c778 Mon Sep 17 00:00:00 2001 From: Julian Eder Date: Wed, 10 Jun 2026 17:05:38 +0200 Subject: [PATCH 3/3] README.md: Fix broken Arduino link and remove HIL badge. The arduino.cc/en/Guide/Introduction URL returns 404. Replace it with the current docs.arduino.cc getting-started page. Also remove the HIL workflow badge since hil-unity-checks.yml is no longer present on this branch. Signed-off-by: Julian Eder --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 539398cf..4c94cc18 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,9 @@ ![Compilation Status](https://github.com/Infineon/XMC-for-Arduino/actions/workflows/compile-platform-examples.yml/badge.svg) [![Documentation Status](https://readthedocs.org/projects/xmc-arduino/badge/?version=latest)](https://xmc-arduino.readthedocs.io/en/latest/?badge=latest) -[![Hil unity library checks](https://github.com/Infineon/XMC-for-Arduino/actions/workflows/hil-unity-checks.yml/badge.svg)](https://github.com/Infineon/XMC-for-Arduino/actions/workflows/hil-unity-checks.yml) [![Check links](https://github.com/Infineon/XMC-for-Arduino/actions/workflows/check_links.yml/badge.svg)](https://github.com/Infineon/XMC-for-Arduino/actions/workflows/check_links.yml) -This project integrates Infineon's 32-bit XMC™ Industrial Arm® Cortex®-M Microcontroller into the [Arduino](https://www.arduino.cc/en/Guide/Introduction) ecosystem. +This project integrates Infineon's 32-bit XMC™ Industrial Arm® Cortex®-M Microcontroller into the [Arduino](https://docs.arduino.cc/learn/starting-guide/getting-started-arduino/) ecosystem. The [XMC™ microcontroller family](https://www.infineon.com/cms/de/product/microcontroller/32-bit-industrial-microcontroller-based-on-arm-cortex-m/) from Infineon is a powerful and versatile platform for embedded system development. The XMC for Arduino core provides a comprehensive set of APIs, examples, and tools for developing a wide range of applications, allowing developers to leverage the ease of use and flexibility of the Arduino platform while harnessing the advanced features and performance of the XMC™ microcontrollers.