Skip to content

Commit

Permalink
Added macos
Browse files Browse the repository at this point in the history
  • Loading branch information
tunmx committed Dec 23, 2024
1 parent f4277f2 commit 003a10f
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 8 deletions.
99 changes: 95 additions & 4 deletions .github/workflows/release-sdks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ jobs:
run: |
bash command/build_cross_rv1106_armhf_uclibc.sh
ls build
# Step 8: Zip SDK directory
- name: Zip SDK directory
run: |
Expand All @@ -436,9 +436,98 @@ jobs:
- name: Upload SDK Artifacts
uses: actions/upload-artifact@v4
with:
name: sdk_files_armv7_rv1106_armhf_uclibc
name: sdk_files_manylinux2014_x86
path: |
inspireface-linux-armv7-rv1106-armhf-uclibc-${{ env.VERSION }}.zip
inspireface-linux-x86-manylinux2014-${{ env.VERSION }}.zip
build_macos_apple_silicon_arm64:
name: Compile MacOS Apple Silicon Arm64
runs-on: macos-14

steps:
# Step 1: Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v4

# Step 2: 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 3: Synchronize and update submodules recursively
- name: Update submodules
run: |
git clone --recurse-submodules https://github.com/tunmx/inspireface-3rdparty.git 3rdparty
# Step 4: Install necessary dependencies for building the CMake project
- name: Install Dependencies
run: |
brew install cmake
# Step 5: Start building the SDK
- name: Start Building the InspireFace-MacOS-Apple-Silicon-Arm64
run: |
bash command/build_macos_arm64.sh
ls build
# Step 6: Zip SDK directory
- name: Zip SDK directory
run: |
zip -r inspireface-macos-apple-silicon-arm64-${{ env.VERSION }}.zip build/inspireface-macos-apple-silicon-arm64-${{ env.VERSION }}
stat inspireface-macos-apple-silicon-arm64-${{ env.VERSION }}.zip
# Step 7: Upload the zipped SDK files for the next job
- name: Upload SDK Artifacts
uses: actions/upload-artifact@v4
with:
name: sdk_files_macos_apple_silicon_arm64
path: |
inspireface-macos-apple-silicon-arm64-${{ env.VERSION }}.zip
build_macos_intel_x86_64:
name: Compile MacOS intel x86_64
runs-on: macos-13

steps:
# Step 1: Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v4

# Step 2: 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 3: Synchronize and update submodules recursively
- name: Update submodules
run: |
git clone --recurse-submodules https://github.com/tunmx/inspireface-3rdparty.git 3rdparty
# Step 4: Install necessary dependencies for building the CMake project
- name: Install Dependencies
run: |
brew install cmake
# Step 5: Start building the SDK
- name: Start Building the InspireFace-MacOS-intel-x86-64
run: |
bash command/build_macos_x86.sh
ls build
# Step 6: Zip SDK directory
- name: Zip SDK directory
run: |
zip -r inspireface-macos-intel-x86-64-${{ env.VERSION }}.zip build/inspireface-macos-intel-x86-64-${{ env.VERSION }}
stat inspireface-macos-intel-x86-64-${{ env.VERSION }}.zip
# Step 7: Upload the zipped SDK files for the next job
- name: Upload SDK Artifacts
uses: actions/upload-artifact@v4
with:
name: sdk_files_macos_intel_x86_64
path: |
inspireface-macos-intel-x86-64-${{ env.VERSION }}.zip
release:
name: Release SDKs to GitHub
Expand Down Expand Up @@ -477,4 +566,6 @@ jobs:
sdk_artifacts/sdk_files_armv7_rv1106_armhf_uclibc/inspireface-linux-armv7-rv1106-armhf-uclibc-${{ env.VERSION }}.zip
sdk_artifacts/sdk_files_linux_aarch64/inspireface-linux-aarch64-${{ env.VERSION }}.zip
sdk_artifacts/sdk_files_android/inspireface-android-${{ env.VERSION }}.zip
sdk_artifacts/sdk_files_ios/inspireface-ios-${{ env.VERSION }}.zip
sdk_artifacts/sdk_files_ios/inspireface-ios-${{ env.VERSION }}.zip
sdk_artifacts/sdk_files_macos_apple_silicon_arm64/inspireface-macos-apple-silicon-arm64-${{ env.VERSION }}.zip
sdk_artifacts/sdk_files_macos_intel_x86_64/inspireface-macos-intel-x86-64-${{ env.VERSION }}.zip
2 changes: 1 addition & 1 deletion command/build_macos_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ else
TAG=""
fi

BUILD_FOLDER_PATH="build/inspireface-macos_arm64${TAG}/"
BUILD_FOLDER_PATH="build/inspireface-macos-apple-silicon-arm64${TAG}/"
SCRIPT_DIR=$(pwd) # Project dir

mkdir -p ${BUILD_FOLDER_PATH}
Expand Down
2 changes: 1 addition & 1 deletion command/build_macos_x86.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ else
TAG=""
fi

BUILD_FOLDER_PATH="build/inspireface-macos_x86${TAG}/"
BUILD_FOLDER_PATH="build/inspireface-macos-intel-x86-64${TAG}/"
SCRIPT_DIR=$(pwd) # Project dir

mkdir -p ${BUILD_FOLDER_PATH}
Expand Down
2 changes: 1 addition & 1 deletion command/build_wheel_macos_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ else
TAG=""
fi

BUILD_FOLDER_PATH="build/inspireface-macos_arm64${TAG}/"
BUILD_FOLDER_PATH="build/inspireface-macos-apple-silicon-arm64${TAG}/"
SCRIPT_DIR=$(pwd) # Project dir

mkdir -p ${BUILD_FOLDER_PATH}
Expand Down
2 changes: 1 addition & 1 deletion command/build_wheel_macos_x86.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ else
TAG=""
fi

BUILD_FOLDER_PATH="build/inspireface-macos_x86${TAG}/"
BUILD_FOLDER_PATH="build/inspireface-macos-intel-x86-64${TAG}/"
SCRIPT_DIR=$(pwd) # Project dir

mkdir -p ${BUILD_FOLDER_PATH}
Expand Down

0 comments on commit 003a10f

Please sign in to comment.