Commit cda6dbf9 authored by Andi Vajda's avatar Andi Vajda
Browse files

Deleted travis CI setup files.

parent 51af3d98
# setup is at https://travis-ci.com
language: python
dist: xenial
notifications:
email: false
# Instead of using a build matrix, each job we want to run is explicitly
# defined below. Why not use the matrix? So many specific jobs are being
# included that it actually is easier to follow making all jobs explicit.
jobs:
include:
# For MacOS, unfortunately there is no native Python support from Travis.
# That complexity is handled internally to the ci-prepare-environment.bash
# script that is called in the before_install.
- {os: osx, env: ICU_VERSION=55.2, language: sh, python: 3.8}
- {os: osx, env: ICU_VERSION=67.1, language: sh, python: 3.8}
- {os: osx, env: ICU_VERSION=68.1, language: sh, python: 3.9}
# # Same story for Windows (currently not working).
# - {os: windows, env: ICU_VERSION=55.2, language: sh, python: 3.9}
# - {os: windows, env: ICU_VERSION=67.1, language: sh, python: 3.9}
# - {os: windows, env: ICU_VERSION=68.1, language: sh, python: 3.9}
# Run ICU 68 on every Python version.
- {env: ICU_VERSION=68.1, python: 2.7}
- {env: ICU_VERSION=68.1, python: 3.5}
- {env: ICU_VERSION=68.1, python: 3.6}
- {env: ICU_VERSION=68.1, python: 3.7}
- {env: ICU_VERSION=68.1, python: 3.8}
- {env: ICU_VERSION=68.1, python: 3.9}
- {env: ICU_VERSION=68.1, python: 3.8}
- {env: ICU_VERSION=68.1, python: 3.9}
# Run ICU 55 on every Python version.
- {env: ICU_VERSION=55.2, python: 2.7}
- {env: ICU_VERSION=55.2, python: 3.5}
- {env: ICU_VERSION=55.2, python: 3.6}
- {env: ICU_VERSION=55.2, python: 3.7}
- {env: ICU_VERSION=55.2, python: 3.8}
- {env: ICU_VERSION=55.2, python: 3.9}
# Run all other ICU versions only on Python 3.9
- {env: ICU_VERSION=50.2, python: 3.9}
- {env: ICU_VERSION=51.3, python: 3.9}
# - {env: ICU_VERSION=52.2, python: 3.9} # gcc error ‘-Qunused-arguments’
- {env: ICU_VERSION=53.2, python: 3.9}
- {env: ICU_VERSION=54.2, python: 3.9}
- {env: ICU_VERSION=56.2, python: 3.9}
- {env: ICU_VERSION=57.2, python: 3.9}
- {env: ICU_VERSION=58.3, python: 3.9}
- {env: ICU_VERSION=59.2, python: 3.9}
- {env: ICU_VERSION=60.3, python: 3.9}
- {env: ICU_VERSION=61.2, python: 3.9}
- {env: ICU_VERSION=62.2, python: 3.9}
- {env: ICU_VERSION=63.2, python: 3.9}
- {env: ICU_VERSION=64.2, python: 3.9}
- {env: ICU_VERSION=65.1, python: 3.9}
- {env: ICU_VERSION=66.1, python: 3.9}
- {env: ICU_VERSION=67.1, python: 3.9}
# Run a few ICU versions on arm64 + Python 3
- {arch: arm64, env: ICU_VERSION=55.2, python: 3.7}
- {arch: arm64, env: ICU_VERSION=66.1, python: 3.7}
- {arch: arm64, env: ICU_VERSION=55.2, python: 3.8}
- {arch: arm64, env: ICU_VERSION=64.2, python: 3.8}
- {arch: arm64, env: ICU_VERSION=66.1, python: 3.8}
- {arch: arm64, env: ICU_VERSION=63.2, python: 3.8}
- {arch: arm64, env: ICU_VERSION=55.2, python: 3.8}
# - {arch: arm64, env: ICU_VERSION=67.1, python: 3.8} # uint8_t errors
- {arch: arm64, env: ICU_VERSION=68.1, python: 3.8}
- {arch: arm64, env: ICU_VERSION=55.2, python: 3.9}
- {arch: arm64, env: ICU_VERSION=68.1, python: 3.9}
before_install:
- bash ci-prepare-environment.bash
install:
- export PYICU_LIBRARIES="icui18n:icuuc:icudata"
- export PYICU_INCLUDES="$HOME/icu4c/include"
- export PYICU_LFLAGS="-L$HOME/icu4c/lib"
- if [ ${ICU_VERSION%.*} -lt 58 ]; then export PYICU_LIBRARIES="${PYICU_LIBRARIES}:icule"; fi
- PATH="$HOME/icu4c/bin:${PATH}" pip install . pytest
script:
- LD_LIBRARY_PATH="$HOME/icu4c/lib" DYLD_LIBRARY_PATH="$HOME/icu4c/lib" py.test
cache:
ccache: true
pip: true
timeout: 1000
directories:
- $HOME/.pyenv_cache # for macos
- $HOME/icu4c
#! /bin/bash
# Fail on first non-successful command
set -e
# set -x # turn on for debugging
#######
# Tools
# Grab the ICU source from the web then extract.
# Parameters:
# version: ICU version to download
# location: Directory to place the source and to extract the contents.
function fetch_icu {
echo "Downloading and extracting ICU source..."
local version="${1?}"
local location="${2?}"
# Download the source as zip on Windows and tgz otherwise
if [ "${version%rc}" = "${version}" ]
then
local icu_url="https://github.com/unicode-org/icu/releases/download/release-${version/./-}/icu4c-${version/./_}-src.tgz"
else
local icu_url="https://github.com/unicode-org/icu/releases/download/release-${version/rc/-rc}/icu4c-${version}-src.tgz"
fi
if [ "${TRAVIS_OS_NAME}" = windows ]; then icu_url="${icu_url%.tgz}.zip"; fi
local src="${location}/${icu_url##*/}"
# Download, then use different extraction tools on Windows vs. otherwise
mkdir -p "${location}"
wget -nv -O "${src}" "${icu_url}"
if [ "${TRAVIS_OS_NAME?}" = windows ]
then
7z x "${src}" -o"${location}"
else
tar -xzf "${src}" -C "${location}"
fi
}
# Grab Python from the web then install on OSX
# Handles using a cached version if available
# Parameters:
# version: Python version to install
function install_python_osx {
echo "Installing Python version ${1?} using pyenv..."
wget https://github.com/praekeltfoundation/travis-pyenv/releases/download/0.4.0/setup-pyenv.sh
# shellcheck disable=SC1091
PYENV_VERSION="${1}" PYENV_VERSION_STRING="Python ${1}" source setup-pyenv.sh
}
#############
# Environment
# Installation and build locations. Not the same so that we don't
# make the cache huge by storing source and build artifacts.
install_dir="$HOME/icu4c"
build_dir="$HOME/build"
# This will be used to uniquely determine if the correct cache is found or not.
cache_tag="${install_dir}/icu4c-${TRAVIS_OS_NAME?}-${ICU_VERSION}.done"
# The platform is used by runConfigureICU to determine what flags to set.
case "${TRAVIS_OS_NAME}" in
osx) platform=MacOSX;;
windows) platform=Cygwin/MSVC ;;
*) platform=Linux ;;
esac
# Map Travis python version to a full major.minor.patch version
if [ "${platform}" = Linux ]
then
pyver="${TRAVIS_PYTHON_VERSION}"
else
case "${TRAVIS_PYTHON_VERSION}" in
2.7) pyver=2.7.17;;
3.5) pyver=3.5.8;;
3.6) pyver=3.6.9;;
3.7) pyver=3.7.4;;
3.8) pyver=3.8.6;;
*)
if [ "${TRAVIS_PYTHON_VERSION}" != "3.9" ]
then
echo "Python version ${TRAVIS_PYTHON_VERSION} unset/unknown. Using default."
fi
pyver=3.9.0
;;
esac
fi
echo "ICU environment information..."
echo "INSTALLATION DIRECTORY: ${install_dir}"
echo "BUILD DIRECTORY: ${build_dir}"
echo "PYTHON VERSION: ${pyver}"
echo "PLATFORM: ${platform}"
echo "ICU VERSION: ${ICU_VERSION}"
#######
# Logic
# Need to install Python on macos and windows (annoyingly).
case "${TRAVIS_OS_NAME}" in
osx)
install_python_osx "${pyver}";;
windows)
choco install python --version "${pyver}";;
esac
# If the install_dir already exists, then it was cached and we do not need to rebuild.
if [ -f "${cache_tag}" ]
then
echo "Found cached icu4c in ${install_dir}, skipping build!"
else
echo "Build and install ICU from source..."
fetch_icu "${ICU_VERSION}" "${build_dir}"
if [ "${TRAVIS_OS_NAME}" = windows ]
then
# XXX: As-is, this seems to be broken and does not work.
# It is unknown to me how to solve this at this time.
# Good luck future maintainer.
cd "${build_dir}/icu"
PATH="/c/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin:$PATH"
MSBuild.exe source/allinone/allinone.sln -p:Configuration=Release -p:Platform=x64 -p:SkipUWP=true
mkdir "${install_dir}"
mv bin64 "${install_dir}/bin"
mv lib64 "${install_dir}/lib"
mv include "${install_dir}/include"
else
cd "${build_dir}/icu/source"
./runConfigureICU "${platform}" --prefix="${install_dir}"
make
make install
fi
# Add a tag to the installation directory to validate the cache
touch "${cache_tag}"
fi
##############
# Confirmation
echo "Displaying ICU build information as confirmation..."
export PATH="$HOME/icu4c/bin:${PATH}"
export LD_LIBRARY_PATH="$HOME/icu4c/lib"
export DYLD_LIBRARY_PATH="$HOME/icu4c/lib"
echo "which icuinfo: $(command -v icuinfo)"
echo "which icu-config: $(command -v icu-config)"
echo "icuinfo -v:"
icuinfo -v
echo "icu-config --version: $(icu-config --version)"
echo "icu-config --cxxflags: $(icu-config --cxxflags)"
echo "icu-config --cppflags: $(icu-config --cppflags)"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment