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

add build actions #1

Merged
merged 3 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
82 changes: 82 additions & 0 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: android

on:
push:
branches: ["main"]
paths-ignore:
- "**.md"
- "LICENSE"
pull_request:
branches: ["main"]
paths-ignore:
- "**.md"
- "LICENSE"

jobs:
android:
name: android
runs-on: ubuntu-24.04
env:
PACKAGE_NAME: libdartcv-android
COMMON_CMAKE_OPTIONS: |
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake \
-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_PLATFORM=android-24 \
-DCMAKE_BUILD_TYPE=Release \
-DANDROID_STL=c++_static \
-DANDROID_ARM_NEON=ON \
-DDARTCV_WITH_VIDEOIO=ON \
steps:
- uses: actions/checkout@v4
- name: armeabi-v7a
run: |
mkdir -p build/armeabi-v7a && cd build/armeabi-v7a
cmake -S ${{ github.workspace }} \
${{ env.COMMON_CMAKE_OPTIONS }} \
-DANDROID_ABI="armeabi-v7a" \
-DCMAKE_INSTALL_PREFIX="install" \

cmake --build . --config Release -j $(nproc)
cmake --build . --config Release --target install
- name: arm64-v8a
run: |
mkdir -p build/arm64-v8a && cd build/arm64-v8a
cmake -S ${{ github.workspace }} \
${{ env.COMMON_CMAKE_OPTIONS }} \
-DANDROID_ABI="arm64-v8a" \
-DCMAKE_INSTALL_PREFIX="install" \

cmake --build . --config Release -j $(nproc)
cmake --build . --config Release --target install
- name: x86_64
run: |
mkdir -p build/x86_64 && cd build/x86_64
cmake -S ${{ github.workspace }} \
${{ env.COMMON_CMAKE_OPTIONS }} \
-DANDROID_ABI="x86_64" \
-DCMAKE_INSTALL_PREFIX="install" \

cmake --build . --config Release -j $(nproc)
cmake --build . --config Release --target install
- name: x86
run: |
mkdir -p build/x86 && cd build/x86
cmake -S ${{ github.workspace }} \
${{ env.COMMON_CMAKE_OPTIONS }} \
-DANDROID_ABI="x86" \
-DCMAKE_INSTALL_PREFIX="install" \

cmake --build . --config Release -j $(nproc)
cmake --build . --config Release --target install
- name: package
run: |
mkdir -p ${{ env.PACKAGE_NAME }}
cp -rf build/armeabi-v7a/install ${{ env.PACKAGE_NAME }}/armeabi-v7a
cp -rf build/arm64-v8a/install ${{ env.PACKAGE_NAME }}/arm64-v8a
cp -rf build/x86_64/install ${{ env.PACKAGE_NAME }}/x86_64
cp -rf build/x86/install ${{ env.PACKAGE_NAME }}/x86
- uses: actions/upload-artifact@v4
name: upload
with:
path: ${{ env.PACKAGE_NAME }}
name: ${{ env.PACKAGE_NAME }}
41 changes: 41 additions & 0 deletions .github/workflows/apple.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: apple

on:
push:
branches: ["main"]
paths-ignore:
- "**.md"
- "LICENSE"
pull_request:
branches: ["main"]
paths-ignore:
- "**.md"
- "LICENSE"

jobs:
macos:
name: macos
strategy:
matrix:
osname:
- {os: macos-13, arch: x64, platform: MAC}
- {os: macos-14, arch: arm64, platform: MAC_ARM64}
runs-on: ${{ matrix.osname.os }}
steps:
- uses: actions/checkout@v4
- name: macos
run: |
pod lib lint DartCvMacOS.podspec --allow-warnings
ios:
name: ios
strategy:
matrix:
osname:
- {os: macos-13, arch: x64, platform: MAC}
- {os: macos-14, arch: arm64, platform: MAC_ARM64}
runs-on: ${{ matrix.osname.os }}
steps:
- uses: actions/checkout@v4
- name: ios
run: |
pod lib lint DartCvIOS.podspec --allow-warnings
71 changes: 71 additions & 0 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: linux

on:
push:
branches: ["main"]
paths-ignore:
- "**.md"
- "LICENSE"
pull_request:
branches: ["main"]
paths-ignore:
- "**.md"
- "LICENSE"

jobs:
linux-x64:
name: linux-x64
runs-on: ubuntu-22.04
env:
PACKAGE_NAME: libdartcv-linux-x64
steps:
- name: setup
run: |
sudo apt-get update

sudo apt-get install -y curl unzip build-essential \
libgtk-3-dev cmake ninja-build
- uses: actions/checkout@v4
- name: build
run: |
mkdir -p build && cd build
cmake -S ${{ github.workspace }} \
-DCMAKE_INSTALL_PREFIX=install \
-DDARTCV_WITH_VIDEOIO=ON \
-DCMAKE_BUILD_TYPE=Release

cmake --build . --config Release -j $(nproc)
cmake --build . --config Release --target install
- uses: actions/upload-artifact@v4
name: upload
with:
path: build/install
name: ${{ env.PACKAGE_NAME }}
linux-arm64:
name: linux-arm64
runs-on: ubuntu-24.04
env:
PACKAGE_NAME: libdartcv-linux-arm64
steps:
- name: setup
run: |
sudo apt-get update

sudo apt-get install g++-aarch64-linux-gnu
- uses: actions/checkout@v4
- name: build
run: |
mkdir -p build && cd build
cmake -S ${{ github.workspace }} \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/cmake/aarch64-linux-gnu.toolchain.cmake \
-DCMAKE_INSTALL_PREFIX=install \
-DDARTCV_WITH_VIDEOIO=ON \
-DCMAKE_BUILD_TYPE=Release

cmake --build . --config Release -j $(nproc)
cmake --build . --config Release --target install
- uses: actions/upload-artifact@v4
name: upload
with:
path: build/install
name: ${{ env.PACKAGE_NAME }}
72 changes: 72 additions & 0 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: windows

on:
push:
branches: ["main"]
paths-ignore:
- "**.md"
- "LICENSE"
pull_request:
branches: ["main"]
paths-ignore:
- "**.md"
- "LICENSE"

jobs:
windows-x64:
name: windows-x64
strategy:
matrix:
osname:
- {os: windows-2019, vs: vs2019}
- {os: windows-2022, vs: vs2022}
runs-on: ${{ matrix.osname.os }}
env:
PACKAGE_NAME: libdartcv-windows-x64-${{ matrix.osname.vs }}
steps:
- uses: actions/checkout@v4
- name: build
run: |
mkdir -Force build && cd build
cmake -S ${{ github.workspace }} `
-DCMAKE_INSTALL_PREFIX=install `
-DCMAKE_BUILD_TYPE=Release `
-DDARTCV_WITH_VIDEOIO=ON `
-DDARTCV_WITH_HIGHGUI=ON

cmake --build . --config Release --target install
- uses: actions/upload-artifact@v4
name: upload
with:
path: build/install
name: ${{ env.PACKAGE_NAME }}
windows-arm64:
name: windows-arm64
strategy:
matrix:
osname:
- {os: windows-2019, vs: vs2019}
- {os: windows-2022, vs: vs2022}
runs-on: ${{ matrix.osname.os }}
env:
PACKAGE_NAME: libdartcv-windows-arm64-${{ matrix.osname.vs }}
steps:
- uses: actions/checkout@v4
- name: build
run: |
mkdir -Force build && cd build
cmake -S ${{ github.workspace }} `
-DCMAKE_SYSTEM_NAME="Windows" `
-DCMAKE_SYSTEM_PROCESSOR=ARM64 `
-A ARM64 `
-DCMAKE_INSTALL_PREFIX=install `
-DCMAKE_BUILD_TYPE=Release `
-DDARTCV_WITH_VIDEOIO=ON `
-DDARTCV_WITH_HIGHGUI=ON

cmake --build . --config Release --target install
- uses: actions/upload-artifact@v4
name: upload
with:
path: build/install
name: ${{ env.PACKAGE_NAME }}