From b84dea8133f267ec67e8150f489a1eb267146631 Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Fri, 12 Dec 2025 10:53:18 -0800 Subject: [PATCH 1/2] :bug: Ues workflow_ref vs workflow_sha --- .github/workflows/package_and_upload_all.yml | 17 +- .github/workflows/self_check.yml | 222 +++++++++---------- 2 files changed, 126 insertions(+), 113 deletions(-) diff --git a/.github/workflows/package_and_upload_all.yml b/.github/workflows/package_and_upload_all.yml index 369aa5b..274a4a7 100644 --- a/.github/workflows/package_and_upload_all.yml +++ b/.github/workflows/package_and_upload_all.yml @@ -48,6 +48,17 @@ on: required: false jobs: + extract-ci-ref: + runs-on: ubuntu-latest + outputs: + ci_ref: ${{ steps.extract.outputs.ci_ref }} + steps: + - id: extract + run: | + CI_REF="${{ github.workflow_ref }}" + CI_REF="${CI_REF#*@}" + echo "ci_ref=$CI_REF" >> "$GITHUB_OUTPUT" + linux_x86_64_llvm: uses: ./.github/workflows/package_and_upload.yml with: @@ -109,6 +120,7 @@ jobs: cortex-m_llvm: runs-on: ubuntu-latest + needs: extract-ci-ref env: VERBOSE: 1 CONAN_REMOTE_USER: ${{ secrets.conan_remote_user }} @@ -135,7 +147,7 @@ jobs: uses: actions/checkout@v4.1.1 with: repository: libhal/ci - ref: ${{ github.workflow_sha }} + ref: ${{ needs.extract-ci-ref.outputs.ci_ref }} path: ci-repo - name: 📦 Build packages for all Cortex-M architectures @@ -164,6 +176,7 @@ jobs: cortex-m_gcc: runs-on: ubuntu-latest + needs: extract-ci-ref if: ${{ inputs.modules_support_needed == false }} env: VERBOSE: 1 @@ -191,7 +204,7 @@ jobs: uses: actions/checkout@v4.1.1 with: repository: libhal/ci - ref: ${{ github.workflow_sha }} + ref: ${{ needs.extract-ci-ref.outputs.ci_ref }} path: ci-repo - name: 📦 Build packages for all Cortex-M architectures diff --git a/.github/workflows/self_check.yml b/.github/workflows/self_check.yml index a09078c..5ceb266 100644 --- a/.github/workflows/self_check.yml +++ b/.github/workflows/self_check.yml @@ -24,60 +24,60 @@ on: workflow_dispatch: jobs: - library_check_libhal_v4: - uses: ./.github/workflows/library_check.yml - with: - library: libhal - repo: libhal/libhal - dir: v4 - secrets: inherit - - library_check_libhal-util: - uses: ./.github/workflows/library_check.yml - with: - library: libhal-util - repo: libhal/libhal-util - dir: v5 - secrets: inherit - - libhal-actuator: - uses: ./.github/workflows/library_check.yml - with: - library: libhal-actuator - repo: libhal/libhal-actuator - secrets: inherit - - libhal-sensor: - uses: ./.github/workflows/library_check.yml - with: - library: libhal-sensor - repo: libhal/libhal-sensor - secrets: inherit - - libhal-expander: - uses: ./.github/workflows/library_check.yml - with: - library: libhal-expander - repo: libhal/libhal-expander - secrets: inherit - - libhal-micromod-lint: - uses: ./.github/workflows/lint.yml - with: - library: libhal-micromod - source_dir: src - dir: . - repo: libhal/libhal-micromod - secrets: inherit - - libhal-micromod-docs: - uses: ./.github/workflows/docs.yml - with: - library: libhal-micromod - source_dir: src - dir: . - repo: libhal/libhal-micromod - secrets: inherit + # library_check_libhal_v4: + # uses: ./.github/workflows/library_check.yml + # with: + # library: libhal + # repo: libhal/libhal + # dir: v4 + # secrets: inherit + + # library_check_libhal-util: + # uses: ./.github/workflows/library_check.yml + # with: + # library: libhal-util + # repo: libhal/libhal-util + # dir: v5 + # secrets: inherit + + # libhal-actuator: + # uses: ./.github/workflows/library_check.yml + # with: + # library: libhal-actuator + # repo: libhal/libhal-actuator + # secrets: inherit + + # libhal-sensor: + # uses: ./.github/workflows/library_check.yml + # with: + # library: libhal-sensor + # repo: libhal/libhal-sensor + # secrets: inherit + + # libhal-expander: + # uses: ./.github/workflows/library_check.yml + # with: + # library: libhal-expander + # repo: libhal/libhal-expander + # secrets: inherit + + # libhal-micromod-lint: + # uses: ./.github/workflows/lint.yml + # with: + # library: libhal-micromod + # source_dir: src + # dir: . + # repo: libhal/libhal-micromod + # secrets: inherit + + # libhal-micromod-docs: + # uses: ./.github/workflows/docs.yml + # with: + # library: libhal-micromod + # source_dir: src + # dir: . + # repo: libhal/libhal-micromod + # secrets: inherit package-strong_ptr: uses: ./.github/workflows/package_and_upload_all.yml @@ -95,66 +95,66 @@ jobs: dir: v4 secrets: inherit - package-libhal-util: - uses: ./.github/workflows/package_and_upload_all.yml - with: - library: libhal-util - repo: libhal/libhal-util - dir: v5 - secrets: inherit + # package-libhal-util: + # uses: ./.github/workflows/package_and_upload_all.yml + # with: + # library: libhal-util + # repo: libhal/libhal-util + # dir: v5 + # secrets: inherit # TODO(#95): Enable Windows # TODO(libhal/async_context#17): Add async-context # TODO(libhal/libhal#178): Add libhal v5 # TODO(libhal/libhal-util#87): Add libhal-util v6 - libhal-arm-mcu-lpc4078-demos: - uses: ./.github/workflows/app_builder2.yml - with: - repo: libhal/libhal-arm-mcu - dir: demos - compiler_profile: hal/tc/arm-gcc - platform_profile: hal/mcu/lpc4078 - secrets: inherit - - libhal-actuator-demos-lpc4078: - uses: ./.github/workflows/app_builder2.yml - with: - repo: libhal/libhal-actuator - dir: demos - compiler_profile: hal/tc/arm-gcc - platform_profile: hal/mcu/lpc4078 - secrets: inherit - - libhal-actuator-demos-lpc4074: - uses: ./.github/workflows/app_builder2.yml - with: - repo: libhal/libhal-actuator - dir: demos - compiler_profile: hal/tc/arm-gcc - platform_profile: hal/mcu/lpc4074 - secrets: inherit - - libhal-starter-app-lpc4078: - uses: ./.github/workflows/app_builder2.yml - with: - repo: libhal/libhal-starter - compiler_profile: hal/tc/arm-gcc - platform_profile: hal/mcu/lpc4078 - secrets: inherit - - libhal-starter-app-stm32f103c8: - uses: ./.github/workflows/app_builder2.yml - with: - repo: libhal/libhal-starter - compiler_profile: hal/tc/arm-gcc - platform_profile: hal/mcu/stm32f103c8 - secrets: inherit - - libhal-starter-app-mod-stmt32f1-v4: - uses: ./.github/workflows/app_builder2.yml - with: - repo: libhal/libhal-starter - compiler_profile: hal/tc/arm-gcc - platform_profile: hal/bsp/mod-stm32f1-v4 - secrets: inherit + # libhal-arm-mcu-lpc4078-demos: + # uses: ./.github/workflows/app_builder2.yml + # with: + # repo: libhal/libhal-arm-mcu + # dir: demos + # compiler_profile: hal/tc/arm-gcc + # platform_profile: hal/mcu/lpc4078 + # secrets: inherit + + # libhal-actuator-demos-lpc4078: + # uses: ./.github/workflows/app_builder2.yml + # with: + # repo: libhal/libhal-actuator + # dir: demos + # compiler_profile: hal/tc/arm-gcc + # platform_profile: hal/mcu/lpc4078 + # secrets: inherit + + # libhal-actuator-demos-lpc4074: + # uses: ./.github/workflows/app_builder2.yml + # with: + # repo: libhal/libhal-actuator + # dir: demos + # compiler_profile: hal/tc/arm-gcc + # platform_profile: hal/mcu/lpc4074 + # secrets: inherit + + # libhal-starter-app-lpc4078: + # uses: ./.github/workflows/app_builder2.yml + # with: + # repo: libhal/libhal-starter + # compiler_profile: hal/tc/arm-gcc + # platform_profile: hal/mcu/lpc4078 + # secrets: inherit + + # libhal-starter-app-stm32f103c8: + # uses: ./.github/workflows/app_builder2.yml + # with: + # repo: libhal/libhal-starter + # compiler_profile: hal/tc/arm-gcc + # platform_profile: hal/mcu/stm32f103c8 + # secrets: inherit + + # libhal-starter-app-mod-stmt32f1-v4: + # uses: ./.github/workflows/app_builder2.yml + # with: + # repo: libhal/libhal-starter + # compiler_profile: hal/tc/arm-gcc + # platform_profile: hal/bsp/mod-stm32f1-v4 + # secrets: inherit From 3facefb21dbfd02cb923c4349e67dcff86683b0f Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Fri, 12 Dec 2025 11:09:30 -0800 Subject: [PATCH 2/2] [skip ci] Bring back self checks --- .github/workflows/self_check.yml | 222 +++++++++++++++---------------- 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/.github/workflows/self_check.yml b/.github/workflows/self_check.yml index 5ceb266..a09078c 100644 --- a/.github/workflows/self_check.yml +++ b/.github/workflows/self_check.yml @@ -24,60 +24,60 @@ on: workflow_dispatch: jobs: - # library_check_libhal_v4: - # uses: ./.github/workflows/library_check.yml - # with: - # library: libhal - # repo: libhal/libhal - # dir: v4 - # secrets: inherit - - # library_check_libhal-util: - # uses: ./.github/workflows/library_check.yml - # with: - # library: libhal-util - # repo: libhal/libhal-util - # dir: v5 - # secrets: inherit - - # libhal-actuator: - # uses: ./.github/workflows/library_check.yml - # with: - # library: libhal-actuator - # repo: libhal/libhal-actuator - # secrets: inherit - - # libhal-sensor: - # uses: ./.github/workflows/library_check.yml - # with: - # library: libhal-sensor - # repo: libhal/libhal-sensor - # secrets: inherit - - # libhal-expander: - # uses: ./.github/workflows/library_check.yml - # with: - # library: libhal-expander - # repo: libhal/libhal-expander - # secrets: inherit - - # libhal-micromod-lint: - # uses: ./.github/workflows/lint.yml - # with: - # library: libhal-micromod - # source_dir: src - # dir: . - # repo: libhal/libhal-micromod - # secrets: inherit - - # libhal-micromod-docs: - # uses: ./.github/workflows/docs.yml - # with: - # library: libhal-micromod - # source_dir: src - # dir: . - # repo: libhal/libhal-micromod - # secrets: inherit + library_check_libhal_v4: + uses: ./.github/workflows/library_check.yml + with: + library: libhal + repo: libhal/libhal + dir: v4 + secrets: inherit + + library_check_libhal-util: + uses: ./.github/workflows/library_check.yml + with: + library: libhal-util + repo: libhal/libhal-util + dir: v5 + secrets: inherit + + libhal-actuator: + uses: ./.github/workflows/library_check.yml + with: + library: libhal-actuator + repo: libhal/libhal-actuator + secrets: inherit + + libhal-sensor: + uses: ./.github/workflows/library_check.yml + with: + library: libhal-sensor + repo: libhal/libhal-sensor + secrets: inherit + + libhal-expander: + uses: ./.github/workflows/library_check.yml + with: + library: libhal-expander + repo: libhal/libhal-expander + secrets: inherit + + libhal-micromod-lint: + uses: ./.github/workflows/lint.yml + with: + library: libhal-micromod + source_dir: src + dir: . + repo: libhal/libhal-micromod + secrets: inherit + + libhal-micromod-docs: + uses: ./.github/workflows/docs.yml + with: + library: libhal-micromod + source_dir: src + dir: . + repo: libhal/libhal-micromod + secrets: inherit package-strong_ptr: uses: ./.github/workflows/package_and_upload_all.yml @@ -95,66 +95,66 @@ jobs: dir: v4 secrets: inherit - # package-libhal-util: - # uses: ./.github/workflows/package_and_upload_all.yml - # with: - # library: libhal-util - # repo: libhal/libhal-util - # dir: v5 - # secrets: inherit + package-libhal-util: + uses: ./.github/workflows/package_and_upload_all.yml + with: + library: libhal-util + repo: libhal/libhal-util + dir: v5 + secrets: inherit # TODO(#95): Enable Windows # TODO(libhal/async_context#17): Add async-context # TODO(libhal/libhal#178): Add libhal v5 # TODO(libhal/libhal-util#87): Add libhal-util v6 - # libhal-arm-mcu-lpc4078-demos: - # uses: ./.github/workflows/app_builder2.yml - # with: - # repo: libhal/libhal-arm-mcu - # dir: demos - # compiler_profile: hal/tc/arm-gcc - # platform_profile: hal/mcu/lpc4078 - # secrets: inherit - - # libhal-actuator-demos-lpc4078: - # uses: ./.github/workflows/app_builder2.yml - # with: - # repo: libhal/libhal-actuator - # dir: demos - # compiler_profile: hal/tc/arm-gcc - # platform_profile: hal/mcu/lpc4078 - # secrets: inherit - - # libhal-actuator-demos-lpc4074: - # uses: ./.github/workflows/app_builder2.yml - # with: - # repo: libhal/libhal-actuator - # dir: demos - # compiler_profile: hal/tc/arm-gcc - # platform_profile: hal/mcu/lpc4074 - # secrets: inherit - - # libhal-starter-app-lpc4078: - # uses: ./.github/workflows/app_builder2.yml - # with: - # repo: libhal/libhal-starter - # compiler_profile: hal/tc/arm-gcc - # platform_profile: hal/mcu/lpc4078 - # secrets: inherit - - # libhal-starter-app-stm32f103c8: - # uses: ./.github/workflows/app_builder2.yml - # with: - # repo: libhal/libhal-starter - # compiler_profile: hal/tc/arm-gcc - # platform_profile: hal/mcu/stm32f103c8 - # secrets: inherit - - # libhal-starter-app-mod-stmt32f1-v4: - # uses: ./.github/workflows/app_builder2.yml - # with: - # repo: libhal/libhal-starter - # compiler_profile: hal/tc/arm-gcc - # platform_profile: hal/bsp/mod-stm32f1-v4 - # secrets: inherit + libhal-arm-mcu-lpc4078-demos: + uses: ./.github/workflows/app_builder2.yml + with: + repo: libhal/libhal-arm-mcu + dir: demos + compiler_profile: hal/tc/arm-gcc + platform_profile: hal/mcu/lpc4078 + secrets: inherit + + libhal-actuator-demos-lpc4078: + uses: ./.github/workflows/app_builder2.yml + with: + repo: libhal/libhal-actuator + dir: demos + compiler_profile: hal/tc/arm-gcc + platform_profile: hal/mcu/lpc4078 + secrets: inherit + + libhal-actuator-demos-lpc4074: + uses: ./.github/workflows/app_builder2.yml + with: + repo: libhal/libhal-actuator + dir: demos + compiler_profile: hal/tc/arm-gcc + platform_profile: hal/mcu/lpc4074 + secrets: inherit + + libhal-starter-app-lpc4078: + uses: ./.github/workflows/app_builder2.yml + with: + repo: libhal/libhal-starter + compiler_profile: hal/tc/arm-gcc + platform_profile: hal/mcu/lpc4078 + secrets: inherit + + libhal-starter-app-stm32f103c8: + uses: ./.github/workflows/app_builder2.yml + with: + repo: libhal/libhal-starter + compiler_profile: hal/tc/arm-gcc + platform_profile: hal/mcu/stm32f103c8 + secrets: inherit + + libhal-starter-app-mod-stmt32f1-v4: + uses: ./.github/workflows/app_builder2.yml + with: + repo: libhal/libhal-starter + compiler_profile: hal/tc/arm-gcc + platform_profile: hal/bsp/mod-stm32f1-v4 + secrets: inherit