mirror of
https://github.com/opencv/opencv.git
synced 2025-07-31 18:07:08 +08:00
Merge pull request #21917 from asenyaev:asen/self_hosted_runner_linux_3.4
Workflow to use a self-hosted Github runner on Linux x86_64 for 3.4 branch * Changed a workflow to use a self-hosted Github runner for 3.4 branch
This commit is contained in:
parent
4af8e5c5c4
commit
a3f81b79ed
39
.github/workflows/PR-3.4-U20.yaml
vendored
39
.github/workflows/PR-3.4-U20.yaml
vendored
@ -6,24 +6,29 @@ on:
|
|||||||
- 3.4
|
- 3.4
|
||||||
|
|
||||||
env:
|
env:
|
||||||
EXTRA_CMAKE_OPTIONS: '-DBUILD_DOCS=ON -DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON -DENABLE_CCACHE=OFF'
|
EXTRA_CMAKE_OPTIONS: '-DBUILD_DOCS=ON -DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 -DOPENCV_DOWNLOAD_PATH=/home/ci/binaries_cache -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON'
|
||||||
OPENCV_TEST_DATA_PATH: '/opencv_extra/testdata'
|
|
||||||
OPENCV_DOCKER_WORKDIR: '/__w/opencv/opencv'
|
|
||||||
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
|
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
|
||||||
PR_AUTHOR_FORK: ${{ github.event.pull_request.head.repo.full_name }}
|
PR_AUTHOR_FORK: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
SOURCE_BRANCH_NAME: ${{ github.head_ref }}
|
SOURCE_BRANCH_NAME: ${{ github.head_ref }}
|
||||||
TARGET_BRANCH_NAME: ${{ github.base_ref }}
|
TARGET_BRANCH_NAME: ${{ github.base_ref }}
|
||||||
ANT_HOME: '/usr/share/ant'
|
ANT_HOME: /usr/share/ant
|
||||||
|
GIT_CACHE_DOCKER: /home/ci/git_cache
|
||||||
PYTHONPATH: /opencv-build/python_loader:$PYTHONPATH
|
PYTHONPATH: /opencv-build/python_loader:$PYTHONPATH
|
||||||
|
OPENCV_TEST_DATA_PATH: /opencv_extra/testdata
|
||||||
|
OPENCV_DOCKER_WORKDIR: /opencv
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
BuildAndTest:
|
BuildAndTest:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: opencv-cn-lin-x86-64
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
container:
|
container:
|
||||||
image: quay.io/asenyaev/opencv-ubuntu:20.04
|
image: quay.io/asenyaev/opencv-ubuntu:20.04
|
||||||
|
volumes:
|
||||||
|
- /home/opencv-cn/git_cache:/home/ci/git_cache
|
||||||
|
- /home/opencv-cn/ci_cache/opencv:/home/ci/.ccache
|
||||||
|
- /home/opencv-cn/binaries_cache:/home/ci/binaries_cache
|
||||||
steps:
|
steps:
|
||||||
- name: PR info
|
- name: PR info
|
||||||
run: |
|
run: |
|
||||||
@ -31,13 +36,9 @@ jobs:
|
|||||||
echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}"
|
echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}"
|
||||||
echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}"
|
echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}"
|
||||||
- name: Clean
|
- name: Clean
|
||||||
run: find . -mindepth 1 -delete
|
run: find ${{ env.OPENCV_DOCKER_WORKDIR }} -mindepth 1 -delete
|
||||||
- name: Fetch opencv
|
- name: Fetch opencv
|
||||||
uses: actions/checkout@v3
|
run: git clone --branch ${{ env.TARGET_BRANCH_NAME }} --reference ${{ env.GIT_CACHE_DOCKER }}/opencv.git https://github.com/opencv/opencv.git ${{ env.OPENCV_DOCKER_WORKDIR }}
|
||||||
with:
|
|
||||||
repository: opencv/opencv
|
|
||||||
ref: ${{ env.TARGET_BRANCH_NAME }}
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch
|
- name: Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch
|
||||||
run: |
|
run: |
|
||||||
cd ${{ env.OPENCV_DOCKER_WORKDIR }}
|
cd ${{ env.OPENCV_DOCKER_WORKDIR }}
|
||||||
@ -46,7 +47,7 @@ jobs:
|
|||||||
git config user.name "opencv.ci"
|
git config user.name "opencv.ci"
|
||||||
git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
|
git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
|
||||||
- name: Clone opencv_extra
|
- name: Clone opencv_extra
|
||||||
run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} https://github.com/opencv/opencv_extra.git /opencv_extra
|
run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --reference ${{ env.GIT_CACHE_DOCKER }}/opencv_extra.git https://github.com/opencv/opencv_extra.git /opencv_extra
|
||||||
- name: Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch
|
- name: Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch
|
||||||
run: |
|
run: |
|
||||||
OPENCV_EXTRA_FORK=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}") || true
|
OPENCV_EXTRA_FORK=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}") || true
|
||||||
@ -141,12 +142,16 @@ jobs:
|
|||||||
run: cd /opencv-build && cmake --build . --config release --target check_pylint -- -j4
|
run: cd /opencv-build && cmake --build . --config release --target check_pylint -- -j4
|
||||||
|
|
||||||
BuildContrib:
|
BuildContrib:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: opencv-cn-lin-x86-64
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
container:
|
container:
|
||||||
image: quay.io/asenyaev/opencv-ubuntu:20.04
|
image: quay.io/asenyaev/opencv-ubuntu:20.04
|
||||||
|
volumes:
|
||||||
|
- /home/opencv-cn/git_cache:/home/ci/git_cache
|
||||||
|
- /home/opencv-cn/ci_cache/opencv:/home/ci/.ccache
|
||||||
|
- /home/opencv-cn/binaries_cache:/home/ci/binaries_cache
|
||||||
steps:
|
steps:
|
||||||
- name: PR info
|
- name: PR info
|
||||||
run: |
|
run: |
|
||||||
@ -154,13 +159,9 @@ jobs:
|
|||||||
echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}"
|
echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}"
|
||||||
echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}"
|
echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}"
|
||||||
- name: Clean
|
- name: Clean
|
||||||
run: find . -mindepth 1 -delete
|
run: find ${{ env.OPENCV_DOCKER_WORKDIR }} -mindepth 1 -delete
|
||||||
- name: Fetch opencv
|
- name: Fetch opencv
|
||||||
uses: actions/checkout@v3
|
run: git clone --branch ${{ env.TARGET_BRANCH_NAME }} --reference ${{ env.GIT_CACHE_DOCKER }}/opencv.git https://github.com/opencv/opencv.git ${{ env.OPENCV_DOCKER_WORKDIR }}
|
||||||
with:
|
|
||||||
repository: opencv/opencv
|
|
||||||
ref: ${{ env.TARGET_BRANCH_NAME }}
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Merge opencv with a test branch
|
- name: Merge opencv with a test branch
|
||||||
run: |
|
run: |
|
||||||
cd ${{ env.OPENCV_DOCKER_WORKDIR }}
|
cd ${{ env.OPENCV_DOCKER_WORKDIR }}
|
||||||
|
Loading…
Reference in New Issue
Block a user