Skip to content

Commit

Permalink
✨ Add app_builder.yml
Browse files Browse the repository at this point in the history
- Migrate to `libhal-arm-mcu`
  • Loading branch information
kammce committed Aug 11, 2024
1 parent c1871e7 commit d463d04
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 7 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/app_builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Copyright 2024 Khalil Estell
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 🏗️ Demo Builder

on:
workflow_call:
inputs:
repo:
type: string
default: ${{ github.repository }}
version:
type: string
default: ""
conan_version:
type: string
default: "2.2.2"
compiler_profile_url:
type: string
required: true
compiler_profile:
type: string
required: true
compiler_profile_branch:
type: string
default: "main"
platform_profile_url:
type: string
required: true
platform_profile:
type: string
required: true
platform_profile_branch:
type: string
default: "main"
conan_build_dir:
type: string
default: "."

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
if: ${{ inputs.version != '' }}
with:
submodules: true
repository: ${{ inputs.repo }}
ref: ${{ inputs.version }}

- uses: actions/[email protected]
if: ${{ inputs.version == '' }}
with:
submodules: true
repository: ${{ inputs.repo }}

- name: 📥 Install Conan ${{ inputs.conan_version }}
run: pip3 install conan==${{ inputs.conan_version }}

- name: 📡 Add `libhal` repo to conan remotes
run: conan remote add libhal
https://libhal.jfrog.io/artifactory/api/conan/trunk-conan

- name: 📡 Create and setup default profile
run: conan profile detect --force

- name: 👁️‍🗨️ Show conan profile
run: conan profile show

- name: Install libhal settings_user.yml
run: conan config install -sf profiles/baremetal/v2 https://github.com/libhal/conan-config.git

- name: Install compiler profiles
run: conan config install -tf profiles -sf conan/profiles --args "-b ${{ inputs.compiler_profile_branch }} --single-branch" ${{ inputs.compiler_profile_url }}

- name: Install platform profiles
run: conan config install -tf profiles -sf conan/profiles --args "-b ${{ inputs.platform_profile_branch }} --single-branch" ${{ inputs.platform_profile_url }}

- name: 🏗️ Build Application for ${{ inputs.profile }}
run: conan build ${{ inputs.conan_build_dir }} -pr ${{ inputs.compiler_profile }} -pr ${{ inputs.platform_profile }}
2 changes: 1 addition & 1 deletion .github/workflows/demo_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name: 🏗️ Demo Builder
on:
workflow_call:
inputs:
library:
library: # this field is ignored but kept here for backwards compatible
type: string
default: ${{ github.event.repository.name }}
repo:
Expand Down
42 changes: 36 additions & 6 deletions .github/workflows/self_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ jobs:
repo: libhal/libhal-lpc40
compiler_profile_url: https://github.com/libhal/arm-gnu-toolchain.git
compiler_profile: v1/arm-gcc-12.3
platform_profile_url: https://github.com/libhal/libhal-lpc40.git
platform_profile: v2/lpc4078
platform_profile_url: https://github.com/libhal/libhal-arm-mcu.git
platform_profile: v1/lpc4078
secrets: inherit

libhal-rmd-demos-lpc4078:
Expand All @@ -133,8 +133,8 @@ jobs:
repo: libhal/libhal-rmd
compiler_profile_url: https://github.com/libhal/arm-gnu-toolchain.git
compiler_profile: v1/arm-gcc-12.3
platform_profile_url: https://github.com/libhal/libhal-lpc40.git
platform_profile: v2/lpc4078
platform_profile_url: https://github.com/libhal/libhal-arm-mcu.git
platform_profile: v1/lpc4078
secrets: inherit

libhal-rmd-demos-lpc4074:
Expand All @@ -144,6 +144,36 @@ jobs:
repo: libhal/libhal-rmd
compiler_profile_url: https://github.com/libhal/arm-gnu-toolchain.git
compiler_profile: v1/arm-gcc-12.3
platform_profile_url: https://github.com/libhal/libhal-lpc40.git
platform_profile: v2/lpc4074
platform_profile_url: https://github.com/libhal/libhal-arm-mcu.git
platform_profile: v1/lpc4074
secrets: inherit

libhal-starter-app-lpc4078:
uses: ./.github/workflows/app_builder.yml
with:
repo: libhal/libhal-starter
compiler_profile_url: https://github.com/libhal/arm-gnu-toolchain.git
compiler_profile: v1/arm-gcc-12.3
platform_profile_url: https://github.com/libhal/libhal-arm-mcu.git
platform_profile: v1/lpc4078
secrets: inherit

libhal-starter-app-stm32f103c8:
uses: ./.github/workflows/app_builder.yml
with:
repo: libhal/libhal-starter
compiler_profile_url: https://github.com/libhal/arm-gnu-toolchain.git
compiler_profile: v1/arm-gcc-12.3
platform_profile_url: https://github.com/libhal/libhal-arm-mcu.git
platform_profile: v1/stm32f103c8
secrets: inherit

libhal-starter-app-mod-stmt32f1-v4:
uses: ./.github/workflows/app_builder.yml
with:
repo: libhal/libhal-starter
compiler_profile_url: https://github.com/libhal/arm-gnu-toolchain.git
compiler_profile: v1/arm-gcc-12.3
platform_profile_url: https://github.com/libhal/libhal-micromod.git
platform_profile: v1/mod-stm32f1-v4
secrets: inherit

0 comments on commit d463d04

Please sign in to comment.