Skip to content

Commit

Permalink
Dummy update
Browse files Browse the repository at this point in the history
  • Loading branch information
jthierry-psee committed Sep 10, 2024
1 parent 53b3618 commit fb5cfc5
Show file tree
Hide file tree
Showing 580 changed files with 22,761 additions and 13,088 deletions.
122 changes: 61 additions & 61 deletions .github/workflows/all_jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,43 @@ on:

env:
#General variables
numpy_version: "numpy==1.23.4" # replace with only 'numpy' if no version needed
python_versions: 3.8
pybind_version: "2.6.0"
python_versions: 3.9
#Windows variables
python_executable: "C:/hostedtoolcache/windows/Python/3.8.10/x64/python.exe" #Cmake needs this to find python on windows
python_executable: "C:/hostedtoolcache/windows/Python/3.9.9/x64/python.exe" #Cmake needs this to find python on windows

jobs:
jobs:

container-ubuntu-20-job:
name: Build Ubuntu 20 Image
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
container-ubuntu-22-job:
name: Build Ubuntu 22 Image
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.PSEE_DOCKER_HUB_USER }}
password: ${{ secrets.PSEE_DOCKER_HUB_ACCESS_TOKEN }}
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.PSEE_DOCKER_HUB_USER }}
password: ${{ secrets.PSEE_DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: utils/containers/Dockerfile.OpenEB
push: true
build-args: UBUNTU_VERSION=20.04
tags: prophesee/openeb:ubuntu-20.04
- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: utils/containers/Dockerfile.OpenEB
push: true
build-args: BASE_IMAGE_TAG=22.04
tags: prophesee/openeb:ubuntu-22.04

job1:
name: Ubuntu 20
needs: container-ubuntu-20-job
runs-on: ubuntu-20.04
name: Ubuntu 22
needs: container-ubuntu-22-job
runs-on: ubuntu-22.04
container:
image: prophesee/openeb:ubuntu-20.04
image: prophesee/openeb:ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -53,8 +51,9 @@ jobs:

- name: Build openEB
run: |
cmake -B build -DBUILD_TESTING=ON
cmake --build build --config Release --parallel `nproc`
mkdir build && cd build
cmake .. -DBUILD_TESTING=ON
cmake --build . --config Release --parallel 4
- name: Getting datasets from storage
uses: dawidd6/action-download-artifact@v2
Expand All @@ -69,37 +68,38 @@ jobs:
cd build
ctest --output-on-failure
container-ubuntu-22-job:
name: Build Ubuntu 22 Image
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.PSEE_DOCKER_HUB_USER }}
password: ${{ secrets.PSEE_DOCKER_HUB_ACCESS_TOKEN }}
container-ubuntu-24-job:
name: Build Ubuntu 24 Image
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.PSEE_DOCKER_HUB_USER }}
password: ${{ secrets.PSEE_DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: utils/containers/Dockerfile.OpenEB
push: true
build-args: UBUNTU_VERSION=22.04
tags: prophesee/openeb:ubuntu-22.04
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: utils/containers/Dockerfile.OpenEB
push: true
build-args: BASE_IMAGE_TAG=24.04
tags: prophesee/openeb:ubuntu-24.04

job2:
name: Ubuntu 22
needs: container-ubuntu-22-job
runs-on: ubuntu-22.04
name: Ubuntu 24
needs: container-ubuntu-24-job
runs-on: ubuntu-24.04
container:
image: prophesee/openeb:ubuntu-22.04
image: prophesee/openeb:ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -108,9 +108,8 @@ jobs:

- name: Build openEB
run: |
mkdir build && cd build
cmake .. -DBUILD_TESTING=ON
cmake --build . --config Release --parallel 4
cmake -B build -DBUILD_TESTING=ON
cmake --build build --config Release --parallel `nproc`
- name: Getting datasets from storage
uses: dawidd6/action-download-artifact@v2
Expand All @@ -125,6 +124,7 @@ jobs:
cd build
ctest --output-on-failure
job3:
name: Windows
runs-on: windows-2019
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
cd ..
unzip -q "vcpkg-export.zip"
7z x ffmpeg-archive.7z
$python_executable -m pip install pytest $numpy_version opencv-python==4.5.5.64 torch==1.13.1 scipy sk-video==1.1.10 numba==0.56.3 h5py command_runner kornia==0.6.8 pytorch_lightning==1.8.6 pytorch_msssim==0.2.1
$python_executable -m pip install -r openeb/utils/python/requirements_openeb.txt
cd openeb
- name: Build openEB
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/upload_win_binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
- cron: "15 2 1 */2 *"

env:
win_binaries_download_address: "https://prophesee-bamboo.s3.eu-west-1.amazonaws.com/build-env/vcpkg-export-20230323-MV4.0.0.zip"
# TODO update for v5.0.0 release
win_binaries_download_address: "https://prophesee-bamboo.s3.eu-west-1.amazonaws.com/build-env/vcpkg-export-20240909-MV_V4.6.2.zip"
ffmpeg_archive_download_address: "https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "hdf5_ecf"]
path = sdk/modules/driver/cpp/3rdparty/hdf5_ecf
path = sdk/modules/stream/cpp/3rdparty/hdf5_ecf
url = https://github.com/prophesee-ai/hdf5_ecf.git
80 changes: 51 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ endif(NOT CMAKE_BUILD_TYPE)

cmake_minimum_required(VERSION 3.5)

project(metavision VERSION 4.6.2)
set(PROJECT_VERSION_SUFFIX "")
project(metavision VERSION 5.0.0)
set(PROJECT_VERSION_SUFFIX "dev")

if(PROJECT_VERSION_SUFFIX STREQUAL "")
set(PROJECT_VERSION_FULL "${PROJECT_VERSION}")
Expand Down Expand Up @@ -60,7 +60,7 @@ endif (ANDROID)
set(HAL_BUILD_PLUGIN_PATH "${PROJECT_BINARY_DIR}/${HAL_INSTALL_PLUGIN_RELATIVE_PATH}")

# Set output directory for generated files
set(GENERATE_FILES_DIRECTORY ${CMAKE_BINARY_DIR}/generated)
set(GENERATE_FILES_DIRECTORY ${PROJECT_BINARY_DIR}/generated)
file(MAKE_DIRECTORY ${GENERATE_FILES_DIRECTORY})

# Update CMAKE_MODULE_PATH
Expand All @@ -75,33 +75,35 @@ include(lfs_download)
include(add_pytest)
include(common_macros)

if (ANDROID AND NOT ENV_CMAKE)
# Those OVERLOAD_ functions are used to be able to bypass default Metavision
# implementation of Android support to give a different own depending on
# dependencies management
set(ENV_CMAKE cmake/android/env.cmake)
set(PREBUILT_BASE_DIR utils/android)
set(PREBUILT_FILENAME prebuilt-3rdparty.tar.gz)

# Setup 3rd party prebuilt libraries dir
set(ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR ${GENERATE_FILES_DIRECTORY}/android/3rdparty)
if (NOT EXISTS ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})
lfs_download(${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME} COMPILATION)
message(STATUS "Unpacking ${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME} in ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR}")
file(MAKE_DIRECTORY ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar -xf ${PROJECT_SOURCE_DIR}/${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME}
WORKING_DIRECTORY ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR}
)
endif (NOT EXISTS ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})
if (ANDROID)
if (NOT ENV_CMAKE)
# Those OVERLOAD_ functions are used to be able to bypass default Metavision
# implementation of Android support to give a different own depending on
# dependencies management
set(ENV_CMAKE ${PROJECT_SOURCE_DIR}/cmake/android/env.cmake)
set(PREBUILT_BASE_DIR utils/android)
set(PREBUILT_FILENAME prebuilt-3rdparty.tar.gz)

# Setup 3rd party prebuilt libraries dir
set(ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR ${GENERATE_FILES_DIRECTORY}/android/3rdparty)
if (NOT EXISTS ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})
lfs_download(${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME} COMPILATION)
message(STATUS "Unpacking ${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME} in ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR}")
file(MAKE_DIRECTORY ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar -xf ${PROJECT_SOURCE_DIR}/${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME}
WORKING_DIRECTORY ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR}
)
endif (NOT EXISTS ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})

# Use Android env.cmake to find required dependencies
set(ANDROID_PREBUILT_3RDPARTY_DIR ${GENERATE_FILES_DIRECTORY}/android/3rdparty/prebuilt)
include(${ENV_CMAKE})
endif()

# Include the function required to build an Android APK
include(add_android_app)

# Use Android env.cmake to find required dependencies
set(ANDROID_PREBUILT_3RDPARTY_DIR ${GENERATE_FILES_DIRECTORY}/android/3rdparty/prebuilt)
include(${ENV_CMAKE})
endif (ANDROID AND NOT ENV_CMAKE)
endif()

###################################################

Expand Down Expand Up @@ -203,7 +205,7 @@ find_package(Threads REQUIRED)
find_package(LibUSB REQUIRED)

# Boost
set (boost_components_to_find program_options filesystem timer chrono thread)
set (boost_components_to_find program_options timer chrono thread)
find_package(Boost COMPONENTS ${boost_components_to_find} REQUIRED)
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS) ## needed to get rid of warning `#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...)`

