Skip to content

Commit

Permalink
Run rolling updates on a trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
asenyaev committed Sep 2, 2022
1 parent 3725898 commit 4ba6d6d
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 67 deletions.
69 changes: 51 additions & 18 deletions .github/workflows/build_wheels_linux.yml
Expand Up @@ -13,9 +13,12 @@ on:
- '.github/workflows/build_wheels_macos*'
release:
types: [published, edited]
schedule:
- cron: '0 3 * * 6'
workflow_dispatch:
workflow_call:
inputs:
MATRIX_BRANCH:
required: true
type: string


jobs:
Expand Down Expand Up @@ -57,11 +60,20 @@ jobs:
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
fi
- name: Checkout
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "CLONE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
echo "PR_AUTHOR_FORK=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "CLONE_BRANCH=${{ inputs.MATRIX_BRANCH }}" >> $GITHUB_ENV
else
echo "CLONE_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
- name: Clone
run: git clone --branch ${{ env.CLONE_BRANCH }} https://github.com/opencv/opencv-python.git ${{ github.workspace }}
- name: Merge with a test branch
if: ${{ github.event_name == 'pull_request' }}
run: cd ${{ github.workspace }} && git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
- name: Build a package
run: source scripts/build.sh
- name: Saving all wheels
Expand Down Expand Up @@ -100,13 +112,25 @@ jobs:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Setup Environment variables
run: if [ "3.10" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
run: |
if [ "3.10" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "CLONE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
echo "PR_AUTHOR_FORK=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "CLONE_BRANCH=${{ inputs.MATRIX_BRANCH }}" >> $GITHUB_ENV
else
echo "CLONE_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
- name: Clone
run: git clone --branch ${{ env.CLONE_BRANCH }} https://github.com/opencv/opencv-python.git ${{ github.workspace }}
- name: Merge with a test branch
if: ${{ github.event_name == 'pull_request' }}
run: |
cd ${{ github.workspace }} && git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
git submodule update --init --recursive
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -154,11 +178,20 @@ jobs:
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
fi
- name: Checkout
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "CLONE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
echo "PR_AUTHOR_FORK=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "CLONE_BRANCH=${{ inputs.MATRIX_BRANCH }}" >> $GITHUB_ENV
else
echo "CLONE_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
- name: Clone
run: git clone --branch ${{ env.CLONE_BRANCH }} https://github.com/opencv/opencv-python.git ${{ github.workspace }}
- name: Merge with a test branch
if: ${{ github.event_name == 'pull_request' }}
run: cd ${{ github.workspace }} && git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
50 changes: 37 additions & 13 deletions .github/workflows/build_wheels_linux_arm.yml
Expand Up @@ -13,9 +13,12 @@ on:
- '.github/workflows/build_wheels_macos*'
release:
types: [published, edited]
schedule:
- cron: '0 3 * * 6'
workflow_dispatch:
workflow_call:
inputs:
MATRIX_BRANCH:
required: true
type: string


jobs:
Expand Down Expand Up @@ -57,11 +60,20 @@ jobs:
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
fi
- name: Checkout
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "CLONE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
echo "PR_AUTHOR_FORK=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "CLONE_BRANCH=${{ inputs.MATRIX_BRANCH }}" >> $GITHUB_ENV
else
echo "CLONE_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
- name: Clone
run: git clone --branch ${{ env.CLONE_BRANCH }} https://github.com/opencv/opencv-python.git ${{ github.workspace }}
- name: Merge with a test branch
if: ${{ github.event_name == 'pull_request' }}
run: cd ${{ github.workspace }} && git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
- name: Build a package
run: source scripts/build.sh
- name: Saving all wheels
Expand Down Expand Up @@ -102,13 +114,25 @@ jobs:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Setup Environment variables
run: if [ "3.10" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
run: |
if [ "3.10" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "CLONE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
echo "PR_AUTHOR_FORK=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "CLONE_BRANCH=${{ inputs.MATRIX_BRANCH }}" >> $GITHUB_ENV
else
echo "CLONE_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
- name: Clone
run: git clone --branch ${{ env.CLONE_BRANCH }} https://github.com/opencv/opencv-python.git ${{ github.workspace }}
- name: Merge with a test branch
if: ${{ github.event_name == 'pull_request' }}
run: |
cd ${{ github.workspace }} && git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
git submodule update --init --recursive
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v3
with:
Expand Down
49 changes: 37 additions & 12 deletions .github/workflows/build_wheels_macos.yml
Expand Up @@ -13,9 +13,12 @@ on:
- '.github/workflows/build_wheels_macos_m1.yml'
release:
types: [published, edited]
schedule:
- cron: '0 3 * * 6'
workflow_dispatch:
workflow_call:
inputs:
MATRIX_BRANCH:
required: true
type: string


jobs:
Expand Down Expand Up @@ -59,11 +62,20 @@ jobs:
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
fi
- name: Checkout
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "CLONE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
echo "PR_AUTHOR_FORK=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "CLONE_BRANCH=${{ inputs.MATRIX_BRANCH }}" >> $GITHUB_ENV
else
echo "CLONE_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
- name: Clone
run: git clone --branch ${{ env.CLONE_BRANCH }} https://github.com/opencv/opencv-python.git ${{ github.workspace }}
- name: Merge with a test branch
if: ${{ github.event_name == 'pull_request' }}
run: cd ${{ github.workspace }} && git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
- name: Build a package
run: |
set -e
Expand Down Expand Up @@ -119,11 +131,24 @@ jobs:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Setup Environment variables
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "CLONE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
echo "PR_AUTHOR_FORK=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "CLONE_BRANCH=${{ inputs.MATRIX_BRANCH }}" >> $GITHUB_ENV
else
echo "CLONE_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
- name: Clone
run: git clone --branch ${{ env.CLONE_BRANCH }} https://github.com/opencv/opencv-python.git ${{ github.workspace }}
- name: Merge with a test branch
if: ${{ github.event_name == 'pull_request' }}
run: |
cd ${{ github.workspace }} && git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
git submodule update --init --recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
49 changes: 37 additions & 12 deletions .github/workflows/build_wheels_macos_m1.yml
Expand Up @@ -13,9 +13,12 @@ on:
- '.github/workflows/build_wheels_macos.yml'
release:
types: [published, edited]
schedule:
- cron: '0 3 * * 6'
workflow_dispatch:
workflow_call:
inputs:
MATRIX_BRANCH:
required: true
type: string


jobs:
Expand Down Expand Up @@ -43,11 +46,20 @@ jobs:
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
fi
- name: Checkout
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "CLONE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
echo "PR_AUTHOR_FORK=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "CLONE_BRANCH=${{ inputs.MATRIX_BRANCH }}" >> $GITHUB_ENV
else
echo "CLONE_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
- name: Clone
run: git clone --branch ${{ env.CLONE_BRANCH }} https://github.com/opencv/opencv-python.git ${{ github.workspace }}
- name: Merge with a test branch
if: ${{ github.event_name == 'pull_request' }}
run: cd ${{ github.workspace }} && git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
- name: Build a package
run: |
git submodule update --init multibuild
Expand Down Expand Up @@ -86,11 +98,24 @@ jobs:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Setup Environment variables
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "CLONE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
echo "PR_AUTHOR_FORK=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "CLONE_BRANCH=${{ inputs.MATRIX_BRANCH }}" >> $GITHUB_ENV
else
echo "CLONE_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
- name: Clone
run: git clone --branch ${{ env.CLONE_BRANCH }} https://github.com/opencv/opencv-python.git ${{ github.workspace }}
- name: Merge with a test branch
if: ${{ github.event_name == 'pull_request' }}
run: |
cd ${{ github.workspace }} && git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
git submodule update --init --recursive
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v3
with:
Expand Down
50 changes: 38 additions & 12 deletions .github/workflows/build_wheels_windows.yml
Expand Up @@ -12,9 +12,12 @@ on:
- '.github/workflows/build_wheels_macos*'
release:
types: [published, edited]
schedule:
- cron: '0 3 * * 6'
workflow_dispatch:
workflow_call:
inputs:
MATRIX_BRANCH:
required: true
type: string


jobs:
Expand Down Expand Up @@ -47,11 +50,20 @@ jobs:
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
fi
- name: Checkout
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "CLONE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
echo "PR_AUTHOR_FORK=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "CLONE_BRANCH=${{ inputs.MATRIX_BRANCH }}" >> $GITHUB_ENV
else
echo "CLONE_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
- name: Clone
run: git clone --branch ${{ env.CLONE_BRANCH }} https://github.com/opencv/opencv-python.git ${{ github.workspace }}
- name: Merge with a test branch
if: ${{ github.event_name == 'pull_request' }}
run: cd ${{ github.workspace }} && git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -103,11 +115,25 @@ jobs:
rm -rf ./* || true
rm -rf ./.??* || true
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Setup Environment variables
shell: bash
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "CLONE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
echo "PR_AUTHOR_FORK=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "CLONE_BRANCH=${{ inputs.MATRIX_BRANCH }}" >> $GITHUB_ENV
else
echo "CLONE_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
- name: Clone
run: git clone --branch ${{ env.CLONE_BRANCH }} https://github.com/opencv/opencv-python.git ${{ github.workspace }}
- name: Merge with a test branch
if: ${{ github.event_name == 'pull_request' }}
run: |
cd ${{ github.workspace }} && git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
git submodule update --init --recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down

0 comments on commit 4ba6d6d

Please sign in to comment.