-
-
Notifications
You must be signed in to change notification settings - Fork 363
120 lines (116 loc) · 4.38 KB
/
release.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: release
on: [push, pull_request]
# on:
# push:
# tags:
# - '*'
env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
IOS_DEPLOYMENT_TARGET: '9.0'
MAC_DEPLOYMENT_TARGET: '10.9'
MAC_ARM64_DEPLOYMENT_TARGET: '11.0'
MAC_CATALYST_DEPLOYMENT_TARGET: '13.1'
ENABLE_BITCODE: OFF
ENABLE_ARC: OFF
ENABLE_VISIBILITY: OFF
EMSCRIPTEN_VERSION: 3.1.28
permissions:
contents: read
jobs:
setup:
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.get_version.outputs.VERSION }}
steps:
- uses: actions/checkout@v3
- name: get-version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: opencv2-source
run: |
wget -q https://github.com/opencv/opencv/archive/2.4.13.7.zip -O opencv-2.4.13.7.zip
unzip -q opencv-2.4.13.7.zip
rm opencv-2.4.13.7.zip
cd opencv-2.4.13.7
truncate -s 0 cmake/OpenCVFindLibsGrfmt.cmake
patch -p1 -i ../patches/opencv-2.4.13.7-no-rtti.patch
patch -p1 -i ../patches/opencv-2.4.13.7-no-zlib.patch
patch -p1 -i ../patches/opencv-2.4.13.7-fix-highgui-include.patch
patch -p1 -i ../patches/opencv-2.4.13.7-no-link-stdc++.patch
patch -p1 -i ../patches/opencv-2.4.13.7-enable-cxx11.patch
patch -p1 -i ../patches/opencv-2.4.13.7-link-openmp.patch
patch -p1 -i ../patches/opencv-2.4.13.7-newer-msvc.patch
patch -p1 -i ../patches/opencv-2.4.13.7-minimal-install.patch
cp ../patches/draw_text.h ../patches/mono_font_data.h modules/core/src/
patch -p1 -i ../patches/opencv-2.4.13.7-drawing-mono-font.patch
rm -rf modules/highgui
cp -r ../highgui modules/
rm -rf 3rdparty apps data doc samples platforms
rm -rf modules/java
rm -rf modules/python
rm -rf modules/ts
cp ../opencv2_cmake_options.txt ./
cd ..
zip -9 -r opencv-2.4.13.7.zip opencv-2.4.13.7
- name: opencv3-source
run: |
wget -q https://github.com/opencv/opencv/archive/3.4.20.zip -O opencv-3.4.20.zip
unzip -q opencv-3.4.20.zip
rm opencv-3.4.20.zip
cd opencv-3.4.20
truncate -s 0 cmake/OpenCVFindLibsGrfmt.cmake
patch -p1 -i ../patches/opencv-3.4.20-no-rtti.patch
patch -p1 -i ../patches/opencv-3.4.20-no-zlib.patch
patch -p1 -i ../patches/opencv-3.4.20-link-openmp.patch
patch -p1 -i ../patches/opencv-3.4.20-minimal-install.patch
cp ../patches/draw_text.h ../patches/mono_font_data.h modules/imgproc/src/
patch -p1 -i ../patches/opencv-3.4.20-drawing-mono-font.patch
rm -rf modules/highgui
cp -r ../highgui modules/
rm -rf 3rdparty apps data doc samples platforms
rm -rf modules/java
rm -rf modules/js
rm -rf modules/python
rm -rf modules/ts
cp ../opencv3_cmake_options.txt ./
cd ..
zip -9 -r opencv-3.4.20.zip opencv-3.4.20
- name: opencv4-source
run: |
wget -q https://github.com/opencv/opencv/archive/4.8.1.zip -O opencv-4.8.1.zip
unzip -q opencv-4.8.1.zip
rm opencv-4.8.1.zip
cd opencv-4.8.1
truncate -s 0 cmake/OpenCVFindLibsGrfmt.cmake
rm -rf modules/gapi
patch -p1 -i ../patches/opencv-4.8.1-no-rtti.patch
patch -p1 -i ../patches/opencv-4.8.1-no-zlib.patch
patch -p1 -i ../patches/opencv-4.8.1-link-openmp.patch
patch -p1 -i ../patches/opencv-4.8.1-minimal-install.patch
cp ../patches/draw_text.h ../patches/mono_font_data.h modules/imgproc/src/
patch -p1 -i ../patches/opencv-4.8.1-drawing-mono-font.patch
rm -rf modules/highgui
cp -r ../highgui modules/
rm -rf 3rdparty apps data doc samples platforms
rm -rf modules/java
rm -rf modules/js
rm -rf modules/python
rm -rf modules/ts
cp ../opencv4_cmake_options.txt ./
cd ..
zip -9 -r opencv-4.8.1.zip opencv-4.8.1
- name: upload-opencv2-source
uses: actions/upload-artifact@v3
with:
name: opencv-2.4.13.7-source
path: opencv-2.4.13.7.zip
- name: upload-opencv3-source
uses: actions/upload-artifact@v3
with:
name: opencv-3.4.20-source
path: opencv-3.4.20.zip
- name: upload-opencv4-source
uses: actions/upload-artifact@v3
with:
name: opencv-4.8.1-source
path: opencv-4.8.1.zip