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
34 changes: 14 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,42 +26,36 @@ on:
jobs:
ci:
uses: libhal/ci/.github/workflows/library_check.yml@5.x.y
with:
dir: v1
secrets: inherit

deploy_cortex-m4f_check:
uses: libhal/ci/.github/workflows/deploy.yml@5.x.y
uses: libhal/ci/.github/workflows/package_and_upload_all.yml@5.x.y
with:
arch: cortex-m4f
os: baremetal
compiler: gcc
compiler_version: 12.3
compiler_package: arm-gnu-toolchain
dir: v1
secrets: inherit

demo_check_lpc4078:
uses: ./.github/workflows/demo_check.yml
with:
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
compiler_profile: hal/tc/arm-gcc-12.3
platform_profile: hal/mcu/lpc4078
dir: v1/demos
secrets: inherit

demo_check_stm32f103c8:
uses: ./.github/workflows/demo_check.yml
with:
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
compiler_profile: hal/tc/arm-gcc-12.3
platform_profile: hal/mcu/stm32f103c8
dir: v1/demos
secrets: inherit

build_benchmarks:
uses: libhal/ci/.github/workflows/app_builder.yml@5.x.y
uses: libhal/ci/.github/workflows/app_builder2.yml@5.x.y
with:
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
conan_build_dir: benchmark
dir: v1/benchmark/
compiler_profile: hal/tc/arm-gcc-12.3
platform_profile: hal/mcu/lpc4078
secrets: inherit
51 changes: 13 additions & 38 deletions .github/workflows/demo_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,31 @@ on:
version:
type: string
default: ""
conan_version:
type: string
default: ""
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"
dir:
type: string
default: "."
jobs:
build_release: # b/c building the debug does not guarantee that normal build works
uses: libhal/ci/.github/workflows/demo_builder.yml@5.x.y
uses: libhal/ci/.github/workflows/app_builder2.yml@5.x.y
with:
compiler_profile_url: ${{ inputs.compiler_profile_url }}
compiler_profile: ${{ inputs.compiler_profile }}
platform_profile_url: ${{ inputs.platform_profile_url }}
platform_profile: ${{ inputs.platform_profile }}
dir: ${{ inputs.dir }}
secrets: inherit

build_debug: # STOLEN from libhal/ci
build_debug:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4.1.1
Expand All @@ -56,35 +49,17 @@ jobs:
submodules: true
repository: ${{ inputs.repo }}

- name: 📥 Install Conan ${{ inputs.conan_version }}
if: ${{ inputs.conan_version != '' }}
run: pipx install conan==${{ inputs.conan_version }}

- name: 📥 Install Conan Latest
if: ${{ inputs.conan_version == '' }}
run: pipx install conan

- 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 libhal/conan-config2
run: conan config install https://github.com/libhal/conan-config2.git

- 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: 📡 Run `conan hal setup`
run: conan hal setup

- name: 🏗️ Build debug demos for ${{ inputs.platform_profile }}
run: conan build demos -pr ${{ inputs.compiler_profile }} -pr ${{ inputs.platform_profile }} -s build_type=Debug
- name: 🏗️ Build debug ${{ inputs.dir }} for ${{ inputs.platform_profile }}
run: conan build ${{ inputs.dir }} -pr ${{ inputs.compiler_profile }} -pr ${{ inputs.platform_profile }} -s build_type=Debug --build=missing

- name: Trim profile version
id: trim
Expand All @@ -96,7 +71,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: build-${{ steps.trim.outputs.trimmed }}
path: demos/build/
path: ${{ inputs.dir }}/build

check_single_level:
runs-on: ubuntu-24.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
deploy:
if: startsWith(github.ref, 'refs/tags/')
uses: libhal/ci/.github/workflows/deploy_all.yml@5.x.y
uses: libhal/ci/.github/workflows/package_and_upload_all.yml@5.x.y
with:
version: ${{ github.ref_name }}
secrets: inherit
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions benchmark/conanfile.py → v1/benchmark/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def layout(self):
cmake_layout(self, build_folder=build_path)

def build_requirements(self):
self.tool_requires("make/4.4.1")
self.tool_requires("cmake/3.27.1")
self.tool_requires("ninja/[^1.0.0]")
self.tool_requires("cmake/[^4.0.0]")
self.tool_requires("libhal-cmake-util/[^4.3.3]")

def generate(self):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 7 additions & 3 deletions test_package/conanfile.py → v1/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@


from conan import ConanFile
from conan.tools.build import cross_building
from conan.tools.cmake import CMake, cmake_layout
from pathlib import Path


class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"

def build_requirements(self):
self.tool_requires("make/4.4.1")
self.tool_requires("cmake/3.27.1")
self.tool_requires("ninja/[^1.13.1]")
self.tool_requires("cmake/[^4.0.0]")

def requirements(self):
self.requires(self.tested_reference_str)
Expand All @@ -37,4 +39,6 @@ def build(self):
cmake.build()

def test(self):
pass # No execution for this binary at this time
if not cross_building(self):
bin_path = Path(self.cpp.build.bindirs[0]) / "test_package"
self.run(bin_path.absolute(), env="conanrun")
4 changes: 3 additions & 1 deletion test_package/main.cpp → v1/test_package/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ int main()
try {
foo();
} catch (error const&) {
return -1;
return 0;
}

return -1;
}
File renamed without changes.
File renamed without changes.