summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml87
1 files changed, 40 insertions, 47 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index fde9400a7..547763bd8 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -51,7 +51,6 @@ jobs:
# Build CMake
# ---------------------------------------
cmake:
- # if: false
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
@@ -60,55 +59,44 @@ jobs:
toolchain:
# - 'arm-clang' is built by circle-ci in PR
- 'aarch64-gcc'
+ - 'arm-gcc'
- 'msp430-gcc'
- 'riscv-gcc'
with:
build-system: 'cmake'
toolchain: ${{ matrix.toolchain }}
- build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
- one-per-family: ${{ github.event_name != 'pull_request' }}
-
- # ---------------------------------------
- # Build CMake arm-gcc
- # only build with push, for PR: all board is built by circle-ci
- # ---------------------------------------
- cmake-arm-gcc:
- if: github.event_name == 'push'
- needs: set-matrix
- uses: ./.github/workflows/build_util.yml
- with:
- build-system: 'cmake'
- toolchain: 'arm-gcc'
- build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['arm-gcc'].family) }}
- one-per-family: true
+ build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain]) }}
+ one-per-family: ${{ github.event_name == 'push' }}
# ---------------------------------------
- # Build Make
+ # Build Make (built by circle-ci in PR, only build on push here)
# ---------------------------------------
make:
- # if: false
+ if: github.event_name == 'push'
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
matrix:
toolchain:
- # 'arm-clang' would be built by circle-ci
- - 'aarch64-gcc'
+ # 'arm-clang'
- 'arm-gcc'
+ - 'aarch64-gcc'
- 'msp430-gcc'
- 'riscv-gcc'
- 'rx-gcc'
+ - 'esp-idf' # build-system is ignored
with:
build-system: 'make'
toolchain: ${{ matrix.toolchain }}
- build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
- one-per-family: ${{ github.event_name != 'pull_request' }}
+ build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain]) }}
+ one-per-family: true
# ---------------------------------------
# Build Make on Windows/MacOS
# ---------------------------------------
make-os:
+ if: github.event_name == 'pull_request'
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
@@ -122,33 +110,17 @@ jobs:
one-per-family: true
# ---------------------------------------
- # Build Espressif
- # ---------------------------------------
- espressif:
- # if: false
- uses: ./.github/workflows/build_util.yml
- strategy:
- fail-fast: false
- matrix:
- board:
- - 'espressif_kaluga_1'
- - 'espressif_s3_devkitm'
- with:
- build-system: 'cmake'
- toolchain: 'esp-idf'
- toolchain_version: 'v5.1.1'
- build-args: '["-b${{ matrix.board }}"]'
-
- # ---------------------------------------
# Build IAR on HFP self-hosted
+ # Since IAR Token secret is not passed to forked PR, only build on PR from the same repo
# ---------------------------------------
arm-iar:
- # if: false
- if: github.repository_owner == 'hathach'
+ if: github.repository_owner == 'hathach' && github.event_name == 'push'
needs: set-matrix
runs-on: [self-hosted, Linux, X64, hifiphile]
env:
- BUILD_ARGS: ${{ join(fromJSON(needs.set-matrix.outputs.json)['arm-iar'].family, ' ') }}
+ BUILD_ARGS: ${{ join(fromJSON(needs.set-matrix.outputs.json)['arm-iar'], ' ') }}
+ IAR_LMS_CLOUD_URL: ${{ vars.IAR_LMS_CLOUD_URL }}
+ IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
steps:
- name: Clean workspace
run: |
@@ -156,6 +128,11 @@ jobs:
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
+ - name: Toolchain version
+ run: |
+ echo IAR_LMS_CLOUD_URL=$IAR_LMS_CLOUD_URL
+ iccarm --version
+
- name: Checkout TinyUSB
uses: actions/checkout@v4
@@ -165,7 +142,23 @@ jobs:
- name: Build
run: python3 tools/build.py --one-per-family --toolchain iar $BUILD_ARGS
- - name: Test on actual hardware (hardware in the loop)
- if: github.event_name == 'pull_request'
+ # ---------------------------------------
+ # Zephyr
+ # ---------------------------------------
+ zephyr:
+ if: github.event_name == 'push'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v4
+
+ - name: Setup Zephyr project
+ uses: zephyrproject-rtos/action-zephyr-setup@v1
+ with:
+ app-path: examples
+ toolchains: arm-zephyr-eabi
+
+ - name: Build
run: |
- python3 test/hil/hil_test.py hfp.json
+ west build -b pca10056 -d examples/device/cdc_msc/build examples/device/cdc_msc -- -DRTOS=zephyr
+ west build -b pca10056 -d examples/device/msc_dual_lun/build examples/device/msc_dual_lun -- -DRTOS=zephyr