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

setup-environment: introduced android-ndk-r26d and some improvements #12

Merged
merged 28 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b559539
setup-environment: introduced android-ndk-r26d and some improvements
pavly-gerges Jun 9, 2024
2977ee9
electrostatic-sandbox-framework: unified the CMakeLists.txt using the…
pavly-gerges Jun 9, 2024
c3aa592
github/workflows: applied api changes
pavly-gerges Jun 9, 2024
773d33d
compile-electrostatic: fixed dependencies post-script
pavly-gerges Jun 9, 2024
cea3e42
scripting: further dissociation of compilers, toolchains, and depende…
pavly-gerges Jun 9, 2024
5aed8b1
setup-environment: removed verbosity for a better visualization
pavly-gerges Jun 9, 2024
ec8ffd6
Test NDK-Scripting setup
pavly-gerges Jun 9, 2024
2207b4d
setup-environment: set wget as quiet
pavly-gerges Jun 9, 2024
eb57325
setup-environment: added quiet mode to the unzip job
pavly-gerges Jun 9, 2024
96927a5
setup-environment: full clang and clangpp paths
pavly-gerges Jun 9, 2024
de5168a
electrostatic-sandbox: added the full clang and clang++ path
pavly-gerges Jun 9, 2024
b497369
setup-environment: logging downloaded and extracted files
pavly-gerges Jun 9, 2024
3c59b23
Test attempts: isolate testing ndk-scripting
pavly-gerges Jun 9, 2024
c991004
Test attempts: isolate testing ndk-scripting
pavly-gerges Jun 9, 2024
442c2be
Test attempts: isolate testing ndk-scripting
pavly-gerges Jun 9, 2024
a308b55
Test attempts: isolate testing ndk-scripting
pavly-gerges Jun 9, 2024
7fcf1fe
Test attempts: isolate testing ndk-scripting
pavly-gerges Jun 9, 2024
73d6053
Test attempts: isolate testing ndk-scripting
pavly-gerges Jun 9, 2024
7994c46
Test attempts: isolate testing ndk-scripting
pavly-gerges Jun 9, 2024
acf08e9
Test attempts: isolate testing ndk-scripting
pavly-gerges Jun 9, 2024
b03fca5
setup-environment: fixed the unzipping job
pavly-gerges Jun 9, 2024
49f4aca
electrostatic-sandbox-scripting: specified the correct binaries for a…
pavly-gerges Jun 9, 2024
a3bb4ca
compile-all-android.sh: added missing -target option specifier
pavly-gerges Jun 9, 2024
26ff573
compile-all-android.sh: dirty-linking missing essential object files
pavly-gerges Jun 9, 2024
6306a90
compile-all-android.sh: revert the faulty dirty-linking
pavly-gerges Jun 9, 2024
9d8c11a
Update build-test.yml
pavly-gerges Jun 10, 2024
dec58f2
Update build-test.yml
pavly-gerges Jun 10, 2024
cbdf74e
Merge branch 'ndk-scripting' of https://github.com/Electrostat-Lab/El…
pavly-gerges Jun 9, 2024
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
5 changes: 4 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ jobs:
- name: Setup Electrostatic-Sandbox Workstation
run: chmod +rwx ./setup-environment/setup-sandbox.sh && ./setup-environment/setup-sandbox.sh

- name: User's Permissions Granting
run: cd ./electrostatic-sandbox-framework && chmod +rwx ./helper-scripts/project-impl/*.sh

- name: Compiling electrostatic-core Native Binaries
run: cd ./electrostatic-sandbox-framework && ./helper-scripts/ci-cd/compile-electrostatic.sh

- name: Testing electrostatic-core Native Binaries
run: cd ./electrostatic-sandbox-framework && ./helper-scripts/ci-cd/test-electrostatic.sh

- name: Compiling electrostatic4j Java Binding API
run: cd ./electrostatic-sandbox-framework && ./helper-scripts/ci-cd/compile-e4j.sh "$(pwd)/electrostatic-core"
run: cd ./electrostatic-sandbox-framework && ./helper-scripts/ci-cd/compile-e4j.sh

- name: Testing electrostatic4j Java Binding API
run: cd ./electrostatic-sandbox-framework && ./helper-scripts/ci-cd/test-e4j.sh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# Ignore Gradle/CMake build output directory
build
cmake-build
dependencies
electrostatic4j-examples/libs
.so
.cache
.idea
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,32 @@ project(electrostatic-sandbox VERSION 1.0)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

message(STATUS "Project: electrostatic-sandbox")
message(STATUS "Current Library in-comission: ${COMMISSION_LIB}")
message(STATUS "GCC: ${GCC_BIN}")
message(STATUS "GPP: ${GPP_BIN}")
message(STATUS "Compiler Options: ${INPUT_COMPILER_OPTIONS}")
message(STATUS "Target architecture: ${TARGET}")
message(STATUS "Toolchain Includes: ${TOOLCHAIN_INCLUDES}")

# assign the target architecture arguments from the pre-determined directory
if("${TARGET}" STREQUAL "x86")
set(ARCH_OPTIONS "-m32")
message(STATUS "Compiling for 32-bit Intel Chipset")
elseif("${TARGET}" STREQUAL "x86-64")
set(ARCH_OPTIONS "-m64")
message(STATUS "Compiling for 64-bit Intel Chipset")
# elseif(${TARGET} STREQUAL "android-x86")
else()
set(${TARGET} "x86-64")
set(ARCH_OPTIONS "-m64")
endif()
message(STATUS "Toolchain Headers: ${TOOLCHAIN_HEADERS}")
message(STATUS "Source Directory: ${SOURCES_DIR}")
message(STATUS "Project sources: ${PROJECT_SOURCES}")
message(STATUS "Dependencies: ${DEPENDENCIES}")
message(STATUS "Building the binaries to: ${BUILD_DIR}")

set(PROJECT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${SOURCES_DIR}")

# Cmake variables
set(library_so "electrostatic")
set(library_a "electrostatic-a")
set(library_so "${COMMISSION_LIB}")
set(library_a "${COMMISSION_LIB}-a")

set(CMAKE_C_COMPILER "${GCC_BIN}")
set(CMAKE_CXX_COMPILER "${GPP_BIN}")
set(COMPILER_OPTIONS "${ARCH_OPTIONS} ${INPUT_COMPILER_OPTIONS}")

set(toolchain_headers "${TOOLCHAIN_INCLUDES}")
set(libelectrostatic "${CMAKE_CURRENT_SOURCE_DIR}/src/libelectrostatic/comm/init_protocol.c")
set(COMPILER_OPTIONS "${TARGET} ${INPUT_COMPILER_OPTIONS}")

set(headers "${toolchain_headers}"
"${CMAKE_CURRENT_SOURCE_DIR}/src/include/")
set(headers "${TOOLCHAIN_HEADERS}"
"${PROJECT_SOURCE_DIR}/dependencies/include/"
"${PROJECT_SOURCE_DIR}/src/include/")

set(libelectrostatic "${PROJECT_SOURCES}")

# add a library target
add_library(${library_a} STATIC ${libelectrostatic})
Expand All @@ -48,11 +42,13 @@ add_library(${library_so} SHARED ${libelectrostatic})
set_target_properties(${library_a} PROPERTIES COMPILE_FLAGS "${COMPILER_OPTIONS}" LINK_FLAGS "${COMPILER_OPTIONS}")
set_target_properties(${library_so} PROPERTIES COMPILE_FLAGS "${COMPILER_OPTIONS}" LINK_FLAGS "${COMPILER_OPTIONS}")


# include headers for the target
target_include_directories(${library_a} PUBLIC ${headers})
target_include_directories(${library_so} PUBLIC ${headers})

target_link_libraries(${library_a} PUBLIC "${DEPENDENCIES}")
target_link_libraries(${library_so} PUBLIC "${DEPENDENCIES}")

# Start building the target
target_sources(${library_a} PUBLIC ${libelectrostatic})
target_sources(${library_so} PUBLIC ${libelectrostatic})
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,18 @@ message(STATUS "GPP: ${GPP_BIN}")
message(STATUS "Compiler Options: ${INPUT_COMPILER_OPTIONS}")
message(STATUS "Target architecture: ${TARGET}")
message(STATUS "Toolchain Includes: ${TOOLCHAIN_INCLUDES}")
message(STATUS "Included-library: ${ELECTROSTATIC_CORE}")
message(STATUS "Runnable-example: ${EXAMPLE}")

# assign the target architecture arguments from the pre-determined directory
if("${TARGET}" STREQUAL "x86")
set(ARCH_OPTIONS "-m32")
message(STATUS "Compiling for 32-bit Intel Chipset")
elseif("${TARGET}" STREQUAL "x86-64")
set(ARCH_OPTIONS "-m64")
message(STATUS "Compiling for 64-bit Intel Chipset")
# elseif(${TARGET} STREQUAL "android-x86")
else()
set(${TARGET} "x86-64")
set(ARCH_OPTIONS "-m64")
endif()
message(STATUS "Building the binaries to: ${BUILD_DIR}")

# Cmake variables
set(executable_a "${EXAMPLE}-a.elf") # target for archive-linked binary
set(executable_so "${EXAMPLE}.elf") # target for shared-linked binary

set(CMAKE_C_COMPILER "${GCC_BIN}")
set(CMAKE_CXX_COMPILER "${GPP_BIN}")
set(COMPILER_OPTIONS "${ARCH_OPTIONS} ${INPUT_COMPILER_OPTIONS}")
set(COMPILER_OPTIONS "${TARGET} ${INPUT_COMPILER_OPTIONS}")

set(lib_headers "${ELECTROSTATIC_CORE}/src/include")
set(lib_headers "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/include")
set(headers "${TOOLCHAIN_INCLUDES}")

# C sources
Expand All @@ -52,8 +39,8 @@ set_target_properties(${executable_so} PROPERTIES COMPILE_FLAGS "${COMPILER_OPTI
target_include_directories(${executable_a} PUBLIC ${lib_headers} ${headers})
target_include_directories(${executable_so} PUBLIC ${lib_headers} ${headers})

target_link_libraries(${executable_a} "${ELECTROSTATIC_CORE}/build/${TARGET}/libelectrostatic-a.a")
target_link_libraries(${executable_so} "${ELECTROSTATIC_CORE}/build/${TARGET}/libelectrostatic.so")
target_link_libraries(${executable_a} "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libs/${BUILD_DIR}/libelectrostatic-a.a")
target_link_libraries(${executable_so} "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libs/${BUILD_DIR}/libelectrostatic.so")

# Start building the target
target_sources(${executable_a} PUBLIC ${sources})
Expand Down

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading