Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add integration tests #208

Merged
merged 25 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
52ac6fb
Add dev container
thomas-philips Mar 23, 2023
d4386e6
feat: mininal stim+tester
thomas-philips Mar 24, 2023
f098fa5
handshake and timeout to test GPIO
thomas-philips Mar 28, 2023
b06e559
Refactor and use InputPin/OutputPin
thomas-philips Mar 30, 2023
b562635
Added echo support (not working state)
thomas-philips Apr 5, 2023
46632f5
Merge branch 'main' into feature/integration-tests
richardapeters Jun 3, 2023
d9959ca
Format CMakeLists.txt and Main.cpp
richardapeters Jun 3, 2023
945ccf4
Merge branch 'main' into feature/integration-tests
richardapeters Jun 12, 2023
80526be
Update and restructure
richardapeters Jun 12, 2023
ed48769
More restructuring
richardapeters Jun 12, 2023
121621d
Extract integration_test/logic/Gpio
richardapeters Jun 13, 2023
f40193e
Refactor
richardapeters Jun 15, 2023
28ef4e4
Fix building for host
richardapeters Jun 15, 2023
655e270
A few small fixes
richardapeters Jun 16, 2023
cbe6ba8
Extract instantiations from main
richardapeters Jun 16, 2023
0b48ee6
Merge remote-tracking branch 'origin/main' into feature/integration-t…
richardapeters Oct 26, 2023
c7e1f73
Update EmbeddedInfraLib
richardapeters Oct 29, 2023
03599ee
Create install package in host build, pass on to embedded build
richardapeters Nov 9, 2023
31d4f72
Fix artifact name
richardapeters Nov 9, 2023
bd652b6
Apply clang-format
richardapeters Nov 9, 2023
f5fe87e
.github/workflows/ci.yml: remove superfluous host build
richardapeters Nov 9, 2023
7527344
Merge remote-tracking branch 'origin/main' into feature/integration-t…
richardapeters Nov 9, 2023
27f8838
.github/workflows/ci.yml: install xsltproc
richardapeters Nov 9, 2023
871eb8c
integration_test/tester/Main: Update names of Tester/Tested
richardapeters Nov 9, 2023
18c618b
Update amp-embedded-infra-lib to v5.0.0
richardapeters Nov 9, 2023
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
31 changes: 18 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
- uses: lukka/run-cmake@2ce8982be71b8e9a3c4d5e432135035afd1e76a7 # v10.7
with:
configurePreset: "host"
buildPreset: "host-Debug" #-WithPackage"
buildPreset: "host-Debug-WithPackage"
#testPreset: "host"
configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=sccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=sccache']"
#- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
# with:
# name: halst
# path: build/host/halst-*-Linux.tar.gz
# if-no-files-found: error
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: hal_st
path: build/host/hal_st-*-Linux.tar.gz
if-no-files-found: error
#- name: Upload test logs
# if: ${{ failure() }}
# uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
Expand Down Expand Up @@ -69,6 +69,7 @@ jobs:
embedded_build:
name: Embedded Build
runs-on: ubuntu-latest
needs: [host_build_test_ubuntu]
strategy:
matrix:
configuration: ["RelWithDebInfo"]
Expand All @@ -90,13 +91,17 @@ jobs:
uses: carlosperate/arm-none-eabi-gcc-action@e9cd61b92edb079b14b2d0449b21f8a517121fe8 # v1.8.0
with:
release: ${{ matrix.gcc }}
- run: sudo apt-get update && sudo apt-get install ninja-build xsltproc
- uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10
with:
key: ${{ matrix.gcc }}-${{ matrix.configuration }}-${{ matrix.target }}
- run: |
sudo apt-get update && sudo apt-get install --no-install-recommends ninja-build xsltproc
echo "::add-matcher::.github/matchers/gcc-problem-matcher.json"
cmake --preset host -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build --preset host-${{ matrix.configuration }}
cmake --preset ${{ matrix.target }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build --preset ${{ matrix.target }}-${{ matrix.configuration }}
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: hal_st
- run: tar -zxvf hal_st-*.tar.gz
- run: mkdir install && mv hal_st-*/* install/
- uses: lukka/run-cmake@2ce8982be71b8e9a3c4d5e432135035afd1e76a7 # v10.7
with:
configurePreset: ${{ matrix.target }}
buildPreset: ${{ matrix.target }}-${{ matrix.configuration }}
configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
build/
out/
megalinter-reports/
install/
21 changes: 19 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (HALST_STANDALONE)
FetchContent_Declare(
emil
GIT_REPOSITORY https://github.com/philips-software/amp-embedded-infra-lib.git
GIT_TAG dbda405cc2ef2d356fbe707df5389042a49c7959 # Unreleased
GIT_TAG 2ddda404d8822d9cdeb817629e036647a8a3a136 # v5.0.0
)

FetchContent_MakeAvailable(emil)
Expand All @@ -34,7 +34,7 @@ set_directory_properties(PROPERTY USE_FOLDERS ON)

# When building HalSt by itself do not exclude any targets from all
# Libraries will only be excluded from all when HalSt is a consumed as a dependency.
if (HALST_STANDALONE AND NOT EMIL_HOST_BUILD)
if (HALST_STANDALONE)
set(HALST_EXCLUDE_FROM_ALL "")
else()
set(HALST_EXCLUDE_FROM_ALL "EXCLUDE_FROM_ALL")
Expand All @@ -43,6 +43,7 @@ endif()
add_subdirectory(st)
add_subdirectory(hal_st)
add_subdirectory(hal_st_lwip)
add_subdirectory(integration_test)
add_subdirectory(services)
add_subdirectory(examples)

Expand All @@ -51,3 +52,19 @@ emil_clangformat_directories(hal_st DIRECTORIES .)
if (HALST_STANDALONE)
emil_folderize_all_targets()
endif()

set(CPACK_GENERATOR "ZIP;TGZ")
set(CPACK_SOURCE_IGNORE_FILES ".vs/;.git/;build/")
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
set(CPACK_PACKAGE_VENDOR "Koninklijke Philips N.V")
set(CPACK_PACKAGE_DESCRIPTION "${PROJECT_DESCRIPTION}")
set(CPACK_DEBIAN_PACKAGE_NAME "${CPACK_PACKAGE_NAME}")
set(CPACK_RPM_PACKAGE_NAME "${CPACK_PACKAGE_NAME}")
set(CPACK_PACKAGE_HOMEPAGE_URL "${PROJECT_HOMEPAGE_URL}")
set(CPACK_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR}")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR}")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")

include(CPack)
10 changes: 8 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"name": "defaults",
"hidden": true,
"binaryDir": "${sourceDir}/build/${presetName}",
"installDir": "${sourceDir}/install",
"cacheVariables": {
"HALST_BUILD_EXAMPLES": true
}
Expand All @@ -14,7 +15,8 @@
"displayName": "Configuration for Host Tooling and Tests",
"inherits": "defaults",
"cacheVariables": {
"CMAKE_CONFIGURATION_TYPES": "Debug;Release;RelWithDebInfo;MinSizeRel"
"CMAKE_CONFIGURATION_TYPES": "Debug;Release;RelWithDebInfo;MinSizeRel",
"EMIL_BUILD_ECHO_COMPILERS": true
},
"generator": "Ninja Multi-Config"
},
Expand Down Expand Up @@ -43,7 +45,6 @@
"CMAKE_TOOLCHAIN_FILE": ""
},
"cacheVariables": {
"EMIL_GENERATE_PACKAGE_CONFIG": false,
"TARGET_MCU_VENDOR": "st"
}
},
Expand Down Expand Up @@ -197,6 +198,11 @@
"name": "stm32f767-RelWithDebInfo",
"configuration": "RelWithDebInfo",
"configurePreset": "stm32f767"
},
{
"name": "stm32f767-Debug",
"configuration": "Debug",
"configurePreset": "stm32f767"
}
],
"testPresets": [
Expand Down
Loading
Loading