Upload the correct folders

This commit is contained in:
Jackson Coxson
2025-08-12 09:04:54 -06:00
parent 1f0b3bae00
commit 59f8058d3d
4 changed files with 79 additions and 6 deletions

View File

@@ -59,13 +59,51 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: idevice-c-examples-macos name: idevice-c-examples-macos
path: cpp/examples/build-c/* path: cpp/examples/build/bin/*
- name: Upload C++ examples/tools - name: Upload C++ examples/tools
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: idevice-cpp-examples-macos name: idevice-cpp-examples-macos
path: cpp/examples/build-cpp/* path: cpp/examples/build/bin/*
- name: Stage Rust tools (arm64)
shell: bash
run: |
mkdir -p dist/arm64
find target/release -maxdepth 1 -type f -exec sh -c '
for f in "$@"; do
if file "$f" | grep -Eq "Mach-O .* executable|ELF .* executable"; then
cp "$f" dist/arm64/
fi
done
' sh {} +
- name: Upload Rust tools (arm64)
uses: actions/upload-artifact@v4
with:
name: idevice-tools-macos-arm
path: dist/arm64/*
if-no-files-found: error
- name: Stage Rust tools (x64)
shell: bash
run: |
mkdir -p dist/x64
find target/x86_64-apple-darwin/release -maxdepth 1 -type f -exec sh -c '
for f in "$@"; do
if file "$f" | grep -Eq "Mach-O .* executable|ELF .* executable"; then
cp "$f" dist/x64/
fi
done
' sh {} +
- name: Upload Rust tools (x64)
uses: actions/upload-artifact@v4
with:
name: idevice-tools-macos-intel
path: dist/x64/*
if-no-files-found: error
linux: linux:
name: Linux Build name: Linux Build
@@ -112,13 +150,32 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: idevice-c-examples-linux name: idevice-c-examples-linux
path: cpp/examples/build-c/* path: cpp/examples/build/bin/*
- name: Upload C++ examples/tools - name: Upload C++ examples/tools
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: idevice-cpp-examples-linux name: idevice-cpp-examples-linux
path: cpp/examples/build-cpp/* path: cpp/examples/build/bin/*
- name: Stage Rust tools (linux)
shell: bash
run: |
mkdir -p dist
find target/release -maxdepth 1 -type f -exec sh -c '
for f in "$@"; do
if file "$f" | grep -Eq "ELF .* executable"; then
cp "$f" dist/
fi
done
' sh {} +
- name: Upload Rust tools
uses: actions/upload-artifact@v4
with:
name: idevice-tools-linux
path: dist/*
if-no-files-found: error
windows: windows:
name: Windows Build name: Windows Build
@@ -161,10 +218,23 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: idevice-c-examples-windows name: idevice-c-examples-windows
path: cpp\examples\build-c\* path: cpp\examples\build\bin\*
- name: Upload C++ examples/tools - name: Upload C++ examples/tools
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: idevice-cpp-examples-windows name: idevice-cpp-examples-windows
path: cpp\examples\build-cpp\* path: cpp\examples\build\bin\*
- name: Stage Rust tools (windows)
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path dist | Out-Null
Get-ChildItem target\release\*.exe -File | Copy-Item -Destination dist
- name: Upload Rust tools
uses: actions/upload-artifact@v4
with:
name: idevice-tools-windows
path: dist\*.exe
if-no-files-found: error

View File

@@ -10,6 +10,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(HEADER_FILE ${CMAKE_SOURCE_DIR}/../../ffi/idevice.h) set(HEADER_FILE ${CMAKE_SOURCE_DIR}/../../ffi/idevice.h)
set(STATIC_LIB ${CMAKE_SOURCE_DIR}/../../target/release/libidevice_ffi.a) set(STATIC_LIB ${CMAKE_SOURCE_DIR}/../../target/release/libidevice_ffi.a)
set(EXAMPLES_DIR ${CMAKE_SOURCE_DIR}/../examples) set(EXAMPLES_DIR ${CMAKE_SOURCE_DIR}/../examples)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(IDEVICE_CPP_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/../include) # cpp/include set(IDEVICE_CPP_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/../include) # cpp/include
set(IDEVICE_FFI_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/../../ffi) # ffi/ set(IDEVICE_FFI_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/../../ffi) # ffi/

View File

@@ -8,6 +8,7 @@ project(IdeviceFFI C)
set(HEADER_FILE ${CMAKE_SOURCE_DIR}/../idevice.h) set(HEADER_FILE ${CMAKE_SOURCE_DIR}/../idevice.h)
set(STATIC_LIB ${CMAKE_SOURCE_DIR}/../../target/release/libidevice_ffi.a) set(STATIC_LIB ${CMAKE_SOURCE_DIR}/../../target/release/libidevice_ffi.a)
set(EXAMPLES_DIR ${CMAKE_SOURCE_DIR}/../examples) set(EXAMPLES_DIR ${CMAKE_SOURCE_DIR}/../examples)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Find all C example files # Find all C example files
file(GLOB EXAMPLE_SOURCES ${EXAMPLES_DIR}/*.c) file(GLOB EXAMPLE_SOURCES ${EXAMPLES_DIR}/*.c)

View File

@@ -6,6 +6,7 @@ check-features:
ci-check: build-ffi-native build-tools-native build-cpp build-c ci-check: build-ffi-native build-tools-native build-cpp build-c
cargo clippy --all-targets --all-features -- -D warnings cargo clippy --all-targets --all-features -- -D warnings
macos-ci-check: ci-check xcframework macos-ci-check: ci-check xcframework
cd tools && cargo build --release --target x86_64-apple-darwin
[working-directory: 'ffi'] [working-directory: 'ffi']
build-ffi-native: build-ffi-native: