Skip to content

Commit

Permalink
update cmake and ios mac demo link path
Browse files Browse the repository at this point in the history
  • Loading branch information
yonielwest committed Feb 23, 2024
1 parent a73f9d8 commit ec0e148
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 85 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/cmake-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,19 @@ jobs:

- name: Build with Gradle
working-directory: src/android/java
run: ./gradlew :gpupixel:assemble
run: ./gradlew :gpupixel:assembleRelease

- name: Create zip
working-directory: ${{github.workspace}}/src/android/java/gpupixel/build/outputs/aar
run: zip -r gpupixel_android_arm64_v8a_aar.zip .
working-directory: ${{github.workspace}}/output
run: |
cp -r ${{github.workspace}}/src/android/java/gpupixel/build/outputs/aar ${{github.workspace}}/output/library/android
zip -r gpupixel_android_arm64_v8a.zip .
- name: Upload Android Artifact
uses: actions/upload-artifact@v4
with:
name: gpupixel_android_arm64_v8a_aar
path: ${{github.workspace}}/src/android/java/gpupixel/build/outputs/aar/gpupixel_android_arm64_v8a_aar.zip
name: gpupixel_android_arm64_v8a
path: ${{github.workspace}}/output/gpupixel_android_arm64_v8a.zip

# Deployment job
deploy:
Expand Down Expand Up @@ -192,7 +194,7 @@ jobs:
- name: Download Android Artifact
uses: actions/download-artifact@v4
with:
name: gpupixel_android_arm64_v8a_aar
name: gpupixel_android_arm64_v8a
path: ./

- name: Create Release
Expand Down Expand Up @@ -253,6 +255,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./gpupixel_android_arm64_v8a_aar.zip
asset_name: gpupixel_android_arm64_v8a_aar.zip
asset_path: ./gpupixel_android_arm64_v8a.zip
asset_name: gpupixel_android_arm64_v8a.zip
asset_content_type: application/gzip
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GPUPixel Version: v1.2.3
GPUPixel Version: v1.2.4
## What's New

1. Add ci script for building libs and demo.
1. opt cmake and update demo
40 changes: 11 additions & 29 deletions examples/app.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,17 @@ SET(CMAKE_INCLUDE_OUTPUT_DIRECTORY "${OUTPUT_INSTALL_PATH}/include")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${OUTPUT_INSTALL_PATH}/library/${CURRENT_OS}")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${OUTPUT_INSTALL_PATH}/library/${CURRENT_OS}")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_INSTALL_PATH}/app/${CURRENT_OS}")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/debug)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/debug)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/debug)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/release)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/release)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/release)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(CMAKE_BUILD_TYPE Debug)
LINK_DIRECTORIES(${CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG})
SET(APP_RESOURCE_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG})
set(COPY_DST_RUNTIME_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG})
else()
SET(CMAKE_BUILD_TYPE Release)
LINK_DIRECTORIES(${CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE})
SET(APP_RESOURCE_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE})
set(COPY_DST_RUNTIME_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE})
endif()

LINK_DIRECTORIES(${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
SET(APP_RESOURCE_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
SET(COPY_DST_RUNTIME_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})


# Config source and header file
Expand Down Expand Up @@ -80,13 +72,7 @@ IF(${CURRENT_OS} STREQUAL "linux")
gpupixel
GL
glfw)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(GPUPIXEL_LIBS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG}/libgpupixel.so)
else()
SET(GPUPIXEL_LIBS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE}/libgpupixel.so)
endif()

SET(GPUPIXEL_LIBS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libgpupixel.so)
FIlE(GLOB VNN_LIBS
${CMAKE_CURRENT_SOURCE_DIR}/../src/third_party/vnn/libs/${CURRENT_OS}/*
)
Expand All @@ -101,11 +87,7 @@ ELSEIF(${CURRENT_OS} STREQUAL "windows")
${CMAKE_CURRENT_SOURCE_DIR}/../src/third_party/vnn/libs/${CURRENT_OS}/x64/*
)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(GPUPIXEL_LIBS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG}/libgpupixel.dll)
else()
SET(GPUPIXEL_LIBS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE}/libgpupixel.dll)
endif()
SET(GPUPIXEL_LIBS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libgpupixel.dll)
ENDIF()

# copy resource file
Expand Down
14 changes: 8 additions & 6 deletions examples/ios/GPUPixelApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
840CD3D42B88448900EEF7B0 /* gpupixel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 840CD3D32B88448900EEF7B0 /* gpupixel.framework */; };
840CD3D52B88448900EEF7B0 /* gpupixel.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 840CD3D32B88448900EEF7B0 /* gpupixel.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
840FD5CF2B82455100781FA6 /* vnn_kit_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 840FD5CC2B82455100781FA6 /* vnn_kit_ios.framework */; };
840FD5D02B82455100781FA6 /* vnn_kit_ios.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 840FD5CC2B82455100781FA6 /* vnn_kit_ios.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
840FD5D12B82455100781FA6 /* vnn_face_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 840FD5CD2B82455100781FA6 /* vnn_face_ios.framework */; };
Expand All @@ -23,8 +25,6 @@
84307E9F261F2CDC003EAC98 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84307E9D261F2CDC003EAC98 /* LaunchScreen.storyboard */; };
84307EA2261F2CDC003EAC98 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84307EA1261F2CDC003EAC98 /* main.m */; };
843580EE276352260053E16A /* ImageFilterController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 843580EC276352260053E16A /* ImageFilterController.mm */; };
8453D7092B67C42A009C0532 /* gpupixel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8453D7082B67C42A009C0532 /* gpupixel.framework */; };
8453D70A2B67C42A009C0532 /* gpupixel.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8453D7082B67C42A009C0532 /* gpupixel.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
847244A22A6034BF009D1488 /* VideoCapturer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8472449E2A603368009D1488 /* VideoCapturer.m */; };
84A0D77A2B7DAB49007A86EF /* sample_face.png in Resources */ = {isa = PBXBuildFile; fileRef = 84A0D7792B7DAB49007A86EF /* sample_face.png */; };
84C1D161266F5D69006D1AB4 /* VideoFilterController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84C1D15F266F5D69006D1AB4 /* VideoFilterController.mm */; };
Expand All @@ -37,8 +37,8 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
840CD3D52B88448900EEF7B0 /* gpupixel.framework in Embed Frameworks */,
840FD5D02B82455100781FA6 /* vnn_kit_ios.framework in Embed Frameworks */,
8453D70A2B67C42A009C0532 /* gpupixel.framework in Embed Frameworks */,
840FD5D42B82455100781FA6 /* vnn_core_ios.framework in Embed Frameworks */,
840FD5D22B82455100781FA6 /* vnn_face_ios.framework in Embed Frameworks */,
);
Expand All @@ -48,6 +48,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
840CD3D32B88448900EEF7B0 /* gpupixel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = gpupixel.framework; path = ../../output/library/ios/gpupixel.framework; sourceTree = "<group>"; };
840FD5CC2B82455100781FA6 /* vnn_kit_ios.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vnn_kit_ios.framework; path = ../../src/third_party/vnn/libs/ios/vnn_kit_ios.framework; sourceTree = "<group>"; };
840FD5CD2B82455100781FA6 /* vnn_face_ios.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vnn_face_ios.framework; path = ../../src/third_party/vnn/libs/ios/vnn_face_ios.framework; sourceTree = "<group>"; };
840FD5CE2B82455100781FA6 /* vnn_core_ios.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vnn_core_ios.framework; path = ../../src/third_party/vnn/libs/ios/vnn_core_ios.framework; sourceTree = "<group>"; };
Expand Down Expand Up @@ -83,8 +84,8 @@
buildActionMask = 2147483647;
files = (
840FD5CF2B82455100781FA6 /* vnn_kit_ios.framework in Frameworks */,
8453D7092B67C42A009C0532 /* gpupixel.framework in Frameworks */,
840FD5D32B82455100781FA6 /* vnn_core_ios.framework in Frameworks */,
840CD3D42B88448900EEF7B0 /* gpupixel.framework in Frameworks */,
8417C43C267F5B470074DDEF /* CoreMedia.framework in Frameworks */,
840FD5D12B82455100781FA6 /* vnn_face_ios.framework in Frameworks */,
8417C43A267F5AF10074DDEF /* AVFoundation.framework in Frameworks */,
Expand Down Expand Up @@ -139,6 +140,7 @@
84EEBF41261F2DC5000AD4AE /* Frameworks */ = {
isa = PBXGroup;
children = (
840CD3D32B88448900EEF7B0 /* gpupixel.framework */,
840FD5CE2B82455100781FA6 /* vnn_core_ios.framework */,
840FD5CD2B82455100781FA6 /* vnn_face_ios.framework */,
840FD5CC2B82455100781FA6 /* vnn_kit_ios.framework */,
Expand Down Expand Up @@ -380,7 +382,7 @@
DEVELOPMENT_TEAM = QFCE3TAQXQ;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(SRCROOT)/../../output/library/ios/$(CONFIGURATION)",
"$(SRCROOT)/../../output/library/ios",
"$(SRCROOT)/../../src/third_party/vnn/libs/ios",
);
GCC_PREPROCESSOR_DEFINITIONS = (
Expand Down Expand Up @@ -420,7 +422,7 @@
DEVELOPMENT_TEAM = QFCE3TAQXQ;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(SRCROOT)/../..//output/library/ios/$(CONFIGURATION)",
"$(SRCROOT)/../..//output/library/ios",
"$(SRCROOT)/../../src/third_party/vnn/libs/ios",
);
HEADER_SEARCH_PATHS = "";
Expand Down
14 changes: 8 additions & 6 deletions examples/mac/GPUPixelMacApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
objects = {

/* Begin PBXBuildFile section */
840CD3D12B8843CD00EEF7B0 /* gpupixel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 840CD3CF2B88431900EEF7B0 /* gpupixel.framework */; };
840CD3D22B8843CD00EEF7B0 /* gpupixel.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 840CD3CF2B88431900EEF7B0 /* gpupixel.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
840FD5BD2B7E523D00781FA6 /* vnn_face_osx.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 840FD5BA2B7E523D00781FA6 /* vnn_face_osx.framework */; };
840FD5BE2B7E523D00781FA6 /* vnn_face_osx.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 840FD5BA2B7E523D00781FA6 /* vnn_face_osx.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
840FD5BF2B7E523D00781FA6 /* vnn_core_osx.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 840FD5BB2B7E523D00781FA6 /* vnn_core_osx.framework */; };
840FD5C02B7E523D00781FA6 /* vnn_core_osx.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 840FD5BB2B7E523D00781FA6 /* vnn_core_osx.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
840FD5C12B7E523D00781FA6 /* vnn_kit_osx.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 840FD5BC2B7E523D00781FA6 /* vnn_kit_osx.framework */; };
840FD5C22B7E523D00781FA6 /* vnn_kit_osx.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 840FD5BC2B7E523D00781FA6 /* vnn_kit_osx.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
8453D7052B67BE5B009C0532 /* gpupixel.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8453D7032B67BE5B009C0532 /* gpupixel.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
8453D7062B67C1C9009C0532 /* gpupixel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8453D7032B67BE5B009C0532 /* gpupixel.framework */; };
84AE136B26FCBCAA00E215AE /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84AE136A26FCBCAA00E215AE /* AVFoundation.framework */; };
84AE137526FCBCDA00E215AE /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84AE137426FCBCDA00E215AE /* CoreMedia.framework */; };
84AE137A26FCBCFA00E215AE /* VideoCameraManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84AE137926FCBCFA00E215AE /* VideoCameraManager.mm */; };
Expand All @@ -32,7 +32,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
8453D7052B67BE5B009C0532 /* gpupixel.framework in Embed Frameworks */,
840CD3D22B8843CD00EEF7B0 /* gpupixel.framework in Embed Frameworks */,
840FD5C02B7E523D00781FA6 /* vnn_core_osx.framework in Embed Frameworks */,
840FD5BE2B7E523D00781FA6 /* vnn_face_osx.framework in Embed Frameworks */,
840FD5C22B7E523D00781FA6 /* vnn_kit_osx.framework in Embed Frameworks */,
Expand All @@ -44,6 +44,7 @@

/* Begin PBXFileReference section */
840303632B5C2737001A8B3C /* VideoCameraManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VideoCameraManager.h; sourceTree = "<group>"; };
840CD3CF2B88431900EEF7B0 /* gpupixel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = gpupixel.framework; path = ../../output/library/macos/gpupixel.framework; sourceTree = "<group>"; };
840FD5BA2B7E523D00781FA6 /* vnn_face_osx.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vnn_face_osx.framework; path = ../../src/third_party/vnn/libs/macos/vnn_face_osx.framework; sourceTree = "<group>"; };
840FD5BB2B7E523D00781FA6 /* vnn_core_osx.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vnn_core_osx.framework; path = ../../src/third_party/vnn/libs/macos/vnn_core_osx.framework; sourceTree = "<group>"; };
840FD5BC2B7E523D00781FA6 /* vnn_kit_osx.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vnn_kit_osx.framework; path = ../../src/third_party/vnn/libs/macos/vnn_kit_osx.framework; sourceTree = "<group>"; };
Expand All @@ -69,9 +70,9 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8453D7062B67C1C9009C0532 /* gpupixel.framework in Frameworks */,
840FD5C12B7E523D00781FA6 /* vnn_kit_osx.framework in Frameworks */,
84AE137526FCBCDA00E215AE /* CoreMedia.framework in Frameworks */,
840CD3D12B8843CD00EEF7B0 /* gpupixel.framework in Frameworks */,
84AE136B26FCBCAA00E215AE /* AVFoundation.framework in Frameworks */,
840FD5BD2B7E523D00781FA6 /* vnn_face_osx.framework in Frameworks */,
840FD5BF2B7E523D00781FA6 /* vnn_core_osx.framework in Frameworks */,
Expand All @@ -84,6 +85,7 @@
84AE136526FCBC9B00E215AE /* Frameworks */ = {
isa = PBXGroup;
children = (
840CD3CF2B88431900EEF7B0 /* gpupixel.framework */,
840FD5BB2B7E523D00781FA6 /* vnn_core_osx.framework */,
840FD5BA2B7E523D00781FA6 /* vnn_face_osx.framework */,
840FD5BC2B7E523D00781FA6 /* vnn_kit_osx.framework */,
Expand Down Expand Up @@ -345,7 +347,7 @@
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/GPUPixelMacApp",
"$(PROJECT_DIR)/../../output/library/macos/$(CONFIGURATION)",
"$(PROJECT_DIR)/../../output/library/macos",
"$(PROJECT_DIR)/../../src/third_party/vnn/libs/macos",
);
GCC_PREPROCESSOR_DEFINITIONS = (
Expand Down Expand Up @@ -381,7 +383,7 @@
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/GPUPixelMacApp",
"$(PROJECT_DIR)/../../output/library/macos/$(CONFIGURATION)",
"$(PROJECT_DIR)/../../output/library/macos",
);
GCC_PREPROCESSOR_DEFINITIONS = "";
INFOPLIST_FILE = GPUPixelMacApp/Info.plist;
Expand Down
Loading

0 comments on commit ec0e148

Please sign in to comment.