Skip to content

Commit

Permalink
update builder, rename output folder
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminwan committed Jul 28, 2024
1 parent c0cb65c commit bb82540
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 23 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ jobs:
# 7z压缩
- name: 7zip
run: |
cp -r opencv-${{ matrix.ver.cv }}/build-Release-${{ matrix.arch }}/install macos
7z a ${{ env.PKG_NAME }}.7z macos
rm -r -f macos
cp -r opencv-${{ matrix.ver.cv }}/build-Release-${{ matrix.arch }}/install ${{ env.PKG_NAME }}
7z a ${{ env.PKG_NAME }}.7z ${{ env.PKG_NAME }}
rm -r -f ${{ env.PKG_NAME }}
# 编译
- name: build java
Expand All @@ -94,6 +94,7 @@ jobs:
run: |
cp -r opencv-${{ matrix.ver.cv }}/build-Release-${{ matrix.arch }}/install/share/java/opencv4 ${{ env.JAVA_PKG_NAME }}
7z a ${{ env.JAVA_PKG_NAME }}.7z ${{ env.JAVA_PKG_NAME }}
rm -r -f ${{ env.JAVA_PKG_NAME }}
# 上传artifact
# - name: upload
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/musl-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
BUILD_SCRIPT: build-opencv4-musl-gcc.sh
BUILD_OPTIONS: opencv4_cmake_options.txt
PKG_NAME: opencv-${{ matrix.ver.cv }}-${{ matrix.arch }}
MUSL_NAME: ${{ matrix.arch }}-${{ matrix.ver.musl }}

steps:
# 检出代码
Expand All @@ -91,7 +92,7 @@ jobs:
# 部署musl
- name: deploy musl gcc
run: |
wget https://github.com/benjaminwan/musl-cross-builder/releases/download/${{ matrix.ver.musl }}/${{ matrix.arch }}-${{ matrix.ver.musl }}.7z -O ${{ matrix.arch }}.7z
wget https://github.com/benjaminwan/musl-cross-builder/releases/download/${{ matrix.ver.musl }}/${{ env.MUSL_NAME }}.7z -O ${{ matrix.arch }}.7z
7z x ${{ matrix.arch }}.7z -aoa
mv ${{ matrix.arch }}/ /opt/
echo "/opt/${{ matrix.arch }}" >> $GITHUB_PATH
Expand Down Expand Up @@ -123,9 +124,9 @@ jobs:
# 7z压缩
- name: 7zip
run: |
cp -r opencv-${{ matrix.ver.cv }}/build-Release-${{ matrix.arch }}/install linux
7z a ${{ env.PKG_NAME }}.7z linux
rm -r -f linux
cp -r opencv-${{ matrix.ver.cv }}/build-Release-${{ matrix.arch }}/install ${{ env.PKG_NAME }}
7z a ${{ env.PKG_NAME }}.7z ${{ env.PKG_NAME }}
rm -r -f ${{ env.PKG_NAME }}
# 上传artifact
# - name: upload
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/musl-zig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ jobs:
# 7z压缩
- name: 7zip
run: |
cp -r opencv-${{ matrix.ver.cv }}/build-Release-${{ matrix.target }}/install linux
7z a ${{ env.PKG_NAME }}.7z linux
cp -r opencv-${{ matrix.ver.cv }}/build-Release-${{ matrix.target }}/install ${{ env.PKG_NAME }}
7z a ${{ env.PKG_NAME }}.7z ${{ env.PKG_NAME }}
rm -r -f ${{ env.PKG_NAME }}
# 上传artifact
# - name: upload
Expand Down
31 changes: 18 additions & 13 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
ubuntu:
runs-on: ubuntu-2204
runs-on: ubuntu-22.04

strategy:
fail-fast: false
Expand Down Expand Up @@ -42,6 +42,10 @@ jobs:
BUILD_OPTIONS: opencv4_cmake_options.txt
PKG_NAME: opencv-${{ matrix.ver.cv }}-ubuntu-${{ matrix.list.os_ver }}-${{ matrix.arch }}
JAVA_PKG_NAME: opencv-${{ matrix.ver.cv }}-ubuntu-${{ matrix.list.os_ver }}-${{ matrix.arch }}-java
CMAKE_NAME: cmake-${{ matrix.ver.cmake }}-${{ matrix.os_name }}-${{ matrix.list.os_ver }}-${{ matrix.arch }}
PYTHON_NAME: python-${{ matrix.ver.python }}-${{ matrix.os_name }}-${{ matrix.list.os_ver }}-${{ matrix.arch }}
ANT_NAME: apache-ant-${{ matrix.ver.ant }}-bin


steps:
# 检出代码
Expand Down Expand Up @@ -73,21 +77,21 @@ jobs:

- name: deploy cmake
run: |
wget https://github.com/benjaminwan/CmakeBuilder/releases/download/${{ matrix.ver.cmake }}/cmake-${{ matrix.ver.cmake }}-${{ matrix.os_name }}-${{ matrix.list.os_ver }}-${{ matrix.arch }}.7z -O cmake-${{ matrix.ver.cmake }}.7z
7z x cmake-${{ matrix.ver.cmake }}.7z -aoa
rm cmake-${{ matrix.ver.cmake }}.7z
wget https://github.com/benjaminwan/CmakeBuilder/releases/download/${{ matrix.ver.cmake }}/${{ env.CMAKE_NAME }}.7z -O ${{ env.CMAKE_NAME }}.7z
7z x ${{ env.CMAKE_NAME }}.7z -aoa
rm ${{ env.CMAKE_NAME }}.7z
- name: deploy python
run: |
wget https://github.com/benjaminwan/PythonBuilder/releases/download/${{ matrix.ver.python }}/python-${{ matrix.ver.python }}-${{ matrix.os_name }}-${{ matrix.list.os_ver }}-${{ matrix.arch }}.7z -O python-${{ matrix.ver.python }}.7z
7z x python-${{ matrix.ver.python }}.7z -aoa
rm python-${{ matrix.ver.python }}.7z
wget https://github.com/benjaminwan/PythonBuilder/releases/download/${{ matrix.ver.python }}/${{ env.PYTHON_NAME }}.7z -O ${{ env.PYTHON_NAME }}.7z
7z x ${{ env.PYTHON_NAME }}.7z -aoa
rm ${{ env.PYTHON_NAME }}.7z
- name: deploy ant
run: |
wget https://dlcdn.apache.org/ant/binaries/apache-ant-${{ matrix.ver.ant }}-bin.tar.gz -O apache-ant-${{ matrix.ver.ant }}.tar.gz
tar -xf apache-ant-${{ matrix.ver.ant }}.tar.gz
rm apache-ant-${{ matrix.ver.ant }}.tar.gz
wget https://dlcdn.apache.org/ant/binaries/${{ env.ANT_NAME }}.tar.gz -O ${{ env.ANT_NAME }}.tar.gz
tar -xf ${{ env.ANT_NAME }}.tar.gz
rm ${{ env.ANT_NAME }}.tar.gz
- name: Host - Create Docker template env file
run: |
Expand Down Expand Up @@ -124,9 +128,9 @@ jobs:
# install文件夹改名linux,并使用7z压缩
- name: 7zip
run: |
cp -r opencv-${{ matrix.ver.cv }}/build-Release-${{ matrix.arch }}/install linux
7z a ${{ env.PKG_NAME }}.7z linux
rm -r -f linux
cp -r opencv-${{ matrix.ver.cv }}/build-Release-${{ matrix.arch }}/install ${{ env.PKG_NAME }}
7z a ${{ env.PKG_NAME }}.7z ${{ env.PKG_NAME }}
rm -r -f ${{ env.PKG_NAME }}
- name: Docker - build
run: |
Expand All @@ -137,6 +141,7 @@ jobs:
run: |
cp -r opencv-${{ matrix.ver.cv }}/build-Release-${{ matrix.arch }}/install/share/java/opencv4 ${{ env.JAVA_PKG_NAME }}
7z a ${{ env.JAVA_PKG_NAME }}.7z ${{ env.JAVA_PKG_NAME }}
rm -r -f ${{ env.JAVA_PKG_NAME }}
# 上传artifact
# - name: upload
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
BUILD_SCRIPT: build-opencv4-win.ps1
BUILD_OPTIONS: opencv4_cmake_options.txt
PKG_NAME: opencv-${{ matrix.ver.cv }}-windows-${{ matrix.list.vs_name }}-${{ matrix.arch }}-${{ matrix.crt }}
JAVA_PKG_NAME: opencv-${{ matrix.ver.cv }}-windows-${{ matrix.list.vs_name }}-java-${{ matrix.arch }}-${{ matrix.crt }}
JAVA_PKG_NAME: opencv-${{ matrix.ver.cv }}-windows-${{ matrix.list.vs_name }}-${{ matrix.arch }}-${{ matrix.crt }}-java

steps:
# Setup JDK
Expand Down

0 comments on commit bb82540

Please sign in to comment.