diff options
| author | Ha Thach <[email protected]> | 2019-12-27 21:23:19 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-12-27 21:23:19 +0700 |
| commit | eb6a965cf57979f086e75e686ce2704de80414d0 (patch) | |
| tree | 08ec87e4c07159707ed4a17a0bb41ea441fad355 | |
| parent | dda4c9a94b509238faa7b5ab5b9464c1d2e63ff0 (diff) | |
| parent | 2b6b856d7c0ba51cb1b3c1467c33c7527fb8c47e (diff) | |
Merge pull request #250 from hathach/github-action
migrate to github action for CI/CD
| -rw-r--r-- | .github/workflows/build.yml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..e0fdb93d1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,59 @@ +name: TinyUSB CI + +on: [pull_request, push] + +jobs: + unit-test: + runs-on: ubuntu-latest + steps: + - name: Setup Ruby + uses: actions/[email protected] + + - name: Checkout TinyUSB + uses: actions/checkout@v2 + + - name: Unit Tests + run: | + # Install Ceedling + gem install ceedling + cd test + ceedling test:all + + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + example: ['board_test', 'cdc_msc', 'dfu_rt', 'hid_composite', 'hid_generic_inout', 'midi_test', 'msc_dual_lun', 'usbtmc', 'webusb_serial'] + steps: + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.5 + + - 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 + export PATH=$PATH:`echo $HOME/opt/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin`:`echo $HOME/opt/xPacks/@xpack-dev-tools/riscv-none-embed-gcc/*/.content/bin` + arm-none-eabi-gcc --version + riscv-none-embed-gcc --version + + - name: Checkout TinyUSB + uses: actions/checkout@v2 + + - 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 + + - name: Build + run: | + export PATH=$PATH:`echo $HOME/opt/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin`:`echo $HOME/opt/xPacks/@xpack-dev-tools/riscv-none-embed-gcc/*/.content/bin` + python3 tools/build_all.py ${{ matrix.example }} |
