diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 39ba7269c4..4d94af8bf2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -3,381 +3,7 @@ name: Run tests on Linux on: [pull_request] jobs: - unittests-linux-generic: - runs-on: ubuntu-24.04 - container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2024-12-01 - - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Fix Git permission/ownership problem - run: | - git config --global --add safe.directory /__w/modm/modm - - name: Update lbuild - run: | - pip3 install --upgrade --upgrade-strategy=eager --break-system-packages modm - - name: Check environment - run: | - env - locale -a - python --version || true - python3 --version || true - python3 -c "import os; print(os.cpu_count())" - which scons - scons --version - which g++ - g++ --version - which arm-none-eabi-g++ - arm-none-eabi-g++ --version - which lbuild - lbuild --version - - name: Check for Trailing Whitespace - if: always() - run: | - python3 tools/scripts/rm_whitespace.py - - name: Check for Expired Deprecations - if: startsWith(github.head_ref, 'release/') - run: | - egrep -rI "DEPRECATED?:? +`basename ${{ github.head_ref }}`" . || true - return $(egrep -rI "DEPRECATED?:? +`basename ${{ github.head_ref }}`" . | wc -l) - - name: Synchronize Documentation - if: always() - run: | - git checkout . - python3 tools/scripts/synchronize_docs.py -d - - name: Synchronize HAL Support Matrix - if: always() - run: | - git checkout . - python3 tools/scripts/generate_hal_matrix.py -d - - name: Check Examples - if: always() - run: | - git checkout . - python3 tools/scripts/examples_check.py - - name: Hosted Unittests - if: always() - run: | - (cd test && make run-hosted-linux) - - name: Compile STM32 Unittests - if: always() - run: | - (cd test && make compile-nucleo-l432kc) - (cd test && make compile-nucleo-f091rc_A) - (cd test && make compile-nucleo-f091rc_B) - (cd test && make compile-nucleo-f103rb_A) - (cd test && make compile-nucleo-f103rb_B) - (cd test && make compile-nucleo-f401re) - (cd test && make compile-nucleo-f411re) - (cd test && make compile-nucleo-f429zi) - (cd test && make compile-nucleo-f446re) - (cd test && make compile-nucleo-f446ze) - (cd test && make compile-nucleo-f767zi) - (cd test && make compile-nucleo-g474re) - (cd test && make compile-nucleo-h723zg) - (cd test && make compile-nucleo-l432kc) - (cd test && make compile-nucleo-l496zg-p) - (cd test && make compile-nucleo-l552ze-q) - - name: Linux Examples - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py linux) - - name: Generic Examples - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py generic) - - name: Examples SAMD Devices - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py feather_m4 samd samd21_xplained_pro) - - name: Examples SAMG Devices - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py samg55_xplained_pro) - - name: Examples SAME5x Devices - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py same54_xplained_pro) - - name: Examples SAME70 Devices - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py same70_xplained) - - name: Examples SAMV Devices - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py samv samv71_xplained_ultra) - - name: Examples RP20 Devices - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py feather_rp2040 rp_pico thingplus_rp2040) - - name: Execute Python Scripts - if: always() - run: | - python3 tools/scripts/authors.py --handles --count --shoutout --since 2017-01-01 - python3 tools/xpcc_generator/builder/system_layout.py examples/xpcc/xml/communication.xml -o /tmp - python3 tools/font_creator/font_export.py tools/font_creator/fonts/all_caps_3x5.font /tmp/all_caps_converted - - stm32-examples: - runs-on: ubuntu-24.04 - container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2024-12-01 - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Fix Git permission/ownership problem - run: | - git config --global --add safe.directory /__w/modm/modm - - name: Update lbuild - run: | - pip3 install --upgrade --upgrade-strategy=eager --break-system-packages modm - - name: Examples STM32C0 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py nucleo_c031c6) - - name: Examples STM32F0 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py stm32f0_discovery stm32f072_discovery nucleo_f031k6 nucleo_f072rb nucleo_f091rc nucleo_f042k6 stm32f030f4p6_demo_board) - - name: Examples STM32F1 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py stm32f1_discovery nucleo_f103rb olimexino_stm32 blue_pill_f103 black_pill_f103) - - name: Examples STM32F3 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py stm32f3_discovery nucleo_f303k8 nucleo_f303re nucleo_f334r8) - - name: Examples STM32F7 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py stm32f746g_discovery stm32f769i_discovery nucleo_f746zg nucleo_f767zi) - - name: Examples STM32G0 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py nucleo_g070rb nucleo_g071rb) - - name: Examples STM32L0 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py nucleo_l031k6 nucleo_l053r8) - - name: Examples STM32L1 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py nucleo_l152re stm32l1_discovery) - - name: Examples STM32L4 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py stm32l476_discovery nucleo_l476rg nucleo_l432kc nucleo_l452re nucleo_l496zg-p) - - name: Examples STM32L5 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py nucleo_l552ze-q) - - name: Examples STM32U5 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py nucleo_u575zi-q) - - name: Examples STM32G4 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py nucleo_g474re nucleo_g431rb nucleo_g431kb) - - name: Examples STM32H7 Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py nucleo_h743zi nucleo_h723zg stm32h750vbt6_devebox) - stm32f4-examples-1: - runs-on: ubuntu-24.04 - container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2024-12-01 - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Fix Git permission/ownership problem - run: | - git config --global --add safe.directory /__w/modm/modm - - name: Update lbuild - run: | - pip3 install --upgrade --upgrade-strategy=eager --break-system-packages modm - - name: Examples STM32F4 Only Discovery Board - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py stm32f4_discovery stm32f429_discovery stm32f469_discovery stm32f401_discovery) - - stm32f4-examples-2: - runs-on: ubuntu-24.04 - container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2024-12-01 - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Fix Git permission/ownership problem - run: | - git config --global --add safe.directory /__w/modm/modm - - name: Update lbuild - run: | - pip3 install --upgrade --upgrade-strategy=eager --break-system-packages modm - - name: Install protobuf==3.20.1 grpcio-tools (pip) - run: | - pip3 install --upgrade --upgrade-strategy=eager --break-system-packages protobuf grpcio-tools - - name: Examples STM32F4 Without Discovery Board - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py nucleo_f401re nucleo_f411re nucleo_f429zi nucleo_f446re nucleo_f446ze nucleo_f439zi black_pill_f401 black_pill_f411 stm32f407vet6_devebox stm32_f4ve) - - avr-examples: - runs-on: ubuntu-24.04 - container: - image: ghcr.io/modm-ext/modm-build-avr:2024-12-01 - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Fix Git permission/ownership problem - run: | - git config --global --add safe.directory /__w/modm/modm - - name: Update lbuild - run: | - pip3 install --upgrade --upgrade-strategy=eager --break-system-packages modm - - name: Check environment - if: always() - run: | - which avr-g++ - avr-g++ --version - - name: Examples AVR Series - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py avr arduino_uno arduino_nano srxe) - - name: Compile AVR Unittests AT90CAN - if: always() - run: | - (cd test && make compile-al-avreb-can) - - name: Compile AVR Unittests Arduino - if: always() - run: | - (cd test && make compile-arduino-uno) - (cd test && make compile-arduino-nano_A compile-arduino-nano_B compile-arduino-nano_C compile-arduino-nano_D compile-arduino-nano_E compile-arduino-nano_F compile-arduino-nano_G) - - name: Compile AVR Unittests ATmega - if: always() - run: | - (cd test && make compile-mega-2560-pro_A compile-mega-2560-pro_B compile-mega-2560-pro_C) - - name: Quick compile HAL for AVR Devices - if: always() - run: | - (cd test/all && python3 run_all.py at --quick) - - name: Upload log artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: hal-compile-quick-avr - path: test/all/log - - hal-compile-quick-1: - runs-on: ubuntu-24.04 - container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2024-12-01 - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Fix Git permission/ownership problem - run: | - git config --global --add safe.directory /__w/modm/modm - - name: Update lbuild - run: | - pip3 install --upgrade --upgrade-strategy=eager --break-system-packages modm - - name: Quick compile HAL for Cortex-M Part 1 - if: always() - run: | - (cd test/all && python3 run_all.py stm32 sam rp --quick --split 4 --part 0) - - name: Upload log artifacts - uses: actions/upload-artifact@v4 - with: - name: hal-compile-quick-1 - path: test/all/log - - hal-compile-quick-2: - runs-on: ubuntu-24.04 - container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2024-12-01 - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Fix Git permission/ownership problem - run: | - git config --global --add safe.directory /__w/modm/modm - - name: Update lbuild - run: | - pip3 install --upgrade --upgrade-strategy=eager --break-system-packages modm - - name: Quick compile HAL for Cortex-M Part 2 - if: always() - run: | - (cd test/all && python3 run_all.py stm32 sam rp --quick --split 4 --part 1) - - name: Upload log artifacts - uses: actions/upload-artifact@v4 - with: - name: hal-compile-quick-2 - path: test/all/log - - hal-compile-quick-3: - runs-on: ubuntu-24.04 - container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2024-12-01 - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Fix Git permission/ownership problem - run: | - git config --global --add safe.directory /__w/modm/modm - - name: Update lbuild - run: | - pip3 install --upgrade --upgrade-strategy=eager --break-system-packages modm - - name: Quick compile HAL for Cortex-M Part 3 - if: always() - run: | - (cd test/all && python3 run_all.py stm32 sam rp --quick --split 4 --part 2) - - name: Upload log artifacts - uses: actions/upload-artifact@v4 - with: - name: hal-compile-quick-3 - path: test/all/log - - hal-compile-quick-4: - runs-on: ubuntu-24.04 - container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2024-12-01 - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Fix Git permission/ownership problem - run: | - git config --global --add safe.directory /__w/modm/modm - - name: Update lbuild - run: | - pip3 install --upgrade --upgrade-strategy=eager --break-system-packages modm - - name: Quick compile HAL for Cortex-M Part 4 - if: always() - run: | - (cd test/all && python3 run_all.py stm32 sam rp --quick --split 4 --part 3) - - name: Upload log artifacts - uses: actions/upload-artifact@v4 - with: - name: hal-compile-quick-4 - path: test/all/log # Niklas: Running on the old container until I can figure out why the doc generator hangs build-docs-test: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 56964c15e4..0000000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Run tests on MacOS - -on: [pull_request] - -jobs: - macos_testing: - runs-on: macos-13 - - steps: - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: '15.2' - - - name: Setup environment - Brew tap - run: | - brew tap osx-cross/arm - brew tap osx-cross/avr - - - name: Setup environment - Brew install - run: | - export HOMEBREW_NO_INSTALL_CLEANUP=1 # saves time - brew update - # brew unlink gcc - brew install doxygen boost gcc@13 avr-gcc@13 arm-gcc-bin@13 cmake || true - brew link --force avr-gcc@13 arm-gcc-bin@13 - # brew upgrade boost gcc git || true - - - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Setup environment - Python pip - run: | - pip3 install --user modm scons - echo "/usr/local/bin" >> $GITHUB_PATH - echo "/Users/runner/Library/Python/3.12/bin" >> $GITHUB_PATH - - - name: Dump environment - run: | - echo $PATH - env - locale -a - python --version || true - python3 --version || true - python3 -c "import os; print(os.cpu_count())" - which g++ - g++ --version - which avr-g++ - avr-g++ --version - which arm-none-eabi-g++ - arm-none-eabi-g++ --version - which lbuild - lbuild --version - which scons - scons --version - - - name: Check out repository - if: always() - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - - name: Hosted Unittests - if: always() - run: | - (cd test && make run-hosted-darwin) - - - name: Hosted Examples - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py linux) - - - name: Compile STM32 Examples - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py nucleo_f031k6 nucleo_f103rb nucleo_f303re nucleo_f411re nucleo_f746zg) - (cd examples && ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l031k6 nucleo_l152re nucleo_l476rg nucleo_g474re) - - - name: Compile AVR Examples - if: always() - run: | - (cd examples && ../tools/scripts/examples_compile.py avr) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index 4229a639bf..0000000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: Run tests on Windows - -on: [pull_request] - -jobs: - windows_testing: - runs-on: windows-2022 - env: - PYTHONIOENCODING: "utf-8" - - steps: - - # Disabling snake-oil for performance reasons - - name: Disable Windows Defender - run: Set-MpPreference -DisableRealtimeMonitoring $true - - # This doesn't work due to files getting overwritten from inside the zip - # [System.IO.Compression.ZipFile]::ExtractToDirectory("gcc-arm-none-eabi-win64.zip", "C:\") - # And this manual expansion code - # function Unzip($zipfile, $outdir) - # { - # Add-Type -AssemblyName System.IO.Compression.FileSystem - # $archive = [System.IO.Compression.ZipFile]::OpenRead($zipfile) - # foreach ($entry in $archive.Entries) - # { - # $entryTargetFilePath = [System.IO.Path]::Combine($outdir, $entry.FullName) - # $entryDir = [System.IO.Path]::GetDirectoryName($entryTargetFilePath) - # if(!(Test-Path $entryDir )){ - # New-Item -ItemType Directory -Path $entryDir | Out-Null - # } - # if (!$entryTargetFilePath.EndsWith("\") -And !$entryTargetFilePath.EndsWith("/")) { - # [System.IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $entryTargetFilePath, $true); - # } - # } - # } - # Unzip -zipfile "gcc-arm-none-eabi-win64.zip" -outdir "C:\" - # is not faster than - # Expand-Archive -Path gcc-arm-none-eabi-win64.zip -DestinationPath C:\ -Force - - name: Download and Unzip GCCs - shell: powershell - run: | - $ProgressPreference = 'SilentlyContinue' - Start-Job { - Set-Location $using:PWD - Add-Type -Assembly "System.IO.Compression.Filesystem" - Invoke-WebRequest -OutFile gcc-win64.zip https://github.com/brechtsanders/winlibs_mingw/releases/download/13.2.0posix-18.1.5-11.0.1-msvcrt-r8/winlibs-x86_64-posix-seh-gcc-13.2.0-mingw-w64msvcrt-11.0.1-r8.zip - [System.IO.Compression.ZipFile]::ExtractToDirectory("gcc-win64.zip", "C:\") - } - Start-Job { - Set-Location $using:PWD - Invoke-WebRequest -OutFile gcc-arm-none-eabi-win64.zip https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi.zip - Expand-Archive -Path gcc-arm-none-eabi-win64.zip -DestinationPath C:\ -Force - } - Start-Job { - Set-Location $using:PWD - Add-Type -Assembly "System.IO.Compression.Filesystem" - Invoke-WebRequest -OutFile gcc-avr-win64.zip https://github.com/ZakKemble/avr-gcc-build/releases/download/v13.2.0-1/avr-gcc-13.2.0-x64-windows.zip - [System.IO.Compression.ZipFile]::ExtractToDirectory("gcc-avr-win64.zip", "C:\") - } - Get-Job | Wait-Job - - - name: Install GCCs - if: always() - shell: powershell - run: | - dir C:\ - dir C:\mingw64 - dir C:\arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi - dir C:\avr-gcc-13.2.0-x64-windows - echo "C:\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - echo "C:\arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - echo "C:\avr-gcc-13.2.0-x64-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - rm gcc-arm-none-eabi-win64.zip - - - name: Install Python - if: always() - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Install Python packages - if: always() - run: | - pip install --upgrade --upgrade-strategy=eager modm scons future - - - name: Show Version Information - if: always() - run: | - gcc --version - g++ --version - make --version - arm-none-eabi-g++ --version - avr-g++ --version - lbuild --version - python -c "import os; print(os.cpu_count())" - - - name: Check out repository - if: always() - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - - name: Hosted Examples - if: always() - shell: bash - run: | - (cd examples && python ../tools/scripts/examples_compile.py linux/assert linux/block_device/ram linux/build_info linux/git linux/logger linux/printf linux/etl linux/fiber) - - - name: Hosted Unittests - if: always() - shell: bash - run: | - (cd test && make run-hosted-windows) - - - name: Compile STM32 Examples - if: always() - shell: bash - run: | - (cd examples && python ../tools/scripts/examples_compile.py nucleo_f031k6 nucleo_f103rb nucleo_f303re nucleo_f411re nucleo_f746zg) - (cd examples && python ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l031k6 nucleo_l152re nucleo_l476rg nucleo_g474re) - - - name: Compile AVR Examples - if: always() - shell: bash - run: | - (cd examples && ../tools/scripts/examples_compile.py avr arduino_nano arduino_uno srxe)