-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
158 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Build Linux-Ubuntu-x86 | ||
|
||
# Trigger the workflow when pushing tags that match the pattern "v*" | ||
#on: | ||
# push: | ||
# tags: | ||
# - "v*" | ||
|
||
#on: | ||
# push: | ||
# branches: ["master"] | ||
# pull_request: | ||
# branches: ["master"] | ||
|
||
on: | ||
push: | ||
branches: ["feature/aarch64"] | ||
|
||
# Set the global GitHub token environment variable | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | ||
|
||
jobs: | ||
build: | ||
name: Compile and Package SDKs | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Step 1: Checkout the repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
# Step 2: Synchronize and update submodules recursively | ||
- name: Update submodules | ||
run: | | ||
git submodule sync --recursive # Ensure submodule paths are up-to-date | ||
git submodule update --init --recursive # Initialize and update all submodules | ||
# Step 3: Extract the version number from the tag (e.g., "v1.2.3" becomes "1.2.3") | ||
- name: Extract Version Number | ||
id: extract_version | ||
run: echo "VERSION=$(echo ${GITHUB_REF#refs/tags/} | sed 's/^v//')" >> $GITHUB_ENV | ||
|
||
# Step 4: Install necessary dependencies for building the CMake project | ||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get update # Update package lists | ||
# Install build tools and required libraries for video processing | ||
sudo apt-get install -y build-essential libgtk-3-dev libavcodec-dev libavformat-dev libjpeg-dev libswscale-dev | ||
# Step 5: Start building the SDK | ||
- name: Start Building the InspireFace-Linux-x86 | ||
run: | | ||
bash command/build_linux_ubuntu18.sh | ||
ls build |
Submodule inspireface-precompile
updated
288 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
|
||
# Reusable function to handle 'install' directory operations | ||
move_install_files() { | ||
local root_dir="$1" | ||
local install_dir="$root_dir/install" | ||
|
||
# Step 1: Check if the 'install' directory exists | ||
if [ ! -d "$install_dir" ]; then | ||
echo "Error: 'install' directory does not exist in $root_dir" | ||
exit 1 | ||
fi | ||
|
||
# Step 2: Delete all other files/folders except 'install' | ||
find "$root_dir" -mindepth 1 -maxdepth 1 -not -name "install" -exec rm -rf {} + | ||
|
||
# Step 3: Move all files from 'install' to the root directory | ||
mv "$install_dir"/* "$root_dir" 2>/dev/null | ||
|
||
# Step 4: Remove the empty 'install' directory | ||
rmdir "$install_dir" | ||
|
||
echo "Files from 'install' moved to $root_dir, and 'install' directory deleted." | ||
} | ||
|
||
if [ -n "$VERSION" ]; then | ||
TAG="-$VERSION" | ||
else | ||
TAG="" | ||
fi | ||
|
||
SCRIPT_DIR=$(pwd) # Project dir | ||
BUILD_FOLDER_PATH="build/inspireface-linux-aarch64${TAG}" | ||
|
||
mkdir -p ${BUILD_FOLDER_PATH} | ||
# shellcheck disable=SC2164 | ||
cd ${BUILD_FOLDER_PATH} | ||
# export cross_compile_toolchain=/home/jingyuyan/software/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu | ||
cmake -DCMAKE_SYSTEM_NAME=Linux \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_SYSTEM_VERSION=1 \ | ||
-DCMAKE_SYSTEM_PROCESSOR=armv7 \ | ||
-DCMAKE_C_COMPILER=$ARM_CROSS_COMPILE_TOOLCHAIN/bin/arm-linux-gnueabihf-gcc \ | ||
-DCMAKE_CXX_COMPILER=$ARM_CROSS_COMPILE_TOOLCHAIN/bin/arm-linux-gnueabihf-g++ \ | ||
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -flax-vector-conversions" \ | ||
-DTARGET_PLATFORM=armlinux \ | ||
-DISF_BUILD_LINUX_ARM7=ON \ | ||
-DISF_BUILD_WITH_SAMPLE=OFF \ | ||
-DISF_BUILD_WITH_TEST=OFF \ | ||
-DISF_ENABLE_BENCHMARK=OFF \ | ||
-DISF_ENABLE_USE_LFW_DATA=OFF \ | ||
-DISF_ENABLE_TEST_EVALUATION=OFF \ | ||
-DISF_BUILD_SHARED_LIBS=ON ${SCRIPT_DIR} | ||
|
||
make -j4 | ||
make install | ||
|
||
move_install_files "$(pwd)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Use Ubuntu 18.04 as the base image | ||
FROM ubuntu:18.04 | ||
|
||
# Update the package list and install basic development tools | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
software-properties-common \ | ||
wget \ | ||
curl \ | ||
git | ||
|
||
# Install CMake | ||
RUN apt-get install -y --no-install-recommends cmake | ||
|
||
# Set the URL and installation path for the Linaro toolchain | ||
ARG LINARO_URL="https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz" | ||
ARG TOOLCHAIN_PATH="/opt/linaro-toolchain" | ||
|
||
# Create the installation path, download, and extract the Linaro toolchain | ||
RUN mkdir -p ${TOOLCHAIN_PATH} && \ | ||
wget -qO- ${LINARO_URL} | tar -xJ -C ${TOOLCHAIN_PATH} --strip-components=1 | ||
|
||
# Set environment variables to point to the toolchain directory | ||
ENV ARM_CROSS_COMPILE_TOOLCHAIN=${TOOLCHAIN_PATH} | ||
ENV PATH="${TOOLCHAIN_PATH}/bin:${PATH}" | ||
|
||
# Clean temporary files to reduce image size | ||
RUN apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Set the working directory | ||
WORKDIR /workspace | ||
|
||
# Default to running Bash | ||
CMD ["/bin/bash"] |