summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-07-02 14:41:16 +0700
committerhathach <[email protected]>2025-07-02 14:41:16 +0700
commit4579b4f8255a5ed06e276978474fab7c7567445a (patch)
tree5a5abacd36b82eee0d96d4d9d95daf0d1f8f757a /.github/workflows
parenta42184b6fec468e8524b1f1152bed4285a79cfc7 (diff)
add doc for building examples with cmake build system
change ci matrix build: - github build make/cmake one per family on push only - circicle do full cmake build for all toolchain (missing rx-gcc)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml63
1 files changed, 27 insertions, 36 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index fe2ed61c9..58963013b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -36,11 +36,6 @@ env:
HIL_JSON: test/hil/tinyusb.json
jobs:
- # ---------------------------------------
- #
- # Build
- #
- # ---------------------------------------
set-matrix:
runs-on: ubuntu-latest
outputs:
@@ -63,28 +58,31 @@ jobs:
echo "hil_matrix=$HIL_MATRIX_JSON" >> $GITHUB_OUTPUT
# ---------------------------------------
- # Build CMake
+ # Build CMake: only build on push with one-per-family.
+ # Full built is done by CircleCI in PR
# ---------------------------------------
cmake:
+ if: github.event_name == 'push'
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
matrix:
toolchain:
- # - 'arm-clang' is built by circle-ci in PR
- 'aarch64-gcc'
+ - 'arm-clang'
- 'arm-gcc'
+ - 'esp-idf'
- 'msp430-gcc'
- 'riscv-gcc'
with:
build-system: 'cmake'
toolchain: ${{ matrix.toolchain }}
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain]) }}
- one-per-family: ${{ github.event_name == 'push' }}
+ one-per-family: true
# ---------------------------------------
- # Build Make (built by circle-ci in PR, only build on push here)
+ # Build Make: only build on push with one-per-family
# ---------------------------------------
make:
if: github.event_name == 'push'
@@ -94,13 +92,12 @@ jobs:
fail-fast: false
matrix:
toolchain:
- # 'arm-clang'
- - 'arm-gcc'
- 'aarch64-gcc'
+ - 'arm-clang'
+ - 'arm-gcc'
- 'msp430-gcc'
- 'riscv-gcc'
- 'rx-gcc'
- - 'esp-idf'
with:
build-system: 'make'
toolchain: ${{ matrix.toolchain }}
@@ -108,30 +105,12 @@ jobs:
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
- matrix:
- os: [windows-latest, macos-latest]
- with:
- os: ${{ matrix.os }}
- build-system: 'make'
- toolchain: 'arm-gcc'
- build-args: '["stm32h7"]'
- one-per-family: true
-
- # ---------------------------------------
# Build IAR
# Since IAR Token secret is not passed to forked PR, only build non-forked PR with make.
# cmake is built by circle-ci. Due to IAR limit capacity, only build oe per family
# ---------------------------------------
arm-iar:
- if: false # disable for now since we got reach capacity limit too often
- #if: github.event_name == 'push' && github.repository_owner == 'hathach'
+ if: github.event_name == 'push' && github.repository_owner == 'hathach'
needs: set-matrix
uses: ./.github/workflows/build_util.yml
secrets: inherit
@@ -147,6 +126,23 @@ jobs:
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
+ matrix:
+ os: [windows-latest, macos-latest]
+ with:
+ os: ${{ matrix.os }}
+ build-system: 'make'
+ toolchain: 'arm-gcc'
+ build-args: '["stm32h7"]'
+ one-per-family: true
+
+ # ---------------------------------------
# Zephyr
# ---------------------------------------
zephyr:
@@ -168,14 +164,9 @@ jobs:
west build -b pca10056 -d examples/device/msc_dual_lun/build examples/device/msc_dual_lun -- -DRTOS=zephyr
# ---------------------------------------
- #
# Hardware in the loop (HIL)
# Run on PR only (hil-tinyusb), hil-hfp only run on non-forked PR
# ---------------------------------------
-
- # ---------------------------------------
- # Build arm-gcc
- # ---------------------------------------
hil-build:
if: |
github.repository_owner == 'hathach' &&