diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-08-28 12:50:18 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-08-28 12:50:18 -0400 |
commit | 39a5c822a2a2e798e2e39ff8a98b7af84253026c (patch) | |
tree | fa157c98d3aea0d4f996e4415aa2a7ad1093ac05 /tinyusb/.github/workflows/build.yml | |
parent | c9e00b83bbdcb05058806d915ec4fff3cf4e596f (diff) | |
download | Sensor-Watch-39a5c822a2a2e798e2e39ff8a98b7af84253026c.tar.gz Sensor-Watch-39a5c822a2a2e798e2e39ff8a98b7af84253026c.tar.bz2 Sensor-Watch-39a5c822a2a2e798e2e39ff8a98b7af84253026c.zip |
add tinyusb
Diffstat (limited to 'tinyusb/.github/workflows/build.yml')
-rwxr-xr-x | tinyusb/.github/workflows/build.yml | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/tinyusb/.github/workflows/build.yml b/tinyusb/.github/workflows/build.yml new file mode 100755 index 00000000..8ef19b0a --- /dev/null +++ b/tinyusb/.github/workflows/build.yml @@ -0,0 +1,144 @@ +name: Build ARM + +on: + pull_request: + push: + release: + types: + - created + +jobs: + # --------------------------------------- + # Unit testing with Ceedling + # --------------------------------------- + unit-test: + runs-on: ubuntu-latest + steps: + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: '2.7' + + - name: Checkout TinyUSB + uses: actions/checkout@v2 + + - name: Unit Tests + run: | + # Install Ceedling + gem install ceedling + cd test + ceedling test:all + + # --------------------------------------- + # Build ARM family + # --------------------------------------- + build-arm: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + 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@v2 + + - name: Checkout TinyUSB + uses: actions/checkout@v2 + + - 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: | + 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_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 }} |