diff --git a/.ci/dockerfiles/.common.sh b/.ci/dockerfiles/.common.sh deleted file mode 100644 index cdfa4ccf..00000000 --- a/.ci/dockerfiles/.common.sh +++ /dev/null @@ -1,38 +0,0 @@ -function py() { - case "$1" in - pypy:*) - PY=pypy3 - ;; - python:*-windowsservercore-*) - PY='C:\Python\python.exe' - ;; - *) - PY=python3 - ;; - esac - - echo -n $PY -} - -function run() { - image="$1"; shift - case $image in - *:*-windowsservercore-*) - echo -n RUN '(' "$1" ')'; shift - for command in "$@"; do - echo ' -and' '\' - echo -n ' ' '(' "$command" ')' - done - echo - ;; - - *) - echo -n RUN "$1"; shift - for command in "$@"; do - echo ' &&' '\' - echo -n ' ' "$command" - done - echo - ;; - esac -} diff --git a/.ci/dockerfiles/docs b/.ci/dockerfiles/docs deleted file mode 100644 index 3851939d..00000000 --- a/.ci/dockerfiles/docs +++ /dev/null @@ -1,10 +0,0 @@ -FROM python:3.7-slim - -RUN apt update || true && \ - apt install -qq -y make && \ - rm -rf /var/cache/apt/* - -ADD requirements-docs.txt requirements.txt / -RUN python3 -m pip install --upgrade-strategy eager -U -r requirements-docs.txt && \ - python3 -m pip install --upgrade-strategy eager -U -r requirements.txt && \ - rm -rf ~/.cache/pip diff --git a/.ci/dockerfiles/generate.sh b/.ci/dockerfiles/generate.sh deleted file mode 100755 index 38e3d93b..00000000 --- a/.ci/dockerfiles/generate.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -eu - -cd $(dirname ${BASH_SOURCE[0]}) -source .common.sh - -function preinstall() { - case "$1" in - pypy:*|python:*-rc-slim) - run "$1" \ - "apt update || true" \ - "apt install -qq -y pkgconf libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libfreetype6-dev gcc" \ - "rm -rf /var/cache/apt/*" - ;; - esac -} - -function postinstall() { - case "$1" in - python:*-windowsservercore-*) - echo -n 'Remove-Item –path %LOCALAPPDATA%\pip\Cache -recurse -ErrorAction Ignore' - ;; - - *) - echo -n 'rm -rf ~/.cache/pip' - ;; - esac -} - -function template() { - image="$1"; shift - preinstall="$1"; shift - PIP="$(py $image) -m pip install --upgrade-strategy eager -U" - CMDS=() - for requirement in "$@" requirements.txt; do - CMDS+=("$PIP -r $requirement") - done - CMDS+=("$(postinstall $image)") - - cat < "${image/:/_}" -done - -image=python:3.7-slim -template $image \ - "$(run $image "apt update || true" "apt install -qq -y make" "rm -rf /var/cache/apt/*")" \ - requirements-docs.txt > docs diff --git a/.ci/dockerfiles/pypy_3.6-slim b/.ci/dockerfiles/pypy_3.6-slim deleted file mode 100644 index 9019e361..00000000 --- a/.ci/dockerfiles/pypy_3.6-slim +++ /dev/null @@ -1,10 +0,0 @@ -FROM pypy:3.6-slim - -RUN apt update || true && \ - apt install -qq -y pkgconf libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libfreetype6-dev gcc && \ - rm -rf /var/cache/apt/* - -ADD requirements-tests.txt requirements.txt / -RUN pypy3 -m pip install --upgrade-strategy eager -U -r requirements-tests.txt && \ - pypy3 -m pip install --upgrade-strategy eager -U -r requirements.txt && \ - rm -rf ~/.cache/pip diff --git a/.ci/dockerfiles/python_3.6-slim b/.ci/dockerfiles/python_3.6-slim deleted file mode 100644 index 6d48b249..00000000 --- a/.ci/dockerfiles/python_3.6-slim +++ /dev/null @@ -1,8 +0,0 @@ -FROM python:3.6-slim - - - -ADD requirements-tests.txt requirements.txt / -RUN python3 -m pip install --upgrade-strategy eager -U -r requirements-tests.txt && \ - python3 -m pip install --upgrade-strategy eager -U -r requirements.txt && \ - rm -rf ~/.cache/pip diff --git a/.ci/dockerfiles/python_3.6-windowsservercore-1809 b/.ci/dockerfiles/python_3.6-windowsservercore-1809 deleted file mode 100644 index 8c13daf8..00000000 --- a/.ci/dockerfiles/python_3.6-windowsservercore-1809 +++ /dev/null @@ -1,8 +0,0 @@ -FROM python:3.6-windowsservercore-1809 - - - -ADD requirements-tests.txt requirements.txt / -RUN ( C:\Python\python.exe -m pip install --upgrade-strategy eager -U -r requirements-tests.txt ) -and \ - ( C:\Python\python.exe -m pip install --upgrade-strategy eager -U -r requirements.txt ) -and \ - ( Remove-Item –path %LOCALAPPDATA%\pip\Cache -recurse -ErrorAction Ignore ) diff --git a/.ci/dockerfiles/python_3.7-slim b/.ci/dockerfiles/python_3.7-slim deleted file mode 100644 index b9f0a691..00000000 --- a/.ci/dockerfiles/python_3.7-slim +++ /dev/null @@ -1,8 +0,0 @@ -FROM python:3.7-slim - - - -ADD requirements-tests.txt requirements.txt / -RUN python3 -m pip install --upgrade-strategy eager -U -r requirements-tests.txt && \ - python3 -m pip install --upgrade-strategy eager -U -r requirements.txt && \ - rm -rf ~/.cache/pip diff --git a/.ci/dockerfiles/python_3.7-windowsservercore-1809 b/.ci/dockerfiles/python_3.7-windowsservercore-1809 deleted file mode 100644 index 0fb07b65..00000000 --- a/.ci/dockerfiles/python_3.7-windowsservercore-1809 +++ /dev/null @@ -1,8 +0,0 @@ -FROM python:3.7-windowsservercore-1809 - - - -ADD requirements-tests.txt requirements.txt / -RUN ( C:\Python\python.exe -m pip install --upgrade-strategy eager -U -r requirements-tests.txt ) -and \ - ( C:\Python\python.exe -m pip install --upgrade-strategy eager -U -r requirements.txt ) -and \ - ( Remove-Item –path %LOCALAPPDATA%\pip\Cache -recurse -ErrorAction Ignore ) diff --git a/.ci/dockerfiles/python_3.8-rc-slim b/.ci/dockerfiles/python_3.8-rc-slim deleted file mode 100644 index 70489a30..00000000 --- a/.ci/dockerfiles/python_3.8-rc-slim +++ /dev/null @@ -1,10 +0,0 @@ -FROM python:3.8-rc-slim - -RUN apt update || true && \ - apt install -qq -y pkgconf libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libfreetype6-dev gcc && \ - rm -rf /var/cache/apt/* - -ADD requirements-tests.txt requirements.txt / -RUN python3 -m pip install --upgrade-strategy eager -U -r requirements-tests.txt && \ - python3 -m pip install --upgrade-strategy eager -U -r requirements.txt && \ - rm -rf ~/.cache/pip diff --git a/.cirrus.yml b/.cirrus.yml index a77e16e1..1c96d3bc 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,20 +1,15 @@ -dockerfiles_task: - skip: $CIRRUS_BRANCH =~ '.*\.tmp' - container: - image: ellerbrock/alpine-bash-git - - script: - - ./.ci/dockerfiles/generate.sh - - git diff --exit-code - - docs_task: skip: $CIRRUS_BRANCH =~ '.*\.tmp' container: - dockerfile: .ci/dockerfiles/docs + image: python:3.7-slim + + install_script: + - apt update || true ; apt install -qq -y make + - pip install --upgrade-strategy eager -U -r requirements-docs.txt + - pip install . - install_script: pip install -e . - script: make -C docs/ html + script: + - make -C docs/ html Linux_task: @@ -22,10 +17,19 @@ Linux_task: allow_failures: $CIRRUS_TASK_NAME =~ '.*-rc-.*' container: matrix: - - dockerfile: .ci/dockerfiles/python_3.6-slim - - dockerfile: .ci/dockerfiles/python_3.7-slim - - dockerfile: .ci/dockerfiles/python_3.8-rc-slim - - dockerfile: .ci/dockerfiles/pypy_3.6-slim + - image: python:3.6-slim + - image: python:3.7-slim + - image: python:3.8-rc-slim + - image: pypy:3.6-slim + + install_script: + - >- + if command -v pypy3 >/dev/null || python3 -c 'import sys; exit(sys.implementation.version.releaselevel == "final")'; then + apt update || true; + apt install -qq -y pkgconf libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libfreetype6-dev gcc + fi + - pip install --upgrade-strategy eager -U -r requirements-tests.txt + - pip install . script: - command -v pypy3 >/dev/null && export PY=pypy3 @@ -51,7 +55,7 @@ macOS_task: - pyenv global ${PYTHON} - pyenv rehash - pip install --upgrade-strategy eager -U -r requirements-tests.txt - - pip install -e . + - pip install . script: - python3 --version @@ -64,8 +68,12 @@ Windows_task: windows_container: os_version: 2019 matrix: - - dockerfile: .ci/dockerfiles/python_3.6-windowsservercore-1809 - - dockerfile: .ci/dockerfiles/python_3.7-windowsservercore-1809 + - image: python:3.6-windowsservercore-1809 + - image: python:3.7-windowsservercore-1809 + + install_script: + - C:\Python\python.exe -m pip install --upgrade-strategy eager -U -r requirements-tests.txt + - C:\Python\python.exe -m pip install . script: - C:\Python\python.exe --version diff --git a/bors.toml b/bors.toml index 2980464b..e41211ab 100644 --- a/bors.toml +++ b/bors.toml @@ -1,10 +1,9 @@ status = [ - "dockerfiles", "docs", - "Linux Dockerfile:.ci/dockerfiles/python_3.6-slim", - "Linux Dockerfile:.ci/dockerfiles/python_3.7-slim", - "Windows Dockerfile:.ci/dockerfiles/python_3.6-windowsservercore-1809", - "Windows Dockerfile:.ci/dockerfiles/python_3.7-windowsservercore-1809", + "Linux container:python:3.6-slim", + "Linux container:python:3.7-slim", + "Windows container:python:3.6-windowsservercore-1809", + "Windows container:python:3.7-windowsservercore-1809", "macOS PYTHON:3.6.8", "macOS PYTHON:3.7.2", ]