From ca89ad15818f21ac3d9354a79357e22d8ffb93a1 Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Tue, 9 Dec 2025 11:31:30 -0800 Subject: [PATCH] Move files to v1 This makes way for the folder v2 which will contain the next implementation of the library. --- .github/workflows/ci.yml | 34 +++++-------- .github/workflows/demo_check.yml | 51 +++++-------------- .github/workflows/deploy.yml | 2 +- .clangd => v1/.clangd | 0 CMakeLists.txt => v1/CMakeLists.txt | 0 {benchmark => v1/benchmark}/.clangd | 0 {benchmark => v1/benchmark}/CMakeLists.txt | 0 {benchmark => v1/benchmark}/README.md | 0 {benchmark => v1/benchmark}/conanfile.py | 4 +- .../benchmark}/fast_gcc_unwind.cpp | 0 {benchmark => v1/benchmark}/filler.cpp | 0 .../benchmark}/gen_depth_tests.py | 0 .../generated_tests/estell_except.cpp.csv | 0 .../benchmark}/generated_tests/except.cpp | 0 .../benchmark}/generated_tests/except.cpp.csv | 0 .../generated_tests/gcc_except_fast.csv | 0 .../generated_tests/nearpoint.cpp.csv | 0 .../generated_tests/result_error04.cpp | 0 .../generated_tests/result_error04.cpp.csv | 0 .../generated_tests/result_error16.cpp | 0 .../generated_tests/result_error16.cpp.csv | 0 .../generated_tests/result_error65.cpp | 0 .../generated_tests/result_error65.cpp.csv | 0 .../benchmark}/halbord_benchmark.py | 0 {benchmark => v1/benchmark}/main.cpp | 0 {benchmark => v1/benchmark}/nearpoint.cpp | 0 .../benchmark}/nearpoint_src/nearpoint.cpp | 0 .../benchmark}/nearpoint_src/order.ld | 0 {benchmark => v1/benchmark}/no_lto/lpc4078 | 0 .../benchmark}/no_lto/stm32f103c8 | 0 {benchmark => v1/benchmark}/order.ld | 0 {benchmark => v1/benchmark}/platform.hpp | 0 .../benchmark}/platforms/lpc4074.cpp | 0 .../benchmark}/platforms/lpc4078.cpp | 0 {benchmark => v1/benchmark}/platforms/mac.cpp | 0 .../benchmark}/platforms/stm32f103c8.cpp | 0 .../benchmark}/platforms/stm32f103zg.cpp | 0 {benchmark => v1/benchmark}/table_graph.csv | 0 .../benchmark}/test_nearpoint.csv | 0 {benchmark => v1/benchmark}/test_order.csv | 0 .../benchmark}/test_order_lpc4078.csv | 0 .../written_tests/result_2_strings.cpp | 0 .../written_tests/result_2_strings.cpp.csv | 0 .../written_tests/result_string.cpp | 0 .../written_tests/result_string.cpp.csv | 0 conanfile.py => v1/conanfile.py | 0 {demos => v1/demos}/.clangd | 0 {demos => v1/demos}/CMakeLists.txt | 0 .../applications/multiple_inheritance.cpp | 0 .../demos}/applications/single_level.cpp | 0 {demos => v1/demos}/conanfile.py | 0 {demos => v1/demos}/main.cpp | 0 {demos => v1/demos}/platforms/lpc4074.cpp | 0 {demos => v1/demos}/platforms/lpc4078.cpp | 0 {demos => v1/demos}/platforms/stm32f103c8.cpp | 0 {demos => v1/demos}/resource_list.hpp | 0 .../include}/libhal-exceptions/control.hpp | 0 .../arm-none-eabi-gcc-14.2_discard.ld | 0 .../src}/arm_cortex/estell/exception.cpp | 0 .../src}/arm_cortex/estell/internal.hpp | 0 .../arm_cortex/estell/libunwind_wrappers.cpp | 0 {src => v1/src}/builtin/gcc/impl.cpp | 0 .../test_package}/CMakeLists.txt | 0 .../test_package}/conanfile.py | 10 ++-- {test_package => v1/test_package}/main.cpp | 4 +- {tests => v1/tests}/control.test.cpp | 0 {tests => v1/tests}/main.test.cpp | 0 67 files changed, 40 insertions(+), 65 deletions(-) rename .clangd => v1/.clangd (100%) rename CMakeLists.txt => v1/CMakeLists.txt (100%) rename {benchmark => v1/benchmark}/.clangd (100%) rename {benchmark => v1/benchmark}/CMakeLists.txt (100%) rename {benchmark => v1/benchmark}/README.md (100%) rename {benchmark => v1/benchmark}/conanfile.py (96%) rename {benchmark => v1/benchmark}/fast_gcc_unwind.cpp (100%) rename {benchmark => v1/benchmark}/filler.cpp (100%) rename {benchmark => v1/benchmark}/gen_depth_tests.py (100%) rename {benchmark => v1/benchmark}/generated_tests/estell_except.cpp.csv (100%) rename {benchmark => v1/benchmark}/generated_tests/except.cpp (100%) rename {benchmark => v1/benchmark}/generated_tests/except.cpp.csv (100%) rename {benchmark => v1/benchmark}/generated_tests/gcc_except_fast.csv (100%) rename {benchmark => v1/benchmark}/generated_tests/nearpoint.cpp.csv (100%) rename {benchmark => v1/benchmark}/generated_tests/result_error04.cpp (100%) rename {benchmark => v1/benchmark}/generated_tests/result_error04.cpp.csv (100%) rename {benchmark => v1/benchmark}/generated_tests/result_error16.cpp (100%) rename {benchmark => v1/benchmark}/generated_tests/result_error16.cpp.csv (100%) rename {benchmark => v1/benchmark}/generated_tests/result_error65.cpp (100%) rename {benchmark => v1/benchmark}/generated_tests/result_error65.cpp.csv (100%) rename {benchmark => v1/benchmark}/halbord_benchmark.py (100%) rename {benchmark => v1/benchmark}/main.cpp (100%) rename {benchmark => v1/benchmark}/nearpoint.cpp (100%) rename {benchmark => v1/benchmark}/nearpoint_src/nearpoint.cpp (100%) rename {benchmark => v1/benchmark}/nearpoint_src/order.ld (100%) rename {benchmark => v1/benchmark}/no_lto/lpc4078 (100%) rename {benchmark => v1/benchmark}/no_lto/stm32f103c8 (100%) rename {benchmark => v1/benchmark}/order.ld (100%) rename {benchmark => v1/benchmark}/platform.hpp (100%) rename {benchmark => v1/benchmark}/platforms/lpc4074.cpp (100%) rename {benchmark => v1/benchmark}/platforms/lpc4078.cpp (100%) rename {benchmark => v1/benchmark}/platforms/mac.cpp (100%) rename {benchmark => v1/benchmark}/platforms/stm32f103c8.cpp (100%) rename {benchmark => v1/benchmark}/platforms/stm32f103zg.cpp (100%) rename {benchmark => v1/benchmark}/table_graph.csv (100%) rename {benchmark => v1/benchmark}/test_nearpoint.csv (100%) rename {benchmark => v1/benchmark}/test_order.csv (100%) rename {benchmark => v1/benchmark}/test_order_lpc4078.csv (100%) rename {benchmark => v1/benchmark}/written_tests/result_2_strings.cpp (100%) rename {benchmark => v1/benchmark}/written_tests/result_2_strings.cpp.csv (100%) rename {benchmark => v1/benchmark}/written_tests/result_string.cpp (100%) rename {benchmark => v1/benchmark}/written_tests/result_string.cpp.csv (100%) rename conanfile.py => v1/conanfile.py (100%) rename {demos => v1/demos}/.clangd (100%) rename {demos => v1/demos}/CMakeLists.txt (100%) rename {demos => v1/demos}/applications/multiple_inheritance.cpp (100%) rename {demos => v1/demos}/applications/single_level.cpp (100%) rename {demos => v1/demos}/conanfile.py (100%) rename {demos => v1/demos}/main.cpp (100%) rename {demos => v1/demos}/platforms/lpc4074.cpp (100%) rename {demos => v1/demos}/platforms/lpc4078.cpp (100%) rename {demos => v1/demos}/platforms/stm32f103c8.cpp (100%) rename {demos => v1/demos}/resource_list.hpp (100%) rename {include => v1/include}/libhal-exceptions/control.hpp (100%) rename {linker_scripts => v1/linker_scripts}/arm-none-eabi-gcc-14.2_discard.ld (100%) rename {src => v1/src}/arm_cortex/estell/exception.cpp (100%) rename {src => v1/src}/arm_cortex/estell/internal.hpp (100%) rename {src => v1/src}/arm_cortex/estell/libunwind_wrappers.cpp (100%) rename {src => v1/src}/builtin/gcc/impl.cpp (100%) rename {test_package => v1/test_package}/CMakeLists.txt (100%) rename {test_package => v1/test_package}/conanfile.py (77%) rename {test_package => v1/test_package}/main.cpp (98%) rename {tests => v1/tests}/control.test.cpp (100%) rename {tests => v1/tests}/main.test.cpp (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d759f23..bed8214 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/demo_check.yml b/.github/workflows/demo_check.yml index 846ae2f..4af75ef 100644 --- a/.github/workflows/demo_check.yml +++ b/.github/workflows/demo_check.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 72e8c69..4b1c577 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/.clangd b/v1/.clangd similarity index 100% rename from .clangd rename to v1/.clangd diff --git a/CMakeLists.txt b/v1/CMakeLists.txt similarity index 100% rename from CMakeLists.txt rename to v1/CMakeLists.txt diff --git a/benchmark/.clangd b/v1/benchmark/.clangd similarity index 100% rename from benchmark/.clangd rename to v1/benchmark/.clangd diff --git a/benchmark/CMakeLists.txt b/v1/benchmark/CMakeLists.txt similarity index 100% rename from benchmark/CMakeLists.txt rename to v1/benchmark/CMakeLists.txt diff --git a/benchmark/README.md b/v1/benchmark/README.md similarity index 100% rename from benchmark/README.md rename to v1/benchmark/README.md diff --git a/benchmark/conanfile.py b/v1/benchmark/conanfile.py similarity index 96% rename from benchmark/conanfile.py rename to v1/benchmark/conanfile.py index 55933aa..cfd8845 100644 --- a/benchmark/conanfile.py +++ b/v1/benchmark/conanfile.py @@ -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): diff --git a/benchmark/fast_gcc_unwind.cpp b/v1/benchmark/fast_gcc_unwind.cpp similarity index 100% rename from benchmark/fast_gcc_unwind.cpp rename to v1/benchmark/fast_gcc_unwind.cpp diff --git a/benchmark/filler.cpp b/v1/benchmark/filler.cpp similarity index 100% rename from benchmark/filler.cpp rename to v1/benchmark/filler.cpp diff --git a/benchmark/gen_depth_tests.py b/v1/benchmark/gen_depth_tests.py similarity index 100% rename from benchmark/gen_depth_tests.py rename to v1/benchmark/gen_depth_tests.py diff --git a/benchmark/generated_tests/estell_except.cpp.csv b/v1/benchmark/generated_tests/estell_except.cpp.csv similarity index 100% rename from benchmark/generated_tests/estell_except.cpp.csv rename to v1/benchmark/generated_tests/estell_except.cpp.csv diff --git a/benchmark/generated_tests/except.cpp b/v1/benchmark/generated_tests/except.cpp similarity index 100% rename from benchmark/generated_tests/except.cpp rename to v1/benchmark/generated_tests/except.cpp diff --git a/benchmark/generated_tests/except.cpp.csv b/v1/benchmark/generated_tests/except.cpp.csv similarity index 100% rename from benchmark/generated_tests/except.cpp.csv rename to v1/benchmark/generated_tests/except.cpp.csv diff --git a/benchmark/generated_tests/gcc_except_fast.csv b/v1/benchmark/generated_tests/gcc_except_fast.csv similarity index 100% rename from benchmark/generated_tests/gcc_except_fast.csv rename to v1/benchmark/generated_tests/gcc_except_fast.csv diff --git a/benchmark/generated_tests/nearpoint.cpp.csv b/v1/benchmark/generated_tests/nearpoint.cpp.csv similarity index 100% rename from benchmark/generated_tests/nearpoint.cpp.csv rename to v1/benchmark/generated_tests/nearpoint.cpp.csv diff --git a/benchmark/generated_tests/result_error04.cpp b/v1/benchmark/generated_tests/result_error04.cpp similarity index 100% rename from benchmark/generated_tests/result_error04.cpp rename to v1/benchmark/generated_tests/result_error04.cpp diff --git a/benchmark/generated_tests/result_error04.cpp.csv b/v1/benchmark/generated_tests/result_error04.cpp.csv similarity index 100% rename from benchmark/generated_tests/result_error04.cpp.csv rename to v1/benchmark/generated_tests/result_error04.cpp.csv diff --git a/benchmark/generated_tests/result_error16.cpp b/v1/benchmark/generated_tests/result_error16.cpp similarity index 100% rename from benchmark/generated_tests/result_error16.cpp rename to v1/benchmark/generated_tests/result_error16.cpp diff --git a/benchmark/generated_tests/result_error16.cpp.csv b/v1/benchmark/generated_tests/result_error16.cpp.csv similarity index 100% rename from benchmark/generated_tests/result_error16.cpp.csv rename to v1/benchmark/generated_tests/result_error16.cpp.csv diff --git a/benchmark/generated_tests/result_error65.cpp b/v1/benchmark/generated_tests/result_error65.cpp similarity index 100% rename from benchmark/generated_tests/result_error65.cpp rename to v1/benchmark/generated_tests/result_error65.cpp diff --git a/benchmark/generated_tests/result_error65.cpp.csv b/v1/benchmark/generated_tests/result_error65.cpp.csv similarity index 100% rename from benchmark/generated_tests/result_error65.cpp.csv rename to v1/benchmark/generated_tests/result_error65.cpp.csv diff --git a/benchmark/halbord_benchmark.py b/v1/benchmark/halbord_benchmark.py similarity index 100% rename from benchmark/halbord_benchmark.py rename to v1/benchmark/halbord_benchmark.py diff --git a/benchmark/main.cpp b/v1/benchmark/main.cpp similarity index 100% rename from benchmark/main.cpp rename to v1/benchmark/main.cpp diff --git a/benchmark/nearpoint.cpp b/v1/benchmark/nearpoint.cpp similarity index 100% rename from benchmark/nearpoint.cpp rename to v1/benchmark/nearpoint.cpp diff --git a/benchmark/nearpoint_src/nearpoint.cpp b/v1/benchmark/nearpoint_src/nearpoint.cpp similarity index 100% rename from benchmark/nearpoint_src/nearpoint.cpp rename to v1/benchmark/nearpoint_src/nearpoint.cpp diff --git a/benchmark/nearpoint_src/order.ld b/v1/benchmark/nearpoint_src/order.ld similarity index 100% rename from benchmark/nearpoint_src/order.ld rename to v1/benchmark/nearpoint_src/order.ld diff --git a/benchmark/no_lto/lpc4078 b/v1/benchmark/no_lto/lpc4078 similarity index 100% rename from benchmark/no_lto/lpc4078 rename to v1/benchmark/no_lto/lpc4078 diff --git a/benchmark/no_lto/stm32f103c8 b/v1/benchmark/no_lto/stm32f103c8 similarity index 100% rename from benchmark/no_lto/stm32f103c8 rename to v1/benchmark/no_lto/stm32f103c8 diff --git a/benchmark/order.ld b/v1/benchmark/order.ld similarity index 100% rename from benchmark/order.ld rename to v1/benchmark/order.ld diff --git a/benchmark/platform.hpp b/v1/benchmark/platform.hpp similarity index 100% rename from benchmark/platform.hpp rename to v1/benchmark/platform.hpp diff --git a/benchmark/platforms/lpc4074.cpp b/v1/benchmark/platforms/lpc4074.cpp similarity index 100% rename from benchmark/platforms/lpc4074.cpp rename to v1/benchmark/platforms/lpc4074.cpp diff --git a/benchmark/platforms/lpc4078.cpp b/v1/benchmark/platforms/lpc4078.cpp similarity index 100% rename from benchmark/platforms/lpc4078.cpp rename to v1/benchmark/platforms/lpc4078.cpp diff --git a/benchmark/platforms/mac.cpp b/v1/benchmark/platforms/mac.cpp similarity index 100% rename from benchmark/platforms/mac.cpp rename to v1/benchmark/platforms/mac.cpp diff --git a/benchmark/platforms/stm32f103c8.cpp b/v1/benchmark/platforms/stm32f103c8.cpp similarity index 100% rename from benchmark/platforms/stm32f103c8.cpp rename to v1/benchmark/platforms/stm32f103c8.cpp diff --git a/benchmark/platforms/stm32f103zg.cpp b/v1/benchmark/platforms/stm32f103zg.cpp similarity index 100% rename from benchmark/platforms/stm32f103zg.cpp rename to v1/benchmark/platforms/stm32f103zg.cpp diff --git a/benchmark/table_graph.csv b/v1/benchmark/table_graph.csv similarity index 100% rename from benchmark/table_graph.csv rename to v1/benchmark/table_graph.csv diff --git a/benchmark/test_nearpoint.csv b/v1/benchmark/test_nearpoint.csv similarity index 100% rename from benchmark/test_nearpoint.csv rename to v1/benchmark/test_nearpoint.csv diff --git a/benchmark/test_order.csv b/v1/benchmark/test_order.csv similarity index 100% rename from benchmark/test_order.csv rename to v1/benchmark/test_order.csv diff --git a/benchmark/test_order_lpc4078.csv b/v1/benchmark/test_order_lpc4078.csv similarity index 100% rename from benchmark/test_order_lpc4078.csv rename to v1/benchmark/test_order_lpc4078.csv diff --git a/benchmark/written_tests/result_2_strings.cpp b/v1/benchmark/written_tests/result_2_strings.cpp similarity index 100% rename from benchmark/written_tests/result_2_strings.cpp rename to v1/benchmark/written_tests/result_2_strings.cpp diff --git a/benchmark/written_tests/result_2_strings.cpp.csv b/v1/benchmark/written_tests/result_2_strings.cpp.csv similarity index 100% rename from benchmark/written_tests/result_2_strings.cpp.csv rename to v1/benchmark/written_tests/result_2_strings.cpp.csv diff --git a/benchmark/written_tests/result_string.cpp b/v1/benchmark/written_tests/result_string.cpp similarity index 100% rename from benchmark/written_tests/result_string.cpp rename to v1/benchmark/written_tests/result_string.cpp diff --git a/benchmark/written_tests/result_string.cpp.csv b/v1/benchmark/written_tests/result_string.cpp.csv similarity index 100% rename from benchmark/written_tests/result_string.cpp.csv rename to v1/benchmark/written_tests/result_string.cpp.csv diff --git a/conanfile.py b/v1/conanfile.py similarity index 100% rename from conanfile.py rename to v1/conanfile.py diff --git a/demos/.clangd b/v1/demos/.clangd similarity index 100% rename from demos/.clangd rename to v1/demos/.clangd diff --git a/demos/CMakeLists.txt b/v1/demos/CMakeLists.txt similarity index 100% rename from demos/CMakeLists.txt rename to v1/demos/CMakeLists.txt diff --git a/demos/applications/multiple_inheritance.cpp b/v1/demos/applications/multiple_inheritance.cpp similarity index 100% rename from demos/applications/multiple_inheritance.cpp rename to v1/demos/applications/multiple_inheritance.cpp diff --git a/demos/applications/single_level.cpp b/v1/demos/applications/single_level.cpp similarity index 100% rename from demos/applications/single_level.cpp rename to v1/demos/applications/single_level.cpp diff --git a/demos/conanfile.py b/v1/demos/conanfile.py similarity index 100% rename from demos/conanfile.py rename to v1/demos/conanfile.py diff --git a/demos/main.cpp b/v1/demos/main.cpp similarity index 100% rename from demos/main.cpp rename to v1/demos/main.cpp diff --git a/demos/platforms/lpc4074.cpp b/v1/demos/platforms/lpc4074.cpp similarity index 100% rename from demos/platforms/lpc4074.cpp rename to v1/demos/platforms/lpc4074.cpp diff --git a/demos/platforms/lpc4078.cpp b/v1/demos/platforms/lpc4078.cpp similarity index 100% rename from demos/platforms/lpc4078.cpp rename to v1/demos/platforms/lpc4078.cpp diff --git a/demos/platforms/stm32f103c8.cpp b/v1/demos/platforms/stm32f103c8.cpp similarity index 100% rename from demos/platforms/stm32f103c8.cpp rename to v1/demos/platforms/stm32f103c8.cpp diff --git a/demos/resource_list.hpp b/v1/demos/resource_list.hpp similarity index 100% rename from demos/resource_list.hpp rename to v1/demos/resource_list.hpp diff --git a/include/libhal-exceptions/control.hpp b/v1/include/libhal-exceptions/control.hpp similarity index 100% rename from include/libhal-exceptions/control.hpp rename to v1/include/libhal-exceptions/control.hpp diff --git a/linker_scripts/arm-none-eabi-gcc-14.2_discard.ld b/v1/linker_scripts/arm-none-eabi-gcc-14.2_discard.ld similarity index 100% rename from linker_scripts/arm-none-eabi-gcc-14.2_discard.ld rename to v1/linker_scripts/arm-none-eabi-gcc-14.2_discard.ld diff --git a/src/arm_cortex/estell/exception.cpp b/v1/src/arm_cortex/estell/exception.cpp similarity index 100% rename from src/arm_cortex/estell/exception.cpp rename to v1/src/arm_cortex/estell/exception.cpp diff --git a/src/arm_cortex/estell/internal.hpp b/v1/src/arm_cortex/estell/internal.hpp similarity index 100% rename from src/arm_cortex/estell/internal.hpp rename to v1/src/arm_cortex/estell/internal.hpp diff --git a/src/arm_cortex/estell/libunwind_wrappers.cpp b/v1/src/arm_cortex/estell/libunwind_wrappers.cpp similarity index 100% rename from src/arm_cortex/estell/libunwind_wrappers.cpp rename to v1/src/arm_cortex/estell/libunwind_wrappers.cpp diff --git a/src/builtin/gcc/impl.cpp b/v1/src/builtin/gcc/impl.cpp similarity index 100% rename from src/builtin/gcc/impl.cpp rename to v1/src/builtin/gcc/impl.cpp diff --git a/test_package/CMakeLists.txt b/v1/test_package/CMakeLists.txt similarity index 100% rename from test_package/CMakeLists.txt rename to v1/test_package/CMakeLists.txt diff --git a/test_package/conanfile.py b/v1/test_package/conanfile.py similarity index 77% rename from test_package/conanfile.py rename to v1/test_package/conanfile.py index 87a2161..bbf07a6 100644 --- a/test_package/conanfile.py +++ b/v1/test_package/conanfile.py @@ -14,7 +14,9 @@ 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): @@ -22,8 +24,8 @@ class TestPackageConan(ConanFile): 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) @@ -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") diff --git a/test_package/main.cpp b/v1/test_package/main.cpp similarity index 98% rename from test_package/main.cpp rename to v1/test_package/main.cpp index 016f1f1..346dbc2 100644 --- a/test_package/main.cpp +++ b/v1/test_package/main.cpp @@ -93,6 +93,8 @@ int main() try { foo(); } catch (error const&) { - return -1; + return 0; } + + return -1; } diff --git a/tests/control.test.cpp b/v1/tests/control.test.cpp similarity index 100% rename from tests/control.test.cpp rename to v1/tests/control.test.cpp diff --git a/tests/main.test.cpp b/v1/tests/main.test.cpp similarity index 100% rename from tests/main.test.cpp rename to v1/tests/main.test.cpp