summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorMengsk <[email protected]>2022-11-07 12:47:41 +0100
committerMengsk <[email protected]>2022-11-07 12:47:41 +0100
commit9d3d8fd5b0788b811ad283d10d37dfd1b1005224 (patch)
treef66b39fe968cc1a6e46e3074bbda9b907064bc15 /.github/workflows
parent1eae139aa94130a63ecc4725852cb69c02566c82 (diff)
parente434a1dc0584e841da1ae4ff525bbe81a0f5514b (diff)
Merge branch 'master' of https://github.com/hathach/tinyusb into bsp_412
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build_aarch64.yml13
-rw-r--r--.github/workflows/build_arm.yml155
-rw-r--r--.github/workflows/build_esp.yml18
-rw-r--r--.github/workflows/build_msp430.yml16
-rw-r--r--.github/workflows/build_renesas.yml18
-rw-r--r--.github/workflows/build_riscv.yml18
-rw-r--r--.github/workflows/trigger.yml6
7 files changed, 166 insertions, 78 deletions
diff --git a/.github/workflows/build_aarch64.yml b/.github/workflows/build_aarch64.yml
index 0cc7a5de1..18989a5e9 100644
--- a/.github/workflows/build_aarch64.yml
+++ b/.github/workflows/build_aarch64.yml
@@ -18,19 +18,21 @@ jobs:
matrix:
family:
# Alphabetical order
- - 'raspberrypi4'
+ - 'broadcom_64bit'
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel
- name: Checkout hathach/linkermap
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
@@ -55,6 +57,9 @@ jobs:
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+ - name: Get Dependencies
+ run: python3 tools/get_dependencies.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 dc4d9fcfb..53f73a48f 100644
--- a/.github/workflows/build_arm.yml
+++ b/.github/workflows/build_arm.yml
@@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Ruby
- uses: actions/setup-ruby@v1
+ uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Unit Tests
run: |
@@ -39,6 +39,7 @@ jobs:
matrix:
family:
# Alphabetical order
+ - 'broadcom_32bit'
- 'imxrt'
- 'lpc15'
- 'lpc18'
@@ -56,51 +57,43 @@ jobs:
- 'stm32f1'
- 'stm32f4'
- 'stm32f7'
+ - 'stm32g4'
- 'stm32h7'
- 'stm32l4'
+ - 'stm32wb'
- 'tm4c123'
- 'xmc4000'
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ 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: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel
- name: Checkout hathach/linkermap
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
- - name: Checkout pico-sdk
+ - name: Checkout pico-sdk for rp2040
if: matrix.family == 'rp2040'
run: |
git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk
echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk
- - name: Set Toolchain URL
- run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz
-
- - name: Cache Toolchain
- uses: actions/cache@v2
- id: cache-toolchain
- with:
- path: ~/cache/
- key: ${{ runner.os }}-21-03-04-${{ env.TOOLCHAIN_URL }}
-
- - name: Install Toolchain
- if: steps.cache-toolchain.outputs.cache-hit != 'true'
- run: |
- mkdir -p ~/cache/toolchain
- wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz
- tar -C ~/cache/toolchain -xaf toolchain.tar.gz
-
- - name: Set Toolchain Path
- run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+ - name: Get Dependencies
+ run: python3 tools/get_dependencies.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
@@ -108,13 +101,28 @@ jobs:
- name: Linker Map
run: |
pip install linkermap/
- for ex in `ls -d examples/device/*/`; do \
- find ${ex} -name *.map -print -quit | \
- xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
+ # find -quit to only print linkermap of 1 board per example
+ for ex in `ls -d examples/*/*/`
+ do
+ find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done
+ # Following steps are for Hardware Test with self-hosted
+
+ - name: Prepare Artifacts
+ if: matrix.family == 'rp2040' && github.repository_owner == 'hathach'
+ run: find examples/ -name "*.elf" -exec mv {} . \;
+
+ - name: Upload Artifacts for Hardware Test
+ if: matrix.family == 'rp2040' && github.repository_owner == 'hathach'
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ matrix.family }}
+ path: |
+ *.elf
+
# ---------------------------------------
- # Build all no-family (opharned) boards
+ # Build all no-family (orphaned) boards
# ---------------------------------------
build-board:
runs-on: ubuntu-latest
@@ -131,33 +139,86 @@ jobs:
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ 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: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
- - name: Set Toolchain URL
- run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz
+ - name: Build
+ run: python3 tools/build_board.py ${{ matrix.example }}
- - name: Cache Toolchain
- uses: actions/cache@v2
- id: cache-toolchain
+ # ---------------------------------------
+ # 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-test:
+ # Limit the run to only hathach due to limited resource on RPI4
+ if: github.repository_owner == 'hathach'
+ needs: build-arm
+ runs-on: [self-hosted, Linux, ARM64]
+
+ 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:
- path: ~/cache/
- key: ${{ runner.os }}-21-03-04-${{ env.TOOLCHAIN_URL }}
+ name: rp2040
- - name: Install Toolchain
- if: steps.cache-toolchain.outputs.cache-hit != 'true'
+ - name: Create flash.sh
run: |
- mkdir -p ~/cache/toolchain
- wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz
- tar -C ~/cache/toolchain -xaf toolchain.tar.gz
+ touch flash.sh
+ chmod +x flash.sh
+ echo > flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1 reset exit"'
- - name: Set Toolchain Path
- run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+ - name: Test cdc_dual_ports
+ run: |
+ ./flash.sh cdc_dual_ports.elf
+ while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 5 ]; 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 5 ]; 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 5 ]; 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 5 ]; do :; done
+
+# - name: Test hid_boot_interface
+# run: |
+# ./flash.sh hid_boot_interface.elf
+# while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done
- - name: Build
- run: python3 tools/build_board.py ${{ matrix.example }}
diff --git a/.github/workflows/build_esp.yml b/.github/workflows/build_esp.yml
index 15071b178..51d91de49 100644
--- a/.github/workflows/build_esp.yml
+++ b/.github/workflows/build_esp.yml
@@ -18,20 +18,23 @@ jobs:
# ESP32-S2
- 'espressif_saola_1'
# ESP32-S3
- - 'espressif_addax_1'
+ #- 'espressif_s3_devkitm'
+ # S3 compile error with "dangerous relocation: call8: call target out of range: memcpy"
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
- name: Pull ESP-IDF docker
run: docker pull espressif/idf:latest
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout hathach/linkermap
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
@@ -42,7 +45,8 @@ jobs:
- name: Linker Map
run: |
pip install linkermap/
- for ex in `ls -d examples/device/*/`; do \
- find ${ex} -maxdepth 3 -name *.map -print -quit | \
- xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
+ # find -quit to only print linkermap of 1 board per example
+ for ex in `ls -d examples/device/*/`
+ do
+ find ${ex} -maxdepth 3 -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done
diff --git a/.github/workflows/build_msp430.yml b/.github/workflows/build_msp430.yml
index 98dc36cd9..b43d9e740 100644
--- a/.github/workflows/build_msp430.yml
+++ b/.github/workflows/build_msp430.yml
@@ -18,16 +18,16 @@ jobs:
- 'msp430'
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
- name: Checkout hathach/linkermap
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
@@ -52,13 +52,17 @@ jobs:
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+ - name: Get Dependencies
+ run: python3 tools/get_dependencies.py ${{ matrix.family }}
+
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
- name: Linker Map
run: |
pip install linkermap/
- for ex in `ls -d examples/device/*/`; do \
- find ${ex} -name *.map -print -quit | \
- xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
+ # find -quit to only print linkermap of 1 board per example
+ for ex in `ls -d examples/device/*/`
+ do
+ find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done
diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml
index 6eb042d72..d212708f7 100644
--- a/.github/workflows/build_renesas.yml
+++ b/.github/workflows/build_renesas.yml
@@ -18,16 +18,18 @@ jobs:
- 'rx'
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
- name: Checkout hathach/linkermap
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
@@ -53,13 +55,17 @@ jobs:
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+ - name: Get Dependencies
+ run: python3 tools/get_dependencies.py ${{ matrix.family }}
+
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
- name: Linker Map
run: |
pip install linkermap/
- for ex in `ls -d examples/device/*/`; do \
- find ${ex} -name *.map -print -quit | \
- xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
+ # find -quit to only print linkermap of 1 board per example
+ for ex in `ls -d examples/device/*/`
+ do
+ find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done
diff --git a/.github/workflows/build_riscv.yml b/.github/workflows/build_riscv.yml
index 0c7b2d154..96b8c676b 100644
--- a/.github/workflows/build_riscv.yml
+++ b/.github/workflows/build_riscv.yml
@@ -19,16 +19,18 @@ jobs:
- 'gd32vf103'
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
- name: Checkout hathach/linkermap
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
@@ -53,13 +55,17 @@ jobs:
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+ - name: Get Dependencies
+ run: python3 tools/get_dependencies.py ${{ matrix.family }}
+
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
- name: Linker Map
run: |
pip install linkermap/
- for ex in `ls -d examples/device/*/`; do \
- find ${ex} -name *.map -print -quit | \
- xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
+ # find -quit to only print linkermap of 1 board per example
+ for ex in `ls -d examples/device/*/`
+ do
+ find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done
diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.yml
index 40750a2f9..e434ca238 100644
--- a/.github/workflows/trigger.yml
+++ b/.github/workflows/trigger.yml
@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Push to tinyusb_src
run: |
@@ -55,4 +55,6 @@ jobs:
git push origin ${{ github.event.release.tag_name }}
# Send POST reqwuest to release https://docs.github.com/en/rest/reference/repos#create-a-release
- curl -X POST -H "Authorization: token ${{ secrets.API_TOKEN_GITHUB }}" -H "Accept: application/vnd.github.v3+json" --data '{"tag_name": "${{ github.event.release.tag_name }}", "name": "${{ github.event.release.name }}", "body": "${{ github.event.release.body }}", "draft": ${{ github.event.release.draft }}, "prerelease": ${{ github.event.release.prerelease }}}' https://api.github.com/repos/hathach/tinyusb_src/releases
+ bb={{ github.event.release.body }}
+ bb=${bb//\n/\\\n}
+ curl -X POST -H "Authorization: token ${{ secrets.API_TOKEN_GITHUB }}" -H "Accept: application/vnd.github.v3+json" --data '{"tag_name": "${{ github.event.release.tag_name }}", "name": "${{ github.event.release.name }}", "body": "$bb", "draft": ${{ github.event.release.draft }}, "prerelease": ${{ github.event.release.prerelease }}}' https://api.github.com/repos/hathach/tinyusb_src/releases