Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Change Travis build to run with specific ICU version #14259

Closed
@webmozart

Description

@webmozart

Symfony has various tests that rely on the intl extension to be present. These tests are run only if a certain of the ICU library is compiled with the intl extension (see IntlTestHelper). If not, these tests are skipped. The reason is that we otherwise have volatile tests that succeed on a system with ICU 51, but fail on another using ICU 49 (for example).

Our problem is that Travis CI uses ICU 4.8 (see Travis output), hence the intl tests are not executed on Travis, which leads to undetected test failures (see #14256).

We should change the Travis build to compile PHP with a specific ICU version. Ideally, we'd use ICU 55, which is the latest stable version. However, I think that someone who's more familiar with Travis and its configuration/related technologies than I am should work on this.

Information needed to compile PHP with a custom ICU version: The ICU versions can be checked out here: http://source.icu-project.org/repos/icu/icu/tags/

  1. Check out
  2. cd source
  3. ./configure --prefix=$(pwd)/../build (sets a custom install dir)
  4. make (build)
  5. make install (install to "build" dir)

Now that ICU is built, you need to run PHP's "configure" script and point it to the build dir:

./configure ... --enable-intl --with-icu-dir=/path/to/icu/build

In the case of Travis, the --enable-intl switch is already there, but the --with-icu-dir switch is obviously missing: https://github.com/travis-ci/travis-cookbooks/blob/master/ci_environment/phpbuild/templates/default/default_configure_options.erb

Who can work on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions