表記ゆれの修正 #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}" |