forked from MaverickTse/MotionTracking_MKII
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 3.01 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build
on:
push:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build OpenCV
run: |
git clone https://github.com/opencv/opencv.git -b 4.9.0 --depth 1
git clone https://github.com/opencv/opencv_contrib.git -b 4.9.0 --depth 1
cmake -S opencv -B opencv/build -D CMAKE_GENERATOR_PLATFORM=Win32 -D OPENCV_EXTRA_MODULES_PATH=./opencv_contrib/modules -D BUILD_SHARED_LIBS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D WITH_ADE=OFF -D WITH_OPENJPEG=OFF -D WITH_WEBP=OFF -D WITH_TIFF=OFF -D WITH_QUIRC=OFF -D WITH_OPENEXR=OFF -D WITH_JPEG=OFF -D WITH_LAPACK=OFF -D WITH_JASPER=OFF -D WITH_PNG=OFF -D WITH_GSTREAMER=OFF -D WITH_FFMPEG=OFF -D WITH_EIGEN=OFF -D WITH_DSHOW=OFF -D WITH_DIRECTX=OFF -D WITH_ARITH_DEC=OFF -D WITH_ARITH_ENC=OFF -D WITH_1394=OFF -D WITH_IMGCODEC_HDR=OFF -D WITH_IMGCODEC_PFM=OFF -D WITH_IMGCODEC_PXM=OFF -D WITH_IMGCODEC_SUNRASTER=OFF -D BUILD_OPENJPEG=OFF -D BUILD_JASPER=OFF -D BUILD_JAVA=OFF -D BUILD_JPEG=OFF -D BUILD_OPENEXR=OFF -D BUILD_PNG=OFF -D BUILD_TBB=OFF
cmake --build opencv/build --config Release
cmake --install opencv/build
- name: Build MotionTracking_MK-II_Plus
run: |
cmake -S src -B src/build -D CMAKE_GENERATOR_PLATFORM=Win32 -D OPENCV_INCLUDE_DIR=opencv/build/install/include -D OPENCV_LIBRARY_DIR=opencv/build/install/x86/vc17/staticlib
cmake --build src/build --config Release
- name: Create Archive
run: |
cd ${{ github.workspace }}
move LICENSE Licenses/MotionTrackingMKII.txt
move opencv/LICENSE Licenses/opencv.txt
move opencv_contrib/LICENSE Licenses/opencv_contrib.txt
move src/build/Release/MotionTrackingMKIIPlus.auf MotionTrackingMKIIPlus.auf
mkdir MotionTracking_model
move opencv/data/haarcascades/haarcascade_frontalface_default.xml MotionTracking_model/haarcascade_frontalface_default.xml
move opencv/data/haarcascades/haarcascade_profileface.xml MotionTracking_model/haarcascade_profileface.xml
7z a MotionTrackingMKIIPlus.zip MotionTrackingMKIIPlus.auf README.md README.ja.md Licenses MotionTracking_model
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: MotionTrackingMKIIPlus
path: ${{ github.workspace }}/MotionTrackingMKIIPlus.zip
create_release:
name: Create release
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: MotionTrackingMKIIPlus
path: artifacts
- name: Create a Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
REVCOUNT=`git rev-list --count HEAD`
RELEASE_NAME=r${REVCOUNT}
TAG_NAME=r${REVCOUNT}
gh release create "${TAG_NAME}" ${{ github.workspace }}/artifacts/*.zip -t "${RELEASE_NAME}"