summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMartino Facchin <[email protected]>2023-06-05 09:12:50 +0200
committerMartino Facchin <[email protected]>2023-06-05 09:12:50 +0200
commitcdbd3a0b4ee6c97f2c3cd568b3ff453639ed81cd (patch)
treed053d74ee2089a272a4fa1ac518a96231f83aaa0 /.github
parentcdae66c8371e1c73d28279462fa8598a9daae5a7 (diff)
parentc7686f8d5e98660137ef176d35bc8a82f63675f3 (diff)
Merge remote-tracking branch 'mainline/master' into HEAD
Update fsp to 4.0.0
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build_aarch64.yml3
-rw-r--r--.github/workflows/build_arm.yml87
-rw-r--r--.github/workflows/build_esp.yml1
-rw-r--r--.github/workflows/build_iar.yml31
-rw-r--r--.github/workflows/build_msp430.yml3
-rw-r--r--.github/workflows/build_renesas.yml3
-rw-r--r--.github/workflows/build_riscv.yml3
-rw-r--r--.github/workflows/build_win_mac.yml1
-rw-r--r--.github/workflows/cifuzz.yml1
-rw-r--r--.github/workflows/cmake_arm.yml151
-rw-r--r--.github/workflows/pre-commit.yml1
-rw-r--r--.github/workflows/trigger.yml1
12 files changed, 199 insertions, 87 deletions
diff --git a/.github/workflows/build_aarch64.yml b/.github/workflows/build_aarch64.yml
index cc8ddb070..6ac7ad015 100644
--- a/.github/workflows/build_aarch64.yml
+++ b/.github/workflows/build_aarch64.yml
@@ -1,6 +1,7 @@
name: Build AArch64
on:
+ workflow_dispatch:
push:
paths:
- 'src/**'
@@ -69,7 +70,7 @@ jobs:
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
- name: Get Dependencies
- run: python3 tools/get_family_deps.py ${{ matrix.family }}
+ run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml
index b60d12a98..a7c7fd1e1 100644
--- a/.github/workflows/build_arm.yml
+++ b/.github/workflows/build_arm.yml
@@ -1,6 +1,7 @@
name: Build ARM
on:
+ workflow_dispatch:
push:
paths:
- 'src/**'
@@ -33,21 +34,19 @@ jobs:
family:
# Alphabetical order
- 'broadcom_32bit'
- - 'imxrt'
- - 'kinetis_k32 kinetis_kl'
- - 'lpc11 lpc13 lpc15 lpc17 lpc18'
+ - 'kinetis_k32l kinetis_kl'
+ - 'lpc11 lpc13 lpc15 lpc17'
- 'lpc51 lpc54 lpc55'
- 'mm32 msp432e4'
- 'nrf'
- 'ra'
- - 'rp2040'
- 'samd11 samd21'
- 'samd51 same5x'
- 'saml2x'
- 'stm32f0 stm32f1 stm32f2 stm32f3'
- 'stm32f4'
- 'stm32f7'
- - 'stm32g4 stm32h7'
+ - 'stm32h7'
- 'stm32l0 stm32l4 stm32u5 stm32wb'
- 'tm4c123 xmc4000'
steps:
@@ -77,7 +76,7 @@ jobs:
echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk
- name: Get Dependencies
- run: python3 tools/get_family_deps.py ${{ matrix.family }}
+ run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
@@ -91,24 +90,11 @@ jobs:
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done
- # Upload binaries for rp2040/stm32l412nucleo hardware test with self-hosted
-
- - name: Prepare rp2040 Artifacts
- if: contains(matrix.family, 'rp2040') && github.repository_owner == 'hathach'
- run: find examples/ -name "*.elf" -exec mv {} . \;
-
+ # Upload binaries for hardware test with self-hosted
- name: Prepare stm32l412nucleo Artifacts
if: contains(matrix.family, 'stm32l4')
run: find examples/ -path "*stm32l412nucleo/*.elf" -exec mv {} . \;
- - name: Upload Artifacts for rp2040
- if: contains(matrix.family,'rp2040') && github.repository_owner == 'hathach'
- uses: actions/upload-artifact@v3
- with:
- name: rp2040
- path: |
- *.elf
-
- name: Upload Artifacts for stm32l412nucleo
if: contains(matrix.family, 'stm32l4') && github.repository_owner == 'hathach'
uses: actions/upload-artifact@v3
@@ -119,67 +105,6 @@ jobs:
# ---------------------------------------
# Hardware in the loop (HIL)
- # Current self-hosted instance is running on an RPI4 with
- # - pico + pico-probe connected via USB
- # - pico-probe is /dev/ttyACM0
- # ---------------------------------------
- hw-rp2040-test:
- # run only with hathach's commit due to limited resource on RPI4
- if: github.repository_owner == 'hathach'
- needs: build-arm
- runs-on: [self-hosted, Linux, ARM64, rp2040]
-
- steps:
- - name: Clean workspace
- run: |
- echo "Cleaning up previous run"
- rm -rf "${{ github.workspace }}"
- mkdir -p "${{ github.workspace }}"
-
- - name: Download rp2040 Artifacts
- uses: actions/download-artifact@v3
- with:
- name: rp2040
-
- - name: Create flash.sh
- run: |
- #echo > flash.sh 'cmdout=$(openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1 reset exit")'
- echo > flash.sh 'pyocd flash -t rp2040 $1'
- echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
- chmod +x flash.sh
-
- - name: Test cdc_dual_ports
- run: |
- ./flash.sh cdc_dual_ports.elf
- while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
- test -e /dev/ttyACM1 && echo "ttyACM1 exists"
- test -e /dev/ttyACM2 && echo "ttyACM2 exists"
-
- - name: Test cdc_msc
- run: |
- ./flash.sh cdc_msc.elf
- readme='/media/pi/TinyUSB MSC/README.TXT'
- while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
- test -e /dev/ttyACM1 && echo "ttyACM1 exists"
- test -f "$readme" && echo "$readme exists"
- cat "$readme"
-
- - name: Test dfu
- run: |
- ./flash.sh dfu.elf
- while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
- dfu-util -d cafe -a 0 -U dfu0
- dfu-util -d cafe -a 1 -U dfu1
- grep "TinyUSB DFU! - Partition 0" dfu0
- grep "TinyUSB DFU! - Partition 1" dfu1
-
- - name: Test dfu_runtime
- run: |
- ./flash.sh dfu_runtime.elf
- while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done
-
- # ---------------------------------------
- # Hardware in the loop (HIL)
# Current self-hosted instance is running on an EPYC 7232 server hosted by HiFiPhile user
# - STM32L412 Nucleo with on-board jlink as ttyACM0
# ---------------------------------------
diff --git a/.github/workflows/build_esp.yml b/.github/workflows/build_esp.yml
index 0a6815ea2..29585cb36 100644
--- a/.github/workflows/build_esp.yml
+++ b/.github/workflows/build_esp.yml
@@ -1,6 +1,7 @@
name: Build ESP
on:
+ workflow_dispatch:
push:
paths:
- 'src/**'
diff --git a/.github/workflows/build_iar.yml b/.github/workflows/build_iar.yml
index a5d24892f..83e81164a 100644
--- a/.github/workflows/build_iar.yml
+++ b/.github/workflows/build_iar.yml
@@ -1,6 +1,7 @@
name: Build IAR
on:
+ workflow_dispatch:
push:
paths:
- 'src/**'
@@ -22,7 +23,7 @@ concurrency:
cancel-in-progress: true
jobs:
- build-arm:
+ makefile:
runs-on: [self-hosted, Linux, X64, hifiphile]
strategy:
fail-fast: false
@@ -43,7 +44,33 @@ jobs:
uses: actions/checkout@v3
- name: Get Dependencies
- run: python3 tools/get_family_deps.py ${{ matrix.family }}
+ run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }} CC=iccarm
+
+ cmake:
+ runs-on: [self-hosted, Linux, X64, hifiphile]
+ strategy:
+ fail-fast: false
+ matrix:
+ family:
+ # Alphabetical order
+ # Note: bundle multiple families into a matrix since there is only one self-hosted instance can
+ # run IAR build. Too many matrix can hurt due to setup/teardown overhead.
+ - 'stm32g0 stm32g4'
+ steps:
+ - name: Clean workspace
+ run: |
+ echo "Cleaning up previous run"
+ rm -rf "${{ github.workspace }}"
+ mkdir -p "${{ github.workspace }}"
+
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v3
+
+ - name: Get Dependencies
+ run: python3 tools/get_deps.py ${{ matrix.family }}
+
+ - name: Build
+ run: python3 tools/build_cmake.py ${{ matrix.family }} -DTOOLCHAIN=iccarm
diff --git a/.github/workflows/build_msp430.yml b/.github/workflows/build_msp430.yml
index 7cb60dceb..c62056940 100644
--- a/.github/workflows/build_msp430.yml
+++ b/.github/workflows/build_msp430.yml
@@ -1,6 +1,7 @@
name: Build MSP430
on:
+ workflow_dispatch:
push:
paths:
- 'src/**'
@@ -67,7 +68,7 @@ jobs:
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
- name: Get Dependencies
- run: python3 tools/get_family_deps.py ${{ matrix.family }}
+ run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml
index ffdeedb71..66b98a71b 100644
--- a/.github/workflows/build_renesas.yml
+++ b/.github/workflows/build_renesas.yml
@@ -1,6 +1,7 @@
name: Build Renesas
on:
+ workflow_dispatch:
push:
paths:
- 'src/**'
@@ -67,7 +68,7 @@ jobs:
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
- name: Get Dependencies
- run: python3 tools/get_family_deps.py ${{ matrix.family }}
+ run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
diff --git a/.github/workflows/build_riscv.yml b/.github/workflows/build_riscv.yml
index 87c7b522e..8ec549072 100644
--- a/.github/workflows/build_riscv.yml
+++ b/.github/workflows/build_riscv.yml
@@ -1,6 +1,7 @@
name: Build RISC-V
on:
+ workflow_dispatch:
push:
paths:
- 'src/**'
@@ -68,7 +69,7 @@ jobs:
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
- name: Get Dependencies
- run: python3 tools/get_family_deps.py ${{ matrix.family }}
+ run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
diff --git a/.github/workflows/build_win_mac.yml b/.github/workflows/build_win_mac.yml
index 4b743a686..45fc62f78 100644
--- a/.github/workflows/build_win_mac.yml
+++ b/.github/workflows/build_win_mac.yml
@@ -1,6 +1,7 @@
name: Build Windows/MacOS
on:
+ workflow_dispatch:
push:
paths:
- 'src/**'
diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml
index 7314fd9e6..4c4b12a6b 100644
--- a/.github/workflows/cifuzz.yml
+++ b/.github/workflows/cifuzz.yml
@@ -1,5 +1,6 @@
name: CIFuzz
on:
+ workflow_dispatch:
pull_request:
branches:
- master
diff --git a/.github/workflows/cmake_arm.yml b/.github/workflows/cmake_arm.yml
new file mode 100644
index 000000000..2ca8e32f5
--- /dev/null
+++ b/.github/workflows/cmake_arm.yml
@@ -0,0 +1,151 @@
+name: CMake ARM
+
+on:
+ workflow_dispatch:
+ push:
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+ - '.github/workflows/cmake_arm.yml'
+ pull_request:
+ branches: [ master ]
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+ - '.github/workflows/cmake_arm.yml'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+jobs:
+ # ---------------------------------------
+ # Build ARM family
+ # ---------------------------------------
+ build-arm:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ family:
+ # Alphabetical order
+ - 'lpc18'
+ - 'mcx'
+ - 'imxrt'
+ - 'rp2040'
+ - 'stm32g0'
+ - 'stm32g4'
+ steps:
+ - name: Setup Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
+
+ - name: Install ARM GCC
+ uses: carlosperate/arm-none-eabi-gcc-action@v1
+ with:
+ release: '11.2-2022.02'
+
+ - name: Install Ninja
+ run: sudo apt install -y ninja-build
+
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v3
+
+ - name: Checkout pico-sdk for rp2040
+ if: matrix.family == 'rp2040'
+ uses: actions/checkout@v3
+ with:
+ repository: raspberrypi/pico-sdk
+ ref: develop
+ path: pico-sdk
+
+ - name: Get Dependencies
+ run: python3 tools/get_deps.py ${{ matrix.family }}
+
+ - name: Build
+ run: python tools/build_cmake.py ${{ matrix.family }}
+ env:
+ # for rp2040, there is no harm if defined for other families
+ PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
+
+ # Upload binaries for hardware test with self-hosted
+ - name: Prepare rp2040 Artifacts
+ if: contains(matrix.family, 'rp2040') && github.repository_owner == 'hathach'
+ working-directory: ${{github.workspace}}/cmake-build/cmake-build-raspberry_pi_pico
+ run: |
+ find device/ -name "*.elf" -exec mv {} ../../ \;
+ # find host/ -name "*.elf" -exec mv {} ../../ \;
+ # find dual/ -name "*.elf" -exec mv {} ../../ \;
+
+ - name: Upload Artifacts for rp2040
+ if: contains(matrix.family,'rp2040') && github.repository_owner == 'hathach'
+ uses: actions/upload-artifact@v3
+ with:
+ name: rp2040
+ path: |
+ *.elf
+
+ # ---------------------------------------
+ # Hardware in the loop (HIL)
+ # Current self-hosted instance is running on an RPI4 with
+ # - pico + pico-probe connected via USB
+ # - pico-probe is /dev/ttyACM0
+ # ---------------------------------------
+ hw-rp2040-test:
+ # run only with hathach's commit due to limited resource on RPI4
+ if: github.repository_owner == 'hathach'
+ needs: build-arm
+ runs-on: [self-hosted, Linux, ARM64, rp2040]
+
+ steps:
+ - name: Clean workspace
+ run: |
+ echo "Cleaning up previous run"
+ rm -rf "${{ github.workspace }}"
+ mkdir -p "${{ github.workspace }}"
+
+ - name: Download rp2040 Artifacts
+ uses: actions/download-artifact@v3
+ with:
+ name: rp2040
+
+ - name: Create flash.sh
+ run: |
+ echo > flash.sh 'cmdout=$(openocd -f "interface/cmsis-dap.cfg" -f "target/rp2040.cfg" -c "adapter speed 5000" -c "program $1 reset exit")'
+ echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
+ chmod +x flash.sh
+
+ - name: Test cdc_dual_ports
+ run: |
+ ./flash.sh cdc_dual_ports.elf
+ while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
+ test -e /dev/ttyACM1 && echo "ttyACM1 exists"
+ test -e /dev/ttyACM2 && echo "ttyACM2 exists"
+
+ - name: Test cdc_msc
+ run: |
+ ./flash.sh cdc_msc.elf
+ readme='/media/pi/TinyUSB MSC/README.TXT'
+ while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
+ test -e /dev/ttyACM1 && echo "ttyACM1 exists"
+ test -f "$readme" && echo "$readme exists"
+ cat "$readme"
+
+ - name: Test dfu
+ run: |
+ ./flash.sh dfu.elf
+ while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
+ dfu-util -d cafe -a 0 -U dfu0
+ dfu-util -d cafe -a 1 -U dfu1
+ grep "TinyUSB DFU! - Partition 0" dfu0
+ grep "TinyUSB DFU! - Partition 1" dfu1
+
+ - name: Test dfu_runtime
+ run: |
+ ./flash.sh dfu_runtime.elf
+ while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
index ab416bc52..f984954d9 100644
--- a/.github/workflows/pre-commit.yml
+++ b/.github/workflows/pre-commit.yml
@@ -1,6 +1,7 @@
name: pre-commit
on:
+ workflow_dispatch:
push:
pull_request:
branches: [ master ]
diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.yml
index 86c699dac..33e3db859 100644
--- a/.github/workflows/trigger.yml
+++ b/.github/workflows/trigger.yml
@@ -1,6 +1,7 @@
name: Trigger Repos
on:
+ workflow_dispatch:
push:
branches: master
release: