summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authornxf58843 <[email protected]>2021-08-23 09:55:04 -0700
committerGitHub <[email protected]>2021-08-23 09:55:04 -0700
commitfb16e80e575a44828f5367f4fb7380162b0354f0 (patch)
treebb965cc935083d99e083667d4f0f1533d50a29f5 /.github
parent616562a48aa1d8ce2f4ca71f6e780a8bec9fb5eb (diff)
parentea902493db49843dcdeca6bfa2b2efe540f44b2f (diff)
Merge pull request #2 from hathach/master
Pulling latest from source
Diffstat (limited to '.github')
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md32
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.yml74
-rw-r--r--.github/ISSUE_TEMPLATE/config.yml4
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.md10
-rw-r--r--.github/ISSUE_TEMPLATE/porting.md17
-rw-r--r--.github/ISSUE_TEMPLATE/question.md10
-rw-r--r--.github/pull_request_template.md5
-rw-r--r--.github/workflows/build.yml144
-rw-r--r--.github/workflows/build_esp.yml35
-rw-r--r--.github/workflows/build_msp430.yml50
-rw-r--r--.github/workflows/build_renesas.yml51
-rw-r--r--.github/workflows/build_riscv.yml51
-rw-r--r--.github/workflows/trigger.yml52
13 files changed, 436 insertions, 99 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index 97903dc36..000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-title: ''
-labels: Bug
-assignees: ''
-
----
-
-**Describe the bug**
-A clear and concise description of what the bug is.
-
-**Set up (please complete the following information):**
- - OS: [e.g. Ubuntu 18.04]
- - Board: [e.g pca10056]
- - Firmware Code: [e.g examples/device/cdc_msc_hid]
-
-**To Reproduce**
-Steps to reproduce the behavior:
-1. Go to '...'
-2. Click on '....'
-3. Scroll down to '....'
-4. See error
-
-**Expected behavior**
-A clear and concise description of what you expected to happen.
-
-**Screenshots**
-If applicable, add screenshots to help explain your problem.
-
-**Additional context**
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 000000000..291b22079
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,74 @@
+name: Bug Report
+description: Report a problem with TinyUSB
+labels: 'Bug 🐞'
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thanks for taking the time to fill out this bug report!
+ It's okay to leave some blank if it doesn't apply to your problem.
+
+ - type: dropdown
+ attributes:
+ label: Operating System
+ options:
+ - Linux
+ - MacOS
+ - RaspberryPi OS
+ - Windows 7
+ - Windows 10
+ - Windows 11
+ - Others
+ validations:
+ required: true
+
+ - type: input
+ attributes:
+ label: Board
+ placeholder: e.g Feather nRF52840 Express
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Firmware
+ placeholder: |
+ e.g examples/device/cdc_msc.
+ If it is custom firmware, please provide links to your minimal sources or as attached files.
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: What happened ?
+ placeholder: A clear and concise description of what the bug is.
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: How to reproduce ?
+ placeholder: |
+ 1. Go to '...'
+ 2. Click on '....'
+ 3. See error
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Debug Log
+ placeholder: |
+ TinyUSB debug log where the issue occurred as attached txt file, best with comments to explain the actual events.
+
+ Note: To enable logging, add `LOG=3` to to the make command if building with stock examples or set `CFG_TUSB_DEBUG=3` in your tusb_config.h.
+ More information can be found at [example's readme](https://github.com/hathach/tinyusb/blob/master/docs/getting_started.md)
+ validations:
+ required: false
+
+ - type: textarea
+ attributes:
+ label: Screenshots
+ description: If applicable, add screenshots to help explain your problem.
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 000000000..735a5ef22
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,4 @@
+contact_links:
+ - name: TinyUSB Discussion
+ url: https://github.com/hathach/tinyusb/discussions
+ about: If you have other questions or need help, post it here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index e74cb57fa..562d3113b 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -1,8 +1,8 @@
---
-name: Feature request
+name: Feature Request
about: Suggest an idea for this project
title: ''
-labels: Feature
+labels: Feature 💡
assignees: ''
---
@@ -12,9 +12,3 @@ A clear and concise description of what the problem is. Ex. I'm always frustrate
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
-
-**Describe alternatives you've considered**
-A clear and concise description of any alternative solutions or features you've considered.
-
-**Additional context**
-Add any other context or screenshots about the feature request here.
diff --git a/.github/ISSUE_TEMPLATE/porting.md b/.github/ISSUE_TEMPLATE/porting.md
deleted file mode 100644
index fc2b2b8d8..000000000
--- a/.github/ISSUE_TEMPLATE/porting.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-name: Porting
-about: Adding a new port for this project
-title: ''
-labels: Porting
-assignees: ''
-
----
-
-**Porting layer**
- - [ ] Device Controller Driver (DCD)
- - [ ] Host Controller Driver (HCD)
- - [ ] Board Supported Package (BSP)
- - [ ] OS Abstraction Layer (OSAL)
-
-**Description**
-A clear and concise description of what you want to happen.
diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md
deleted file mode 100644
index 1de8fb9a4..000000000
--- a/.github/ISSUE_TEMPLATE/question.md
+++ /dev/null
@@ -1,10 +0,0 @@
----
-name: Question
-about: Question for this project
-title: ''
-labels: Q&A
-assignees: ''
-
----
-
-**Here is my question**
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 000000000..aa148eb79
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,5 @@
+**Describe the PR**
+A clear and concise description of what this PR solve.
+
+**Additional context**
+If applicable, add any other context about the PR and/or screenshots here.
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 729222512..8ef19b0a0 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,14 +1,24 @@
-name: Build
+name: Build ARM
-on: [pull_request, push]
+on:
+ pull_request:
+ push:
+ release:
+ types:
+ - created
jobs:
+ # ---------------------------------------
+ # Unit testing with Ceedling
+ # ---------------------------------------
unit-test:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-latest
steps:
- name: Setup Ruby
- uses: actions/[email protected]
-
+ uses: actions/setup-ruby@v1
+ with:
+ ruby-version: '2.7'
+
- name: Checkout TinyUSB
uses: actions/checkout@v2
@@ -19,38 +29,116 @@ jobs:
cd test
ceedling test:all
- build:
+ # ---------------------------------------
+ # Build ARM family
+ # ---------------------------------------
+ build-arm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- example: ['board_test', 'cdc_dual_ports', 'cdc_msc', 'dfu_rt', 'hid_composite',
- 'hid_generic_inout', 'midi_test', 'msc_dual_lun', 'usbtmc', 'webusb_serial']
+ family:
+ # Alphabetical order
+ - 'imxrt'
+ - 'lpc15'
+ - 'lpc18'
+ - 'lpc54'
+ - 'lpc55'
+ - 'nrf'
+ - 'rp2040'
+ - 'samd11'
+ - 'samd21'
+ - 'samd51'
+ - 'saml2x'
+ - 'stm32f0'
+ - 'stm32f1'
+ - 'stm32f4'
+ - 'stm32f7'
+ - 'stm32h7'
steps:
- name: Setup Python
- uses: actions/setup-python@v1
+ uses: actions/setup-python@v2
- - name: Setup Node.js
- uses: actions/[email protected]
-
- - name: Install Toolchains
- run: |
- npm install --global xpm
- xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest
- xpm install --global @xpack-dev-tools/riscv-none-embed-gcc@latest
- echo "::add-path::`echo $HOME/opt/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin`"
- echo "::add-path::`echo $HOME/opt/xPacks/@xpack-dev-tools/riscv-none-embed-gcc/*/.content/bin`"
-
- name: Checkout TinyUSB
uses: actions/checkout@v2
-
- - name: Checkout submodules
- shell: bash
+
+ - name: Checkout common submodules in lib
+ run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel
+
+ - name: Checkout pico-sdk
+ if: matrix.family == 'rp2040'
run: |
- auth_header="$(git config --local --get http.https://github.com/.extraheader)"
- git submodule sync --recursive
- git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive
-
+ 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: Build
- run: python3 tools/build_all.py ${{ matrix.example }}
+ run: python3 tools/build_family.py ${{ matrix.family }}
+ # ---------------------------------------
+ # Build all no-family (opharned) boards
+ # ---------------------------------------
+ build-board:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ example:
+ # Alphabetical order, a group of 4
+ - 'device/audio_test device/board_test device/cdc_dual_ports device/cdc_msc'
+ - 'device/cdc_msc_freertos device/dfu_runtime device/hid_composite device/hid_composite_freertos'
+ - 'device/hid_generic_inout device/hid_multiple_interface device/midi_test device/msc_dual_lun'
+ - 'device/net_lwip_webserver'
+ - 'device/uac2_headset device/usbtmc device/webusb_serial host/cdc_msc_hid'
+
+ steps:
+ - name: Setup Python
+ uses: actions/setup-python@v2
+
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v2
+
+ - 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: 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: Build
+ run: python3 tools/build_board.py ${{ matrix.example }}
diff --git a/.github/workflows/build_esp.yml b/.github/workflows/build_esp.yml
new file mode 100644
index 000000000..25f4e68f8
--- /dev/null
+++ b/.github/workflows/build_esp.yml
@@ -0,0 +1,35 @@
+name: Build ESP
+
+on:
+ pull_request:
+ push:
+ release:
+ types:
+ - created
+
+jobs:
+ build-esp:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ board:
+ # Alphabetical order
+ # ESP32-S2
+ - 'espressif_saola_1'
+ # ESP32-S3
+ # latest IDF does not define USB0 in linker
+ #- 'espressif_addax_1'
+
+ steps:
+ - name: Setup Python
+ uses: actions/setup-python@v2
+
+ - name: Pull ESP-IDF docker
+ run: docker pull espressif/idf:latest
+
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v2
+
+ - name: Build
+ run: docker run --rm -v $PWD:/project -w /project espressif/idf:latest python3 tools/build_esp32sx.py ${{ matrix.board }}
diff --git a/.github/workflows/build_msp430.yml b/.github/workflows/build_msp430.yml
new file mode 100644
index 000000000..ff2ce72c9
--- /dev/null
+++ b/.github/workflows/build_msp430.yml
@@ -0,0 +1,50 @@
+name: Build MSP430
+
+on:
+ pull_request:
+ push:
+ release:
+ types:
+ - created
+
+jobs:
+ build-msp430:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ family:
+ # Alphabetical order
+ - 'msp430'
+ steps:
+ - name: Setup Python
+ uses: actions/setup-python@v2
+
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v2
+
+ - 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=http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2
+
+ - 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.bz2
+ tar -C ~/cache/toolchain -xaf toolchain.tar.bz2
+
+ - name: Set Toolchain Path
+ run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+
+ - name: Build
+ run: python3 tools/build_family.py ${{ matrix.family }}
diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml
new file mode 100644
index 000000000..ee9ba8289
--- /dev/null
+++ b/.github/workflows/build_renesas.yml
@@ -0,0 +1,51 @@
+name: Build Renesas
+
+on:
+ pull_request:
+ push:
+ release:
+ types:
+ - created
+
+jobs:
+ build-rx:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ family:
+ # Alphabetical order
+ - 'rx'
+ steps:
+ - name: Setup Python
+ uses: actions/setup-python@v2
+
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v2
+
+ - 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=http://gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run
+
+ - name: Cache Toolchain
+ uses: actions/cache@v2
+ id: cache-toolchain
+ with:
+ path: ~/cache/
+ key: ${{ runner.os }}-21-03-30-${{ env.TOOLCHAIN_URL }}
+
+ - name: Install Toolchain
+ if: steps.cache-toolchain.outputs.cache-hit != 'true'
+ run: |
+ mkdir -p ~/cache/toolchain/gnurx
+ wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.run
+ chmod +x toolchain.run
+ ./toolchain.run -p ~/cache/toolchain/gnurx -y
+
+ - name: Set Toolchain Path
+ run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+
+ - name: Build
+ run: python3 tools/build_family.py ${{ matrix.family }}
diff --git a/.github/workflows/build_riscv.yml b/.github/workflows/build_riscv.yml
new file mode 100644
index 000000000..78510751c
--- /dev/null
+++ b/.github/workflows/build_riscv.yml
@@ -0,0 +1,51 @@
+name: Build RISC-V
+
+on:
+ pull_request:
+ push:
+ release:
+ types:
+ - created
+
+jobs:
+ build-riscv:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ family:
+ # Alphabetical order
+ - 'fomu'
+ - 'gd32vf103'
+ steps:
+ - name: Setup Python
+ uses: actions/setup-python@v2
+
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v2
+
+ - 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/riscv-none-embed-gcc-xpack/releases/download/v10.1.0-1.1/xpack-riscv-none-embed-gcc-10.1.0-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: Build
+ run: python3 tools/build_family.py ${{ matrix.family }}
diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.yml
index a7ef1341d..40750a2f9 100644
--- a/.github/workflows/trigger.yml
+++ b/.github/workflows/trigger.yml
@@ -3,12 +3,56 @@ name: Trigger Repos
on:
push:
branches: master
-
+ release:
+ types:
+ - created
+
jobs:
- trigger:
+ trigger-mynewt:
+ if: github.repository == 'hathach/tinyusb'
runs-on: ubuntu-latest
steps:
- - name: mynewt-tinyusb-example
+ - name: Trigger mynewt-tinyusb-example
shell: bash
run: |
- curl -X POST -H "Authorization: token ${{ secrets.GH_REPO_TOKEN }}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" --data '{"event_type": "rebuild"}' https://api.github.com/repos/hathach/mynewt-tinyusb-example/dispatches
+ curl -X POST -H "Authorization: token ${{ secrets.API_TOKEN_GITHUB }}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" --data '{"event_type": "rebuild"}' https://api.github.com/repos/hathach/mynewt-tinyusb-example/dispatches
+
+ mirror-tinyusb-src:
+ if: github.repository == 'hathach/tinyusb'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Push to tinyusb_src
+ run: |
+ # clone tinyusb_src with PAT
+ git config --global user.email "[email protected]"
+ git config --global user.name "hathach"
+ git clone --depth 1 --single-branch --branch main "https://${{ secrets.API_TOKEN_GITHUB }}@github.com/hathach/tinyusb_src.git" tinyusb_src
+
+ # Remove all files
+ rm -rf tinyusb_src/*
+
+ # Copy src and other files
+ cp -r src tinyusb_src/
+ cp LICENSE tinyusb_src/
+ cd tinyusb_src
+
+ # Commit if there is changes
+ if [ -n "$(git status --porcelain)" ]; then
+ git add .
+ git commit --message "Update from https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
+ git push
+ fi
+
+ - name: Create tinyusb_src Release
+ if: ${{ github.event_name == 'release' }}
+ run: |
+ # Push tag
+ cd tinyusb_src
+ git tag ${{ github.event.release.tag_name }}
+ 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