Not finding Header files when building on Github Action Ubuntu Runner

I am running a Github Action to build my project with platform io. It works without problems on the windows runner, but not on the ubuntu runners (tried 20.04, 22.04).

This is the yaml file:

name: Build firmware with PIO

on: [push]

jobs:
  build:
    runs-on: windows-2022
    environment: CICD

    steps:
      - uses: actions/checkout@v4  
        with:      
          fetch-depth: '100' # fetch last 100 to make sure we have a tag
          fetch-tags: 'true' # fetch tags for static header generation
      - uses: actions/cache@v4
        with:
          path: |
            ~/.cache/pip
            ~/.platformio/.cache
          key: ${{ runner.os }}-pio
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - name: Install PlatformIO Core
        run: pip install --upgrade platformio

      - name: test git describe
        run: git describe --tags --match v[0-9]*

      - name: Build PlatformIO Project
        run: pio run -e sensotronic2 -vv

The error that happens only on ubuntu:

In file included from src/ble/BLENotifyTPLCharacteristic.h:4:0,
                 from src/ble/BLEGridService.h:4,
                 from src/IMUPropagater.h:7,
                 from src/IMUPropagater.cpp:1:
src/ble/BLENotifyTPLHelper.h:5:10: fatal error: TPLHelperbase.h: No such file or directory

With the according compiler command (it shows that -Ilib/protocol/include in included, the TPLHelperbase.h file is there):

arm-none-eabi-g++ -o .pio/build/sensotronic2/src/ModeManager.cpp.o -c -fno-rtti -fno-exceptions -std=gnu++11 -fno-threadsafe-statics -mthumb -mcpu=cortex-m4 -Ofast -ffunction-sections -fdata-sections -Wall -nostdlib --param max-inline-insns-single=500 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float -DPLATFORMIO=60114 -DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA -D_BSD_SOURCE -DUSE_LISTCALIBRATION=true -DNOT_AN_INTERRUPT=-1 -DSPI_32MHZ_INTERFACE=1 -DLFS_FLASH_ADDR=0xD9000 -DF_CPU=64000000L -DARDUINO=10804 -DARDUINO_ARCH_NRF52 -DARDUINO_BSP_VERSION=\"1.6.0\" -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DLFS_NAME_MAX=64 -DDX_CC_TEE -DSOFTDEVICE_PRESENT -DUSBCON -DUSE_TINYUSB -DUSB_VID=0x239A -DUSB_PID=0x8029 "-DUSB_PRODUCT=\"Feather nRF52840 Express\"" -DUSB_MANUFACTURER=\"Adafruit\" -DCFG_DEBUG=0 -Iinclude -Isrc -Ilib/IMU/include -Ilib/IMU/src -Ilib/Config/include -Ilib/Config/src -Ilib/GridSensorReading/include -Ilib/GridSensorReading/src -Ilib/Calibration/include -Ilib/Calibration/src -Ilib/time/include -Ilib/time/src -Ilib/BatteryMonitor/include -Ilib/BatteryMonitor/src -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/libraries/Bluefruit52Lib/src -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/libraries/Adafruit_nRFCrypto/src -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/libraries/InternalFileSytem/src -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/libraries/Adafruit_LittleFS/src -Ilib/protocol/include -Ilib/protocol/src -Ilib/util/include -Ilib/util/src -I.pio/libdeps/sensotronic2/EasyButton/src -I.pio/libdeps/sensotronic2/Fusion "-I.pio/libdeps/sensotronic2/Adafruit BusIO" -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/libraries/Wire -I.pio/libdeps/sensotronic2/ArduinoLog "-I.pio/libdeps/sensotronic2/RTT Stream/src" "-I.pio/libdeps/sensotronic2/Adafruit SPIFlash/src" -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/libraries/Adafruit_TinyUSB_Arduino/src "-I.pio/libdeps/sensotronic2/SdFat - Adafruit Fork/src" -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/libraries/SPI -I.pio/libdeps/sensotronic2/StreamUtils/src -I.pio/libdeps/sensotronic2/Regexp/src -I.pio/libdeps/sensotronic2/SafeString/src -I.pio/libdeps/sensotronic2/CRC32/src -I.pio/libdeps/sensotronic2/ArduinoJson/src -I/home/runner/.platformio/packages/framework-cmsis/CMSIS/Core/Include -I/home/runner/.platformio/packages/framework-cmsis/CMSIS/DSP/Include -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/nordic -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/nordic/nrfx -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/nordic/nrfx/hal -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/nordic/nrfx/mdk -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/nordic/nrfx/soc -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/nordic/nrfx/drivers/include -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/nordic/nrfx/drivers/src -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/nordic/softdevice/s140_nrf52_6.1.1_API/include -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/nordic/softdevice/s140_nrf52_6.1.1_API/include/nrf52 -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/freertos/Source/include -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/freertos/config -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/freertos/portable/GCC/nrf52 -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/freertos/portable/CMSIS/nrf52 -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/sysview/SEGGER -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/sysview/Config -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/libraries/Adafruit_TinyUSB_Arduino/src/arduino -I/home/runner/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5 -Isensotronic_variants/feather_nrf52840_express src/ModeManager.cpp

I don’t really get why it does not find it on ubuntu. I checked the pio version that both use (they are both platformio-6.1.14.tar.gz) and also the compiler version is the same (toolchain-gccarmnoneeabi @ 1.70201.0).

I tried now to compile the same project directly on an ubuntu 22.04 machine, still the same error, so it is independent of github actions.

With a simple project (just one header file in src folder including one header file from the lib folder this error does not happen).

So I wonder if someone generally uses ubuntu with platformio or is it not well supported?

It would be good to see the file structure.
Can you share the link to the github repo?

Is the filename a 100% match? It must be the exact same upper and lowercasing, otherwise case-sensitive LInux filesystem won’t find the find file. Window’s filesystem on the other hand is case insensitive, which occludes the error.

Yes the hint with the casing was good. The path was correct but the file is named TPLHelperBase.h and not TPLHelperbase.h … :sweat_smile:

So yeah not a problem with platformio, just normal programming problems :wink: