blob: 4ae8247ad054e15fdb7a11051690ee95e872e2d5 [file] [log] [blame]
Variables
---------
The CI scripts use the following environment variables:
* APR_VERSION - if set, APR of this version is built and installed in
$HOME/root/apr-$APR_VERSION - a value of "trunk" means trunk is
used, "*.x" means a branch, otherwise a tagged version is implied.
* APR_CONFIG - arguments to pass when running APR's configure script
if APR_VERSION is set
* APU_VERSION - if set, APR-util of this version is built and
installed in $HOME/root/apr-util-$APU_VERSION - a value of "*.x"
means a branch, otherwise a tagged version is implied. (Since there
is no "trunk" for apr-util, that value cannot be used here.)
* APU_CONFIG - arguments to pass when running APR-util's configure
script if APU_VERSION is set
* CONFIG - arguments to pass to httpd's configure script.
* BUILDCONFIG - arguments to pass when running httpd's ./buildconf script
* MFLAGS - arguments to pass when running "make" for httpd.
* SKIP_TESTING - if set, the Perl test framework is not run for the
build.
* TEST_UBSAN - set for job using UBSan ("Undefined Behaviour Sanitizer")
* TEST_MALLOC - set for job using enhanced malloc debugging.
* TEST_INSTALL - set for job testing "make install"
* TEST_VPATH - set for job testing srcdir!=builddir
* TEST_LDAP - set for job with slapd, running LDAP tests
* TEST_SSL - set for job with SSL/TLS testing variants
* TESTS - a list of Perl framework tests to run
* TEST_ARGS - arguments to pass to ./t/TEST in the Perl test framework
* CLEAR_CACHE - if set, the cached $HOME/root is removed before each build
Caching -- NOTE, BROKEN IN GITHUB ACTIONS --
-------
Perl modules installed in $HOME/perl5 are cached.
Anything installed into the $HOME/root directory is cached - notably,
versions of APR/APR-util are installed here and cached across httpd
build jobs without needing to be rebuilt every time.
The cached installs of APR/APR-util are refreshed if the
last-changed-revision of the build is stale.
If APR_VERSION and APU_VERSION are both set to 1.x versions, then
CLEAR_CACHE should also be set to disable APR* caching. APR-util can
only be rebuilt if an APR checkout is present, so a APR-util cannot be
built from source alone. (i.e. the scripts do not handle the case of
cached, fresh APR plus a cached but stale APR-util)
Travis to Github Actions Migration TODO
---------------------------------------
* better path filtering so e.g. CHANGES changes don't trigger CI
* support branch conditionals again (some tests are 2.4.x only, some trunk only)
* make caching work properly for APR + CPAN modules
- this is using the wrong model at the moment
- the cache key needs to be based off (source code, job configuration)
- rather than done on the fly in test/travis_before_linux.sh
- pebble + Rustls builds should also be cached
* turn on failure notifications?
* test across different Ubuntu versions again
- and test against OpenSSL 1.x since we're now ONLY building against 3.x
* update the docs below for testing from PRs/feature branches
* introduce some job ordering rather than having a flat/concurrent
set, if the default "./configure && make && test" works *then* start
jobs doing 200 different variations on ./configure --enable-XXX
i.e. stop burning CPU time for a typo which breaks every job
TODO list
---------
* non-x86 builds
* MacOS build
* Windows build
* clang-on-Linux build
* Use containers for non-Ubuntu-based Linux testing
Known Failures
--------------
Some known failures:
* prefork, and more rarely non-prefork testing sometimes catches child
segfaults under pool-debug from assert()s in (e.g.)
__pthread_tpp_change_priority where one child is destroying threads
which another is waiting for, or iterating through via
apr_pool_walk_tree().
See dev@httpd threads:
msg <5f4abde1b5789_13fde2ecacb40795a1@travis-tasks-5b566d48fc-drkb9.mail>
msg <73060f7b-df7f-ad3c-a9fa-dd666a59b31e@kippdata.de> and
https://bz.apache.org/bugzilla/show_bug.cgi?id=63098
https://bz.apache.org/bugzilla/show_bug.cgi?id=46185
Not clear if there is a real bug here which can be reproduced
outside of pool-debug.
Testing from a Feature Branch
-----------------------------
An SVN branch off trunk should be mirrored to github, and will be
tested in the same way that trunk is in CI, so this workflow is
available for those familiar with using Subversion and the standard
ASF/httpd repository layout.
Test runs are listed at: https://github.com/apache/httpd/actions
A workflow to enable testing would be as follows, substituting
$USERNAME for your github username:
$ git clone https://github.com/apache/httpd
$ cd httpd
$ git remote add $USERNAME git@github.com:$USERNAME/httpd.git
$ git checkout -b my-feature origin/trunk
... do some work ...
$ git commit ...
$ git push -u $USERNAME my-feature:my-feature
To create a Pull Request, go to the URL produced in the "git push"
command output when pushing to your fork, which is something like:
https://github.com/apache/httpd/compare/trunk...$USERNAME:trunk
Once a PR has been created, the tests will run and test results
displayed directly in the PR.
To merge from github back to SVN trunk, create a patch from e.g.:
$ git diff origin/trunk..my-feature
and then apply it in SVN. To rebase a feature once trunk has
diverged, from a feature branch run:
$ git pull
$ git rebase -i origin/trunk
and follow the standard rebase steps.
An alternative way to apply a PR into an SVN checkout is to use the
apply_trunk_pr.sh script:
https://svn.apache.org/repos/asf/httpd/dev-tools/github/apply_trunk_pr.sh
If you use keywords in the SVN commit message, the PR will be closed
when the commit is mirrored to Github, e.g. a commit message like:
mod_foo: Fix the baz feature.
PR: 12345
Submitted by: Jane Doe <jane example.com>
Github: closes #1
will close PR #1 when it's merged.