Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Github Actions to python 3.10 and fixed following issues #556

Merged
merged 5 commits into from Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/build_wheels_linux.yml
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
Expand All @@ -38,9 +38,10 @@ jobs:
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
MB_ML_VER: 2014
NP_TEST_DEP: numpy==1.19.4
NP_TEST_DEP_LATEST: numpy==1.21.2
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/skvark/manylinux2014_${PLAT}
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
USE_CCACHE: 1
UNICODE_WIDTH: 32
SDIST: ${{ matrix.build_sdist || 0 }}
Expand All @@ -63,8 +64,7 @@ jobs:
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
if [ "x64" == "${{ matrix.platform }}" ]; then echo "PLAT=x86_64" >> $GITHUB_ENV; fi
echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
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

- name: build
run: source scripts/build.sh
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
NP_TEST_DEP: numpy==1.19.4
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/skvark/manylinux2014_${PLAT}
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
USE_CCACHE: 1
UNICODE_WIDTH: 32
SDIST: ${{ matrix.build_sdist || 0 }}
Expand Down Expand Up @@ -135,8 +135,6 @@ jobs:
run: |
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;

- name: before install
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build_wheels_linux_arm.yml
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
os: [ARM64]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
Expand All @@ -39,10 +39,11 @@ jobs:
PLAT: aarch64
MB_ML_VER: 2014
NP_TEST_DEP: numpy==1.19.4
NP_TEST_DEP_LATEST: numpy==1.21.2
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/skvark/manylinux2014_${PLAT}
DOCKER_TEST_IMAGE: multibuild/xenial_arm64v8
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
DOCKER_TEST_IMAGE: multibuild/focal_arm64v8
USE_CCACHE: 0
UNICODE_WIDTH: 32
SDIST: ${{ matrix.build_sdist || 0 }}
Expand All @@ -63,8 +64,7 @@ jobs:
- name: Setup Environment variables
run: |
if [ "ARM64" == "${{ matrix.os }}" ]; then echo "PLAT=aarch64" >> $GITHUB_ENV; fi
echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
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

- name: build
run: source scripts/build.sh
Expand Down
30 changes: 17 additions & 13 deletions .github/workflows/build_wheels_macos.yml
Expand Up @@ -22,12 +22,23 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
os: [macos-10.15, macos-11]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
exclude:
- os: macos-10.15
python-version: '3.10'
- os: macos-11
python-version: '3.6'
- os: macos-11
python-version: '3.7'
- os: macos-11
python-version: '3.8'
- os: macos-11
python-version: '3.9'

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
Expand All @@ -38,9 +49,11 @@ jobs:
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
MB_ML_VER: 2014
NP_TEST_DEP: numpy==1.19.4
NP_TEST_DEP_LATEST: numpy==1.21.2
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_OS_NAME: osx
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/skvark/manylinux2014_${PLAT}
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
USE_CCACHE: 1
UNICODE_WIDTH: 32
SDIST: ${{ matrix.build_sdist || 0 }}
Expand All @@ -58,22 +71,13 @@ jobs:
if: github.event_name == 'pull_request'
run: git submodule update --remote

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
if: ${{ 'macos-latest' == matrix.os }}
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform }}

- name: Setup Environment variables
run: |
if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
if [ "x64" == "${{ matrix.platform }}" ]; then echo "PLAT=x86_64" >> $GITHUB_ENV; fi
if [ "x86" == "${{ matrix.platform }}" ]; then echo "PLAT=i686" >> $GITHUB_ENV; fi
echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
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

- name: before install
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels_macos_m1.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
os: [macOS-M1]
python-version: [3.7, 3.8, 3.9]
python-version: ['3.7', '3.8', '3.9', '3.10']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels_windows.yml
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
platform: [x86, x64]
with_contrib: [0, 1]
without_gui: [0, 1]
Expand Down
10 changes: 5 additions & 5 deletions docker/manylinux2014/Dockerfile_aarch64
Expand Up @@ -28,8 +28,8 @@ RUN mkdir ~/ffmpeg_sources && \
rm -rf ~/openssl_build

RUN cd ~/ffmpeg_sources && \
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.14.01/nasm-2.14.01.tar.bz2 && \
tar -xf nasm-2.14.01.tar.bz2 && cd nasm-2.14.01 && ./autogen.sh && \
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.15.04/nasm-2.15.04.tar.bz2 && \
tar -xf nasm-2.15.04.tar.bz2 && cd nasm-2.15.04 && ./autogen.sh && \
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install
Expand All @@ -50,9 +50,9 @@ RUN cd ~/ffmpeg_sources && \
make install

RUN cd ~/ffmpeg_sources && \
curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar -xf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
curl -O -L https://ffmpeg.org/releases/ffmpeg-4.3.2.tar.bz2 && \
tar -xf ffmpeg-4.3.2.tar.bz2 && \
cd ffmpeg-4.3.2 && \
PATH=~/bin:$PATH && \
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
make -j$(getconf _NPROCESSORS_ONLN) && \
Expand Down
10 changes: 5 additions & 5 deletions docker/manylinux2014/Dockerfile_i686
Expand Up @@ -30,8 +30,8 @@ RUN mkdir ~/ffmpeg_sources && \
rm -rf ~/openssl_build