Expand Down Expand Up @@ -252,11 +254,21 @@ if (BUILD_TESTING)
endif()

set(PYTEST_CMD ${PYTHON_${PYTEST_PYTHON_VERSION}_EXECUTABLE} -m pytest)

# Perform additional test to ensure that variable `PYTEST_CMD` resulted to a valid executable.
# Throw fatal error otherwise to inform user something went wrong.
string(COMPARE EQUAL "${PYTEST_CMD}" "-m pytest" PYTEST_CMD_IS_INVALID)

if(PYTEST_CMD_IS_INVALID)
message(WARNING "Problem with finding valid 'pytest' version, try overriding with: '-DPYTEST_PYTHON_VERSION=<version>'! ")
endif(PYTEST_CMD_IS_INVALID)

if(CMAKE_CROSSCOMPILING)
# When cross compiling, we cannot use python executable path from the Host
set(PYTEST_CMD pytest) # TODO we need a proper way to find python executable path on the TARGET.
endif(CMAKE_CROSSCOMPILING)


lfs_download(datasets/openeb/gen31_timer.raw VALIDATION)
lfs_download(datasets/openeb/gen31_timer.hdf5 VALIDATION)
lfs_download(datasets/openeb/gen31_timer_holes.raw VALIDATION)
Expand All @@ -265,10 +277,12 @@ if (BUILD_TESTING)
lfs_download(datasets/openeb/gen4_evt2_hand.hdf5 VALIDATION)
lfs_download(datasets/openeb/gen4_evt3_hand.raw VALIDATION)
lfs_download(datasets/openeb/gen4_evt3_hand.hdf5 VALIDATION)
lfs_download(datasets/openeb/gen4_evt4_hand.raw VALIDATION)
lfs_download(datasets/openeb/blinking_gen4_with_ext_triggers.raw VALIDATION)
lfs_download(datasets/openeb/blinking_gen4_with_ext_triggers.hdf5 VALIDATION)
lfs_download(datasets/openeb/claque_doigt_evt21.raw VALIDATION)
lfs_download(datasets/openeb/claque_doigt_evt21.hdf5 VALIDATION)
lfs_download(datasets/openeb/claque_doigt_evt4.raw VALIDATION)
lfs_download(datasets/openeb/standup_evt21-legacy.raw VALIDATION)
lfs_download(datasets/openeb/standup_evt21-legacy.hdf5 VALIDATION)
lfs_download(datasets/openeb/diff3d.raw VALIDATION)
Expand Down Expand Up @@ -347,7 +361,7 @@ endif(CODE_COVERAGE)

################################################### Detect which SDK modules are available

set(METAVISION_SDK_MODULES_OPEN base core driver CACHE STRING "SDK Open modules")
set(METAVISION_SDK_MODULES_OPEN base core stream CACHE STRING "SDK Open modules")
if (COMPILE_PYTHON3_BINDINGS)
list(APPEND METAVISION_SDK_MODULES_OPEN core_ml)
endif (COMPILE_PYTHON3_BINDINGS)
Expand Down Expand Up @@ -388,6 +402,10 @@ add_cpack_component(PUBLIC metavision-open-lib metavision-open-bin metavision-op
if(COMPILE_PYTHON3_BINDINGS)
add_cpack_component(PUBLIC metavision-open-python metavision-open-python-samples)
add_python_cpack_components(PUBLIC metavision-open)

install(FILES ${PROJECT_SOURCE_DIR}/utils/python/requirements_openeb.txt
DESTINATION share/metavision/python_requirements
COMPONENT metavision-open-python)
endif(COMPILE_PYTHON3_BINDINGS)

# Add Metavision SDK debian packages :
Expand All @@ -397,6 +415,10 @@ if (METAVISION_SDK_ADVANCED_MODULES_AVAILABLE)
if(COMPILE_PYTHON3_BINDINGS)
add_cpack_component(PUBLIC metavision-sdk-advanced-python metavision-sdk-advanced-python-samples)
add_python_cpack_components(PUBLIC metavision-sdk-advanced)

install(FILES ${PROJECT_SOURCE_DIR}/utils/python/requirements_sdk_advanced.txt
DESTINATION share/metavision/python_requirements
COMPONENT metavision-sdk-advanced-python)
endif(COMPILE_PYTHON3_BINDINGS)

# SDK
Expand Down
Loading

0 comments on commit fb5cfc5

Please sign in to comment.