Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/self_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,38 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-24.04
outputs:
library_check: ${{ steps.filter.outputs.library_check }}
lint: ${{ steps.filter.outputs.lint }}
docs: ${{ steps.filter.outputs.docs }}
package_and_upload_all: ${{ steps.filter.outputs.package_and_upload_all }}
app_builder2: ${{ steps.filter.outputs.app_builder2 }}
tests: ${{ steps.filter.outputs.tests }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
library_check:
- '.github/workflows/library_check.yml'
tests:
- '.github/workflows/tests.yml'
lint:
- '.github/workflows/lint.yml'
docs:
- '.github/workflows/docs.yml'
package_and_upload_all:
- '.github/workflows/package_and_upload_all.yml'
- '.github/workflows/package_and_upload.yml'
app_builder2:
- '.github/workflows/app_builder2.yml'

library_check_libhal_v4:
needs: changes
if: ${{ needs.changes.outputs.library_check == 'true' }}
uses: ./.github/workflows/library_check.yml
with:
library: libhal
Expand All @@ -37,6 +68,8 @@ jobs:
secrets: inherit

library_check_libhal-util:
needs: changes
if: ${{ needs.changes.outputs.library_check == 'true' }}
uses: ./.github/workflows/library_check.yml
with:
library: libhal-util
Expand All @@ -45,27 +78,35 @@ jobs:
secrets: inherit

libhal-actuator:
needs: changes
if: ${{ needs.changes.outputs.library_check == 'true' }}
uses: ./.github/workflows/library_check.yml
with:
library: libhal-actuator
repo: libhal/libhal-actuator
secrets: inherit

libhal-sensor:
needs: changes
if: ${{ needs.changes.outputs.library_check == 'true' }}
uses: ./.github/workflows/library_check.yml
with:
library: libhal-sensor
repo: libhal/libhal-sensor
secrets: inherit

libhal-expander:
needs: changes
if: ${{ needs.changes.outputs.library_check == 'true' }}
uses: ./.github/workflows/library_check.yml
with:
library: libhal-expander
repo: libhal/libhal-expander
secrets: inherit

libhal-micromod-lint:
needs: changes
if: ${{ needs.changes.outputs.lint == 'true' }}
uses: ./.github/workflows/lint.yml
with:
library: libhal-micromod
Expand All @@ -75,6 +116,8 @@ jobs:
secrets: inherit

libhal-micromod-docs:
needs: changes
if: ${{ needs.changes.outputs.docs == 'true' }}
uses: ./.github/workflows/docs.yml
with:
library: libhal-micromod
Expand All @@ -83,7 +126,18 @@ jobs:
repo: libhal/libhal-micromod
secrets: inherit

strong_ptr-tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/tests.yml
with:
library: strong_ptr
repo: libhal/strong_ptr
secrets: inherit

package-strong_ptr:
needs: changes
if: ${{ needs.changes.outputs.package_and_upload_all == 'true' }}
uses: ./.github/workflows/package_and_upload_all.yml
with:
library: strong_ptr
Expand All @@ -93,6 +147,8 @@ jobs:
secrets: inherit

package-libhal_v4:
needs: changes
if: ${{ needs.changes.outputs.package_and_upload_all == 'true' }}
uses: ./.github/workflows/package_and_upload_all.yml
with:
library: libhal
Expand All @@ -102,6 +158,8 @@ jobs:
secrets: inherit

package-libhal-util:
needs: changes
if: ${{ needs.changes.outputs.package_and_upload_all == 'true' }}
uses: ./.github/workflows/package_and_upload_all.yml
with:
library: libhal-util
Expand All @@ -116,6 +174,8 @@ jobs:
# TODO(libhal/libhal-util#87): Add libhal-util v6

libhal-arm-mcu-lpc4078-demos:
needs: changes
if: ${{ needs.changes.outputs.app_builder2 == 'true' }}
uses: ./.github/workflows/app_builder2.yml
with:
repo: libhal/libhal-arm-mcu
Expand All @@ -125,6 +185,8 @@ jobs:
secrets: inherit

libhal-expander-build-latest:
needs: changes
if: ${{ needs.changes.outputs.app_builder2 == 'true' }}
uses: ./.github/workflows/app_builder2.yml
with:
repo: libhal/libhal-expander
Expand All @@ -134,6 +196,8 @@ jobs:
platform_profile: hal/mcu/lpc4078

libhal-actuator-demos-lpc4078:
needs: changes
if: ${{ needs.changes.outputs.app_builder2 == 'true' }}
uses: ./.github/workflows/app_builder2.yml
with:
repo: libhal/libhal-actuator
Expand All @@ -143,6 +207,8 @@ jobs:
secrets: inherit

libhal-actuator-demos-lpc4074:
needs: changes
if: ${{ needs.changes.outputs.app_builder2 == 'true' }}
uses: ./.github/workflows/app_builder2.yml
with:
repo: libhal/libhal-actuator
Expand All @@ -152,6 +218,8 @@ jobs:
secrets: inherit

libhal-starter-app-lpc4078:
needs: changes
if: ${{ needs.changes.outputs.app_builder2 == 'true' }}
uses: ./.github/workflows/app_builder2.yml
with:
repo: libhal/libhal-starter
Expand All @@ -160,6 +228,8 @@ jobs:
secrets: inherit

libhal-starter-app-stm32f103c8:
needs: changes
if: ${{ needs.changes.outputs.app_builder2 == 'true' }}
uses: ./.github/workflows/app_builder2.yml
with:
repo: libhal/libhal-starter
Expand All @@ -168,6 +238,8 @@ jobs:
secrets: inherit

libhal-starter-app-mod-stmt32f1-v4:
needs: changes
if: ${{ needs.changes.outputs.app_builder2 == 'true' }}
uses: ./.github/workflows/app_builder2.yml
with:
repo: libhal/libhal-starter
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ on:
inputs:
library:
type: string
required: true
default: ${{ github.event.repository.name }}
version:
type: string
default: ""
coverage:
type: boolean
required: true
default: false
fail_on_coverage:
type: boolean
required: true
default: false
coverage_threshold:
type: string
required: true
default: "40 80"
repo:
type: string
required: true
conan_version:
type: string
required: true
default: 2.22.2
config2_version:
type: string
default: main
Expand All @@ -46,6 +46,8 @@ on:
type: string
default: "."
# (DEPRECATED) Version of LLVM to install via homebrew, no longer used
# The llvm binary comes from the llvm-toolchain package within the llvm
# profile.
llvm:
type: string
default: "17"
Expand Down Expand Up @@ -103,4 +105,4 @@ jobs:
run: conan config install https://github.com/libhal/conan-config2.git --args="-b ${{ inputs.config2_version }}"

- name: 🔬 Create & Run Unit Tests
run: conan create ${{ inputs.dir }} -s:h build_type=Debug --version='latest' -s:h os=${{ matrix.os }} -s:h arch=${{ matrix.arch }} --build=missing -pr:h hal/tc/llvm
run: conan create ${{ inputs.dir }} -s:h build_type=Debug --version='latest' -s:h os=${{ matrix.os }} -s:h arch=${{ matrix.arch }} --build=missing -pr:h hal/tc/llvm -o "*:enable_clang_tidy=True"