Fixed url for a fork (4.x branch)

This commit is contained in:
Andrey Senyaev 2022-04-24 01:53:53 +03:00
parent 767857c516
commit 88123e2512
2 changed files with 10 additions and 12 deletions

View File

@ -10,6 +10,7 @@ env:
OPENCV_TEST_DATA_PATH: '/opencv_extra/testdata' OPENCV_TEST_DATA_PATH: '/opencv_extra/testdata'
OPENCV_DOCKER_WORKDIR: '/__w/opencv/opencv' 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 }}
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'
@ -43,7 +44,7 @@ jobs:
git config --global --add safe.directory ${{ env.OPENCV_DOCKER_WORKDIR }} git config --global --add safe.directory ${{ env.OPENCV_DOCKER_WORKDIR }}
git config user.email "opencv.ci" git config user.email "opencv.ci"
git config user.name "opencv.ci" git config user.name "opencv.ci"
git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv" "${{ 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 }} --depth 1 https://github.com/opencv/opencv_extra.git /opencv_extra run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --depth 1 https://github.com/opencv/opencv_extra.git /opencv_extra
- name: Configure OpenCV - name: Configure OpenCV
@ -150,7 +151,7 @@ jobs:
git config --global --add safe.directory ${{ env.OPENCV_DOCKER_WORKDIR }} git config --global --add safe.directory ${{ env.OPENCV_DOCKER_WORKDIR }}
git config user.email "opencv.ci" git config user.email "opencv.ci"
git config user.name "opencv.ci" git config user.name "opencv.ci"
git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv" "${{ env.SOURCE_BRANCH_NAME }}" git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
- name: Clone opencv_contrib - name: Clone opencv_contrib
run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --depth 1 https://github.com/opencv/opencv_contrib.git /opencv_contrib run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --depth 1 https://github.com/opencv/opencv_contrib.git /opencv_contrib
- name: Configure OpenCV Contrib - name: Configure OpenCV Contrib

View File

@ -5,16 +5,17 @@ on:
branches: [ 4.x ] branches: [ 4.x ]
types: [ labeled, opened, synchronize, reopened ] types: [ labeled, opened, synchronize, reopened ]
env:
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
PR_AUTHOR_FORK: ${{ github.event.pull_request.head.repo.full_name }}
SOURCE_BRANCH_NAME: ${{ github.head_ref }}
TARGET_BRANCH_NAME: ${{ github.base_ref }}
jobs: jobs:
x86-simulator-build-test: x86-simulator-build-test:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
# Docker image from https://hub.docker.com/r/yuentau/ocv_ubuntu # Docker image from https://hub.docker.com/r/yuentau/ocv_ubuntu
container: docker.io/yuentau/ocv_ubuntu:20.04 container: docker.io/yuentau/ocv_ubuntu:20.04
env:
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
SOURCE_BRANCH_NAME: ${{ github.head_ref }}
TARGET_BRANCH_NAME: ${{ github.base_ref }}
steps: steps:
- name: info - name: info
run: | run: |
@ -37,7 +38,7 @@ jobs:
cd opencv cd opencv
git config user.email "opencv.ci" git config user.email "opencv.ci"
git config user.name "opencv.ci" git config user.name "opencv.ci"
git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv" "${{ env.SOURCE_BRANCH_NAME }}" --allow-unrelated-histories git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
- name: configure - name: configure
run: | run: |
cmake -B build -DWITH_TIMVX=ON -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=ON -DBUILD_PERF_TESTS=ON -DBUILD_TESTS=ON -DBUILD_EXAMPLES=OFF -DBUILD_DOCS=OFF -DWITH_OPENCL=OFF opencv cmake -B build -DWITH_TIMVX=ON -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=ON -DBUILD_PERF_TESTS=ON -DBUILD_TESTS=ON -DBUILD_EXAMPLES=OFF -DBUILD_DOCS=OFF -DWITH_OPENCL=OFF opencv
@ -50,10 +51,6 @@ jobs:
group: khadas-vim3 group: khadas-vim3
cancel-in-progress: false cancel-in-progress: false
runs-on: [self-hosted, Linux, ARM64, khadas-vim3] runs-on: [self-hosted, Linux, ARM64, khadas-vim3]
env:
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
SOURCE_BRANCH_NAME: ${{ github.head_ref }}
TARGET_BRANCH_NAME: ${{ github.base_ref }}
steps: steps:
- name: info - name: info
run: | run: |
@ -76,7 +73,7 @@ jobs:
cd opencv cd opencv
git config user.email "opencv.ci" git config user.email "opencv.ci"
git config user.name "opencv.ci" git config user.name "opencv.ci"
git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv" "${{ env.SOURCE_BRANCH_NAME }}" --allow-unrelated-histories git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
- name: fetch opencv_extra - name: fetch opencv_extra
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with: