summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-01-23 23:28:35 +0700
committerGitHub <[email protected]>2021-01-23 23:28:35 +0700
commit469ca2f1559800f4b1eabc860336ff33ed118718 (patch)
treea6b68799030fd5cdc41881ebdbd259a8ee97b1e6 /.github/workflows
parentedd91d28f5afa175d7f52ec1bf1845ff29aabab9 (diff)
parente6ce18b01990d5e06f12e0aeb57d53ce365ba7b7 (diff)
Merge pull request #600 from hathach/refactor-bsp
Refactor bsp
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml94
1 files changed, 70 insertions, 24 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e5b8cd6ae..f1732027f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -20,8 +20,50 @@ jobs:
cd test
ceedling test:all
- # Build most of the ports
- build:
+ # build all example for each family
+ build-family:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ family:
+ - 'imxrt'
+ - 'nrf'
+ #- 'rp2040'
+ - 'samd21'
+ - 'samd51'
+ - 'stm32f4'
+ - 'stm32f7'
+ steps:
+ - name: Setup Python
+ uses: actions/setup-python@v2
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v1
+
+ - name: Install Toolchains
+ run: |
+ # ARM GCC from xpack
+ npm install --global xpm
+ xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest
+ echo `echo $HOME/opt/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin` >> $GITHUB_PATH
+
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v2
+ with:
+ submodules: 'true'
+
+ - name: Checkout Sub-Submodules
+ run: |
+ # some submodule has it own submodules that need to be fetched as well
+ git submodule update --init --recursive hw/mcu/microchip
+ git submodule update --init --recursive lib/FreeRTOS
+
+ - 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
@@ -40,28 +82,36 @@ jobs:
- '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@v1
+ uses: actions/setup-python@v2
- name: Setup Node.js
uses: actions/setup-node@v1
- name: Cache MSP430 Toolchain
+ uses: actions/cache@v2
id: cache-msp430
- uses: actions/cache@v1
with:
path: /tmp/dl/
# Increment gcc version number at end when updating downloads
- key: msp430-${{ runner.os }}-9.2.0.50
+ key: ${{ runner.os }}-msp430-9.2.0.50
- - name: Install Toolchains
+ - name: Install MSP430 Toolchain
+ if: steps.cache-msp430.outputs.cache-hit != 'true'
env:
- MSP430GCC_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
+ MSP430GCC_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
+ run: |
+ mkdir -p /tmp/dl/
+ [ -f "/tmp/dl/msp430-gcc.tar.bz2" ] || wget --progress=dot:mega $MSP430GCC_URL -O /tmp/dl/msp430-gcc.tar.bz2
+ tar -C $HOME -xaf /tmp/dl/msp430-gcc.tar.bz2
+
+ - name: Install Toolchains
run: |
# ARM & RISC-V GCC from xpack
npm install --global xpm
@@ -71,39 +121,35 @@ jobs:
echo `echo $HOME/opt/xPacks/@xpack-dev-tools/riscv-none-embed-gcc/*/.content/bin` >> $GITHUB_PATH
# TI MSP430 GCC
- mkdir -p /tmp/dl/
- [ -f "/tmp/dl/msp430-gcc.tar.bz2" ] || wget --progress=dot:mega $MSP430GCC_URL -O /tmp/dl/msp430-gcc.tar.bz2
- tar -C $HOME -xaf /tmp/dl/msp430-gcc.tar.bz2
echo `echo $HOME/msp430-gcc-*_linux64/bin` >> $GITHUB_PATH
- 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'
+ submodules: 'true'
- - name: Checkout Submodules
+ - name: Checkout Sub-Submodules
run: |
- git submodule sync --recursive
- # Special case LWIP since GNU's Savannah can't do shallow checkout of non-tagged commits
- git submodule update --init --recursive lib/lwip
- git submodule update --init --recursive --depth 1
+ # some submodule has it own submodules that need to be fetched as well
+ git submodule update --init --recursive hw/mcu/microchip
+ git submodule update --init --recursive lib/FreeRTOS
- name: Build
- run: |
- python3 tools/build_all.py ${{ matrix.example }}
+ run: python3 tools/build_board.py ${{ matrix.example }}
- # Build ESP32S
- build-esp32s:
+ # Build ESP32S2
+ build-esp32s2:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- example: ['board_test', 'cdc_msc_freertos', 'hid_composite_freertos']
+ board:
+ - 'espressif_kaluga_1'
+ - 'espressif_saola_1'
steps:
- name: Setup Python
- uses: actions/setup-python@v1
+ uses: actions/setup-python@v2
- name: Pull ESP-IDF docker
run: docker pull espressif/idf:latest
@@ -114,4 +160,4 @@ jobs:
submodules: 'false'
- name: Build
- run: docker run --rm -v $PWD:/project -w /project espressif/idf:latest python3 tools/build_esp32s.py ${{ matrix.example }}
+ run: docker run --rm -v $PWD:/project -w /project espressif/idf:latest python3 tools/build_esp32s2.py ${{ matrix.board }}