From 6bebe9bd9e5007f18c1fbbf31ae556bd4bf38622 Mon Sep 17 00:00:00 2001 From: Eduard Sukharev Date: Wed, 20 Jul 2022 01:30:19 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20More=20ESP32=20(MKS=20TinyBee)=20te?= =?UTF-8?q?sts=20(#24493)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-builds.yml | 151 ++++++++++++++++++++++++++++++ buildroot/bin/restore_configs | 3 +- buildroot/tests/mks_tinybee | 33 +++++++ 3 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-builds.yml create mode 100755 buildroot/tests/mks_tinybee diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml new file mode 100644 index 000000000000..c3f3f2f1e1f0 --- /dev/null +++ b/.github/workflows/test-builds.yml @@ -0,0 +1,151 @@ +# +# test-builds.yml +# Do test builds to catch compile errors +# + +name: CI + +on: + pull_request: + branches: + - bugfix-2.0.x + - bugfix-2.1.x + paths-ignore: + - config/** + - data/** + - docs/** + - '**/*.md' + push: + branches: + - bugfix-2.0.x + - bugfix-2.1.x + paths-ignore: + - config/** + - data/** + - docs/** + - '**/*.md' + +jobs: + test_builds: + name: Run All Tests + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-latest + + strategy: + matrix: + test-platform: + # Base Environments + + - DUE + - DUE_archim + - esp32 + - linux_native + - mega2560 + - at90usb1286_dfu + - teensy31 + - teensy35 + - teensy41 + - SAMD51_grandcentral_m4 + + # Extended AVR Environments + + - FYSETC_F6 + - mega1280 + - rambo + - sanguino1284p + - sanguino644p + + # STM32F1 (Maple) Environments + + #- STM32F103RC_btt_maple + - STM32F103RC_btt_USB_maple + - STM32F103RC_fysetc_maple + - STM32F103RC_meeb_maple + - jgaurora_a5s_a1_maple + - STM32F103VE_longer_maple + #- mks_robin_maple + - mks_robin_lite_maple + - mks_robin_pro_maple + #- mks_robin_nano35_maple + #- STM32F103RE_creality_maple + - STM32F103VE_ZM3E4V2_USB_maple + + # STM32 (ST) Environments + + - STM32F103RC_btt + #- STM32F103RC_btt_USB + - STM32F103RE_btt + - STM32F103RE_btt_USB + - STM32F103RE_creality + - STM32F401RC_creality + - STM32F103VE_longer + - STM32F407VE_black + - BIGTREE_BTT002 + - BIGTREE_SKR_PRO + - BIGTREE_GTR_V1_0 + - mks_robin + - ARMED + - FYSETC_S6 + - STM32F070CB_malyan + - STM32F070RB_malyan + - malyan_M300 + - FLYF407ZG + - rumba32 + - LERDGEX + - LERDGEK + - mks_robin_nano35 + - NUCLEO_F767ZI + - REMRAM_V1 + - BTT_SKR_SE_BX + - chitu_f103 + - Opulo_Lumen_REV3 + + # ESP32 environments + - mks_tinybee + + # Put lengthy tests last + + - LPC1768 + - LPC1769 + + # Non-working environment tests + #- at90usb1286_cdc + #- STM32F103CB_malyan + #- STM32F103RE + #- mks_robin_mini + + steps: + + - name: Check out the PR + uses: actions/checkout@v3 + + - name: Cache pip + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Cache PlatformIO + uses: actions/cache@v3 + with: + path: ~/.platformio + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + + - name: Select Python 3.7 + uses: actions/setup-python@v3 + with: + python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax. + architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified + + - name: Install PlatformIO + run: | + pip install -U platformio + pio upgrade --dev + pio pkg update --global + + - name: Run ${{ matrix.test-platform }} Tests + run: | + make tests-single-ci TEST_TARGET=${{ matrix.test-platform }} diff --git a/buildroot/bin/restore_configs b/buildroot/bin/restore_configs index 61aa3f9ee18e..04df695a0053 100755 --- a/buildroot/bin/restore_configs +++ b/buildroot/bin/restore_configs @@ -1,5 +1,6 @@ #!/usr/bin/env bash -git checkout Marlin/Configuration*.h 2>/dev/null +git checkout Marlin/Configuration.h 2>/dev/null +git checkout Marlin/Configuration_adv.h 2>/dev/null git checkout Marlin/src/pins/ramps/pins_RAMPS.h 2>/dev/null rm -f Marlin/_Bootscreen.h Marlin/_Statusscreen.h marlin_config.json .pio/build/mc.zip diff --git a/buildroot/tests/mks_tinybee b/buildroot/tests/mks_tinybee new file mode 100755 index 000000000000..8b5aa0f07565 --- /dev/null +++ b/buildroot/tests/mks_tinybee @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# +# Build tests for MKS TinyBee +# + +# exit on first failure +set -e + +# +# Build with ESP3D WiFi, OTA and custom WIFI commands support +# +restore_configs +opt_set MOTHERBOARD BOARD_MKS_TINYBEE TX_BUFFER_SIZE 64 \ + WIFI_SSID '"ssid"' WIFI_PWD '"password"' \ + SERIAL_PORT_2 -1 BAUDRATE_2 250000 +opt_enable ESP3D_WIFISUPPORT WEBSUPPORT OTASUPPORT WIFI_CUSTOM_COMMAND +exec_test $1 "$2" "MKS TinyBee with ESP3D_WIFISUPPORT" "$3" + +# +# Build with LCD, SD support and Speaker support +# +restore_configs +opt_set MOTHERBOARD BOARD_MKS_TINYBEE \ + LCD_LANGUAGE en \ + LCD_INFO_SCREEN_STYLE 0 \ + DISPLAY_CHARSET_HD44780 WESTERN \ + NEOPIXEL_TYPE NEO_RGB +opt_enable FYSETC_MINI_12864_2_1 SDSUPPORT +opt_enable LED_CONTROL_MENU LED_USER_PRESET_STARTUP LED_COLOR_PRESETS NEOPIXEL_LED +exec_test $1 $2 "MKS TinyBee with NeoPixel LCD, SD and Speaker" "$3" + +# cleanup +restore_configs