diff --git a/.github/workflows/build-one.yml b/.github/workflows/build-one.yml index a33d7b2df..dd36bd380 100644 --- a/.github/workflows/build-one.yml +++ b/.github/workflows/build-one.yml @@ -6,7 +6,10 @@ on: description: 'Platform to build (e.g. hi3518ev200_lite_switcam-hs303-v2)' required: true commit: - description: 'Commit SHA to build (optional; defaults to current branch HEAD). Use this from `git bisect run` or for one-off historic rebuilds.' + description: 'Builder commit SHA to build (optional; defaults to current branch HEAD). Use this from `git bisect run` or for one-off historic rebuilds.' + required: false + firmware_ref: + description: 'OpenIPC/firmware ref (SHA/tag/branch) to clone — for cross-repo bisect of size/regression issues. Defaults to firmware HEAD.' required: false jobs: @@ -60,6 +63,7 @@ jobs: BUILD_ID: ${{ needs.resolve.outputs.tag_name }} BUILD_SHA: ${{ needs.resolve.outputs.ref }} BUILD_PLATFORM: ${{ inputs.platform }} + OPENIPC_FW_REV: ${{ inputs.firmware_ref }} run: | export GIT_HASH=$(git rev-parse --short ${GITHUB_SHA}) export GIT_BRANCH=${GITHUB_REF_NAME} diff --git a/builder.sh b/builder.sh index 1a5569935..aadf7c6c9 100755 --- a/builder.sh +++ b/builder.sh @@ -124,9 +124,18 @@ echo_c 33 "\nUpdating Builder" git pull rm -rf openipc +# OPENIPC_FW_REV pins firmware to a specific ref (branch, tag, or SHA) for +# cross-repo bisect of size/regression issues — set by build-one.yml's +# firmware_ref input. When unset, clones HEAD of master as before. if [ ! -d "$FIRMWARE_DIR" ]; then - echo_c 33 "\nDownloading Firmware" - git clone --depth=1 https://github.com/OpenIPC/firmware.git "$FIRMWARE_DIR" + if [ -n "$OPENIPC_FW_REV" ]; then + echo_c 33 "\nDownloading Firmware @ ${OPENIPC_FW_REV}" + git clone https://github.com/OpenIPC/firmware.git "$FIRMWARE_DIR" + git -C "$FIRMWARE_DIR" checkout "$OPENIPC_FW_REV" + else + echo_c 33 "\nDownloading Firmware" + git clone --depth=1 https://github.com/OpenIPC/firmware.git "$FIRMWARE_DIR" + fi cd "$FIRMWARE_DIR" else echo_c 33 "\nUpdating Firmware"