2019-12-27 21:39:44 +07:00
|
|
|
name: Build
|
2019-12-27 16:34:25 +07:00
|
|
|
|
|
|
|
on: [pull_request, push]
|
|
|
|
|
|
|
|
jobs:
|
2019-12-27 20:58:37 +07:00
|
|
|
unit-test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Setup Ruby
|
|
|
|
uses: actions/setup-ruby@v1.0.0
|
|
|
|
|
|
|
|
- name: Checkout TinyUSB
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Unit Tests
|
|
|
|
run: |
|
|
|
|
# Install Ceedling
|
|
|
|
gem install ceedling
|
|
|
|
cd test
|
|
|
|
ceedling test:all
|
|
|
|
|
2019-12-27 16:34:25 +07:00
|
|
|
build:
|
2019-12-27 21:03:40 +07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2020-03-09 15:54:16 +07:00
|
|
|
example: ['board_test', 'cdc_dual_ports', 'cdc_msc', 'dfu_rt', 'hid_composite', 'hid_generic_inout',
|
2020-03-09 23:05:22 +07:00
|
|
|
'midi_test', 'msc_dual_lun', 'net_lwip_webserver', 'usbtmc', 'webusb_serial']
|
2019-12-27 16:34:25 +07:00
|
|
|
steps:
|
2019-12-27 20:29:25 +07:00
|
|
|
- name: Setup Python
|
2019-12-27 16:55:13 +07:00
|
|
|
uses: actions/setup-python@v1
|
2019-12-27 20:58:37 +07:00
|
|
|
|
2019-12-27 20:29:25 +07:00
|
|
|
- name: Setup Node.js
|
2019-12-27 17:05:57 +07:00
|
|
|
uses: actions/setup-node@v1.1.0
|
2019-12-27 20:58:37 +07:00
|
|
|
|
2019-12-27 20:29:25 +07:00
|
|
|
- name: Install Toolchains
|
2019-12-27 16:55:13 +07:00
|
|
|
run: |
|
2019-12-27 17:05:57 +07:00
|
|
|
npm install --global xpm
|
2019-12-27 18:01:14 +07:00
|
|
|
xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest
|
2019-12-27 17:05:57 +07:00
|
|
|
xpm install --global @xpack-dev-tools/riscv-none-embed-gcc@latest
|
2019-12-28 15:55:18 +07:00
|
|
|
echo "::add-path::`echo $HOME/opt/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin`"
|
2019-12-28 16:11:10 +07:00
|
|
|
echo "::add-path::`echo $HOME/opt/xPacks/@xpack-dev-tools/riscv-none-embed-gcc/*/.content/bin`"
|
2019-12-28 15:49:38 +07:00
|
|
|
|
2019-12-27 20:53:55 +07:00
|
|
|
- name: Checkout TinyUSB
|
2019-12-27 20:49:54 +07:00
|
|
|
uses: actions/checkout@v2
|
2019-12-27 20:53:55 +07:00
|
|
|
|
2019-12-27 20:49:54 +07:00
|
|
|
- name: Checkout submodules
|
|
|
|
shell: bash
|
|
|
|
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
|
2019-12-27 20:53:55 +07:00
|
|
|
|
2019-12-27 20:33:09 +07:00
|
|
|
- name: Build
|
2019-12-28 15:03:25 +07:00
|
|
|
run: python3 tools/build_all.py ${{ matrix.example }}
|
2020-01-09 21:31:01 +07:00
|
|
|
|