diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4d0c8cb..71bf4a0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: submodules: recursive - name: Install dependencies run: | - sudo apt-get install -y cmake ninja-build ccache + sudo apt-get install -y cmake ninja-build ccache scons - name: ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -37,7 +37,7 @@ jobs: submodules: recursive - name: Install dependencies run: | - sudo apt-get install -y cmake ninja-build ccache + sudo apt-get install -y cmake ninja-build ccache scons - name: ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -51,28 +51,28 @@ jobs: - name: Build run: | cmake --build build --parallel - windows-msvc-build: - runs-on: windows-latest - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Setup ccache - uses: Chocobo1/setup-ccache-action@v1 - with: - windows_compile_environment: msvc - - name: CMake configure - shell: bash - run: > - cmake -S . -B build - -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - - name: Build - shell: bash - run: | - cmake --build build --config Release --parallel + # windows-msvc-build: + # runs-on: windows-latest + # defaults: + # run: + # shell: bash + # steps: + # - uses: actions/checkout@v4 + # with: + # submodules: recursive + # - name: Setup ccache + # uses: Chocobo1/setup-ccache-action@v1 + # with: + # windows_compile_environment: msvc + # - name: CMake configure + # shell: bash + # run: > + # cmake -S . -B build + # -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + # - name: Build + # shell: bash + # run: | + # cmake --build build --config Release --parallel macos-clang-build: runs-on: macOS-latest steps: @@ -81,7 +81,7 @@ jobs: submodules: recursive - name: Install dependencies run: | - brew install ninja + brew install ninja scons - name: ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -103,7 +103,7 @@ jobs: submodules: true - name: Install dependencies run: | - sudo apt-get install -y cmake ninja-build ccache gcovr lcov + sudo apt-get install -y cmake ninja-build ccache gcovr lcov scons - uses: actions/checkout@v4 with: submodules: true diff --git a/.github/workflows/static-analysis-pr.yml b/.github/workflows/static-analysis-pr.yml index cc42da8..51c9493 100644 --- a/.github/workflows/static-analysis-pr.yml +++ b/.github/workflows/static-analysis-pr.yml @@ -18,7 +18,7 @@ jobs: name: Run clang-tidy with: build_dir: build - apt_packages: ninja-build + apt_packages: ninja-build scons cmake_command: cmake -S . -B build -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON config_file: .clang-tidy exclude: 3rdparty diff --git a/.gitmodules b/.gitmodules index fb989f7..255b72b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "3rdparty/googletest"] path = 3rdparty/googletest url = https://github.com/google/googletest +[submodule "3rdparty/ComputeLibrary"] + path = 3rdparty/ComputeLibrary + url = https://github.com/embedded-dev-research/ComputeLibrary diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 73deebc..7d0b2d8 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -1 +1,26 @@ add_subdirectory(googletest) + +set(COMPUTE_LIBRARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ComputeLibrary) +set(CMAKE_BUILD_PARALLEL_LEVEL 4) + +if (LINUX) + set(ACL_OS "linux") +elseif(APPLE) + set(ACL_OS "macos") +else() + set(ACL_OS "unknown") +endif() + +if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(ACL_ARCH "x86") +elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") + set(ACL_ARCH "armv8.2-a") +else() + set(ACL_OS "unknown") +endif() + +add_custom_target(build_compute_library ALL + COMMAND scons Werror=1 debug=0 asserts=0 neon=0 opencl=0 os=${ACL_OS} embed_kernels=1 arch=${ACL_ARCH} -j${CMAKE_BUILD_PARALLEL_LEVEL} + WORKING_DIRECTORY ${COMPUTE_LIBRARY_DIR} + COMMENT "Building Arm Compute Library with scons" +) diff --git a/3rdparty/ComputeLibrary b/3rdparty/ComputeLibrary new file mode 160000 index 0000000..c61bd33 --- /dev/null +++ b/3rdparty/ComputeLibrary @@ -0,0 +1 @@ +Subproject commit c61bd3387403b76d618915ccebf5e9585f52a071