Просмотр исходного кода

CI: seperate esp32s2 into different job

skip esp32s in build_all.py script
hathach 6 лет назад
Родитель
Сommit
f073a5ecd3
3 измененных файлов с 27 добавлено и 41 удалено
  1. 25 5
      .github/workflows/build.yml
  2. 0 34
      .github/workflows/build_esp32s.yml
  3. 2 2
      tools/build_all.py

+ 25 - 5
.github/workflows/build.yml

@@ -3,6 +3,7 @@ name: Build
 on: [pull_request, push, repository_dispatch]
 
 jobs:
+  # Unit testing with Ceedling
   unit-test:
     runs-on: ubuntu-latest    
     steps:
@@ -19,6 +20,7 @@ jobs:
         cd test
         ceedling test:all
 
+  # Build most of the ports
   build:
     runs-on: ubuntu-latest
     strategy:
@@ -57,11 +59,6 @@ jobs:
         tar -C $HOME -xaf /tmp/dl/msp430-gcc.tar.bz2
         echo "::add-path::`echo $HOME/msp430-gcc-*_linux64/bin`"
 
-        # ESP IDF
-        git clone --depth 1 https://github.com/espressif/esp-idf.git $HOME/esp-idf
-        cd $HOME/esp-idf
-        ./install.sh
-
     - name: Checkout TinyUSB
       uses: actions/checkout@v2
       with:
@@ -80,3 +77,26 @@ jobs:
         . $HOME/esp-idf/export.sh
         python3 tools/build_all.py ${{ matrix.example }}
 
+  # Build ESP32S
+  build-esp32s:
+    runs-on: ubuntu-latest
+    steps:
+    - name: Setup Python
+      uses: actions/setup-python@v1
+
+    - name: Install Toolchains
+      run: |
+        git clone --depth 1 https://github.com/espressif/esp-idf.git $HOME/esp-idf
+        cd $HOME/esp-idf
+        ./install.sh
+
+    - name: Checkout TinyUSB
+      uses: actions/checkout@v2
+      with:
+        submodules: 'false'
+
+    - name: Build
+      run: |
+        . $HOME/esp-idf/export.sh
+        cd examples/device/cdc_msc_freertos
+        idf.py build

+ 0 - 34
.github/workflows/build_esp32s.yml

@@ -1,34 +0,0 @@
-name: Build ESP32S
-
-on: [pull_request, push, repository_dispatch]
-
-jobs:
-  build:
-    runs-on: ubuntu-latest
-    strategy:
-      fail-fast: false
-      matrix:
-        example: ['cdc_msc_freertos']
-
-    steps:
-    - name: Setup Python
-      uses: actions/setup-python@v1
-
-    - name: Install Toolchains
-      run: |
-        # ESP IDF
-        git clone --depth 1 https://github.com/espressif/esp-idf.git $HOME/esp-idf
-        cd $HOME/esp-idf
-        ./install.sh
-
-    - name: Checkout TinyUSB
-      uses: actions/checkout@v2
-      with:
-        # Cannot do submodule checkout here since LWIP's git server cannot checkout unadventised commits (it must use tags)
-        submodules: 'false'
-
-    - name: Build
-      run: |
-        . $HOME/esp-idf/export.sh
-        python3 tools/build_all.py ${{ matrix.example }} esp32s2_saola
-

+ 2 - 2
tools/build_all.py

@@ -57,8 +57,8 @@ def skip_example(example, board):
     with open(board_mk) as mk:
         mk_contents = mk.read()
 
-        # Skip ESP32-S2 board if example is not FreeRTOS one
-        if 'freertos' not in example and 'CROSS_COMPILE = xtensa-esp32s2-elf-' in mk_contents:
+        # Skip all ESP32-S2 board for CI
+        if 'CROSS_COMPILE = xtensa-esp32s2-elf-' in mk_contents:
             return 1
 
         # Skip if CFG_TUSB_MCU in board.mk to match skip file