Skip to content

Commit

Permalink
✨ Add MicroMod support to demos
Browse files Browse the repository at this point in the history
  • Loading branch information
kammce committed May 16, 2024
1 parent f9cad54 commit 7df16bd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
fetch-depth: 0

- name: 📥 Install CMake & Conan
run: pip3 install cmake conan==2.1.0
run: pip3 install cmake conan==2.2.2

- name: 📡 Add `libhal-trunk` conan remote
run: conan remote add libhal-trunk
Expand Down
27 changes: 20 additions & 7 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,25 @@ def add_demo_requirements(conan_file: ConanFile, is_platform: bool = False):

class demo:
settings = "compiler", "build_type", "os", "arch", "libc"
options = {"platform": ["ANY"]}
default_options = {"platform": "unspecified"}
options = {
"platform": ["ANY"],
"micromod_board": ["ANY"],
}
default_options = {
"platform": "unspecified",
"micromod_board": "unspecified",
}

def layout(self):
platform_directory = "build/" + str(self.options.platform)
cmake_layout(self, build_folder=platform_directory)
if "micromod" == str(self.options.platform):
build_path = os.path.join("build",
str(self.options.platform),
str(self.options.micromod_board))
cmake_layout(self, build_folder=build_path)
else:
build_path = os.path.join("build",
str(self.options.platform))
cmake_layout(self, build_folder=build_path)

def build_requirements(self):
self.tool_requires("cmake/3.27.1")
Expand Down Expand Up @@ -85,11 +98,11 @@ class library:
exports_sources = ("include/*", "linker_scripts/*", "tests/*", "LICENSE",
"CMakeLists.txt", "src/*")

@property
@ property
def _min_cppstd(self):
return "20"

@property
@ property
def _compilers_minimum_version(self):
return {
"gcc": "11",
Expand Down Expand Up @@ -176,5 +189,5 @@ def test(self):

class libhal_bootstrap(ConanFile):
name = "libhal-bootstrap"
version = "2.0.0"
version = "2.1.0"
package_type = "python-require"

0 comments on commit 7df16bd

Please sign in to comment.