summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-02-11 16:34:28 +0700
committerhathach <[email protected]>2026-02-11 16:46:27 +0700
commit2e8e33f28494307276d7a5417569461fe6584b80 (patch)
treec6163fcd2d0fc61471a9dd44cb2af76a4a8248e1 /.github/workflows/build.yml
parent07a3b3b34f67b12cbbe7865923341d9746a1e8fc (diff)
add build target argument to improve flexibility of build scripts and workflows
membrowse-upload upload with --identical if elf file does not exist
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml23
1 files changed, 13 insertions, 10 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2b0c38c4f..412d52bb8 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -47,8 +47,6 @@ jobs:
- '.github/workflows/ci_set_matrix.py'
set-matrix:
- needs: [ check-paths ]
- if: needs.check-paths.outputs.code_changed == 'true'
runs-on: ubuntu-latest
outputs:
json: ${{ steps.set-matrix-json.outputs.matrix }}
@@ -75,7 +73,7 @@ jobs:
# For Make and IAR build: will be done on CircleCI only (one random per family as well)
# ------------------------------------------------------------------------------
cmake:
- needs: set-matrix
+ needs: [ check-paths, set-matrix ]
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
@@ -95,10 +93,12 @@ jobs:
upload-metrics: true
upload-artifacts: false
upload-membrowse: true
+ code-changed: ${{ needs.check-paths.outputs.code_changed == 'true' }}
secrets: inherit
code-metrics:
- needs: cmake
+ needs: [ check-paths, cmake ]
+ if: needs.check-paths.outputs.code_changed == true
runs-on: ubuntu-latest
permissions:
pull-requests: write
@@ -196,17 +196,18 @@ jobs:
# ---------------------------------------
build-os:
needs: [ check-paths ]
- if: needs.check-paths.outputs.code_changed == 'true'
+ if: needs.check-paths.outputs.code_changed == true
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macos-latest ]
+ build-system: [ 'make', 'cmake' ]
with:
os: ${{ matrix.os }}
- build-system: 'cmake-make'
+ build-system: ${{ matrix.build-system }}
toolchain: 'arm-gcc-${{ matrix.os }}'
- build-args: '["stm32h7"]'
+ build-args: '["stm32h7rs"]'
build-options: '--one-random'
# ---------------------------------------
@@ -215,7 +216,8 @@ jobs:
zephyr:
needs: [ check-paths ]
# skip zephyr build due to failed build, fix later
- if: false && needs.check-paths.outputs.code_changed == 'true'
+ if: false
+ #if: needs.check-paths.outputs.code_changed == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout TinyUSB
@@ -237,8 +239,8 @@ jobs:
# Run on PR only (hil-tinyusb), hil-hfp only run on non-forked PR
# ---------------------------------------
hil-build:
- needs: set-matrix
- if: github.repository_owner == 'hathach'
+ needs: [ check-paths, set-matrix ]
+ if: needs.check-paths.outputs.code_changed == true && github.repository_owner == 'hathach'
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
@@ -299,6 +301,7 @@ jobs:
hil-hfp:
needs: [ check-paths ]
if: |
+ needs.check-paths.outputs.code_changed == true &&
github.repository_owner == 'hathach' &&
!(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true)
runs-on: [ self-hosted, Linux, X64, hifiphile ]