Skip to content

Commit 024eafc

Browse files
author
Khalil Estell
authored
🗑️ Code cleanup and picolibc bug fixes (#47)
* 👷 Use ci/4.x.y version The 4.x.y branch scheme means that this repo will get the latest changes to the ci that does not include breaking changes. * 🗑️ Additional code cleanup
1 parent 0e3ab20 commit 024eafc

5 files changed

Lines changed: 18 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ on:
1818
workflow_dispatch:
1919
pull_request:
2020
release:
21-
types: [published]
21+
types:
22+
- published
23+
- deleted
2224
push:
2325
branches:
2426
- main
@@ -27,12 +29,12 @@ on:
2729

2830
jobs:
2931
ci:
30-
uses: libhal/ci/.github/workflows/library.yml@4.1.0
32+
uses: libhal/ci/.github/workflows/library.yml@4.x.y
3133
with:
3234
library: libhal-soft
3335
coverage: true
3436
secrets: inherit
3537

3638
devices:
37-
uses: libhal/ci/.github/workflows/deploy.yml@4.1.0
39+
uses: libhal/ci/.github/workflows/deploy.yml@4.x.y
3840
secrets: inherit

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import os
2020

2121

22-
required_conan_version = ">=1.50.0"
22+
required_conan_version = ">=2.0.6"
2323

2424

2525
class libhal_soft_conan(ConanFile):

test_package/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
66
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
7+
# http://www.apache.org/licenses/LICENSE-2.0
88
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,5 +20,9 @@ find_package(libhal-soft REQUIRED CONFIG)
2020
add_executable(${PROJECT_NAME} main.cpp)
2121
target_include_directories(${PROJECT_NAME} PUBLIC .)
2222
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
23-
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_EXTENSIONS OFF)
23+
24+
if(BAREMETAL)
25+
target_link_options(${PROJECT_NAME} PRIVATE --oslib=semihost)
26+
endif()
27+
2428
target_link_libraries(${PROJECT_NAME} PRIVATE libhal::soft)

test_package/conanfile.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ class TestPackageConan(ConanFile):
2222
settings = "os", "arch", "compiler", "build_type"
2323
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
2424

25+
@property
26+
def _bare_metal(self):
27+
return self.settings.os == "baremetal"
28+
2529
def requirements(self):
2630
self.requires(self.tested_reference_str)
2731

@@ -30,7 +34,7 @@ def layout(self):
3034

3135
def build(self):
3236
cmake = CMake(self)
33-
cmake.configure()
37+
cmake.configure(variables={"BAREMETAL": self._bare_metal})
3438
cmake.build()
3539

3640
def test(self):

test_package/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ int main()
2626
namespace boost {
2727
void throw_exception(std::exception const& e)
2828
{
29-
std::abort();
29+
hal::halt();
3030
}
3131
} // namespace boost

0 commit comments

Comments
 (0)