RUN cd ~/ffmpeg_sources && \
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.14.01/nasm-2.14.01.tar.bz2 && \
tar -xf nasm-2.14.01.tar.bz2 && cd nasm-2.14.01 && ./autogen.sh && \
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.15.04/nasm-2.15.04.tar.bz2 && \
tar -xf nasm-2.15.04.tar.bz2 && cd nasm-2.15.04 && ./autogen.sh && \
linux32 ./configure && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install
Expand All @@ -52,9 +52,9 @@ RUN cd ~/ffmpeg_sources && \
make install

RUN cd ~/ffmpeg_sources && \
curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar -xf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
curl -O -L https://ffmpeg.org/releases/ffmpeg-4.3.2.tar.bz2 && \
tar -xf ffmpeg-4.3.2.tar.bz2 && \
cd ffmpeg-4.3.2 && \
PATH=~/bin:$PATH && \
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" linux32 ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
make -j$(getconf _NPROCESSORS_ONLN) && \
Expand Down
10 changes: 5 additions & 5 deletions docker/manylinux2014/Dockerfile_x86_64
Expand Up @@ -28,8 +28,8 @@ RUN mkdir ~/ffmpeg_sources && \
rm -rf ~/openssl_build

RUN cd ~/ffmpeg_sources && \
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.14.01/nasm-2.14.01.tar.bz2 && \
tar -xf nasm-2.14.01.tar.bz2 && cd nasm-2.14.01 && ./autogen.sh && \
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.15.04/nasm-2.15.04.tar.bz2 && \
tar -xf nasm-2.15.04.tar.bz2 && cd nasm-2.15.04 && ./autogen.sh && \
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install
Expand All @@ -50,9 +50,9 @@ RUN cd ~/ffmpeg_sources && \
make install

RUN cd ~/ffmpeg_sources && \
curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar -xf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
curl -O -L https://ffmpeg.org/releases/ffmpeg-4.3.2.tar.bz2 && \
tar -xf ffmpeg-4.3.2.tar.bz2 && \
cd ffmpeg-4.3.2 && \
PATH=~/bin:$PATH && \
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
make -j$(getconf _NPROCESSORS_ONLN) && \
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Expand Up @@ -2,9 +2,10 @@
requires = [
"setuptools", "wheel", "scikit-build", "cmake", "pip",
"numpy==1.13.3; python_version=='3.6' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
"numpy==1.19.3; python_version>='3.6' and sys_platform == 'linux' and platform_machine == 'aarch64'",
"numpy==1.21.0; python_version>='3.6' and sys_platform == 'darwin' and platform_machine == 'arm64'",
"numpy==1.14.5; python_version=='3.7' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
"numpy==1.17.3; python_version=='3.8' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
"numpy==1.19.3; python_version>='3.9' and platform_machine != 'aarch64' and platform_machine != 'arm64'"
"numpy==1.19.3; python_version<='3.9' and sys_platform == 'linux' and platform_machine == 'aarch64'",
"numpy==1.21.0; python_version<='3.9' and sys_platform == 'darwin' and platform_machine == 'arm64'",
"numpy==1.19.3; python_version=='3.9' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
"numpy==1.21.2; python_version>='3.10'"
]
1 change: 0 additions & 1 deletion scripts/build.sh
Expand Up @@ -15,4 +15,3 @@ echo $ENABLE_CONTRIB > contrib.enabled
echo $ENABLE_HEADLESS > headless.enabled
set -x
build_wheel $REPO_DIR $PLAT
rm wheelhouse/numpy*
2 changes: 2 additions & 0 deletions setup.py
Expand Up @@ -30,6 +30,8 @@ def main():
minimum_supported_numpy = "1.17.3"
if sys.version_info[:2] >= (3, 9):
minimum_supported_numpy = "1.19.3"
if sys.version_info[:2] >= (3, 10):
minimum_supported_numpy = "1.21.2"

# linux arm64 is a special case
if sys.platform.startswith("linux") and sys.version_info[:2] >= (3, 6) and platform.machine() == "aarch64":
Expand Down
5 changes: 4 additions & 1 deletion travis_config.sh
Expand Up @@ -20,7 +20,10 @@ function bdist_wheel_cmd {
TOOLS_PATH=/opt/_internal/tools
/opt/python/cp37-cp37m/bin/python -m venv $TOOLS_PATH
source $TOOLS_PATH/bin/activate
python patch_auditwheel_whitelist.py
python$PYTHON_VERSION -m pip install auditwheel==3.2.0
python$PYTHON_VERSION patch_auditwheel_whitelist.py
# to avoid issues with numpy wheels
rm /io/wheelhouse/numpy*
deactivate
fi
if [ -n "$USE_CCACHE" -a -z "$BREW_BOOTSTRAP_MODE" ]; then ccache -s; fi
Expand Down
2 changes: 1 addition & 1 deletion travis_multibuild_customize.sh
Expand Up @@ -3,4 +3,4 @@
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -x
REPO_DIR=$(dirname "${BASH_SOURCE[0]}")
DOCKER_IMAGE='quay.io/skvark/manylinux2014_$plat'
DOCKER_IMAGE='quay.io/asenyaev/manylinux2014_$plat'