Skip to content

Commit

Permalink
PHPLIB-1260: Revamp evergreen config (#1179)
Browse files Browse the repository at this point in the history
* Split up evergreen config and create single build variant

* Upload built extension

* Add test variant

* Build on all platforms

* Run tests on all MongoDB versions

* Add remaining tests

* Build against latest extension branch

* Run no-auth tests

* Set PHP_VERSION expansion in test variants

* Remove sudo to fix RHEL builds

* Clean up legacy variants to account for progress

* Move Atlas Tests to new format

* Move serverless tests to new format

* Move more tests to new format

* Fix wrong output in test configuration

* Move CSFLE tests to new format

* Move ADL tests to new format

* Move lowest dependency tests to new format

* Define aliases for PR builds

* Prevent generated build files from showing diffs in pull requests

* Apply recent changes from PHPC config

This moves templates and generated files to separate folders and changes the loadbalanced tests to use its own topology instead of "sharded".

* Remove unused YAML tags

* Supply makeflags for pecl install

* Remove irrelevant functions

* Clean up variables when running scripts

* Skip CSFLE tests for all topologies

* Document environment variables for install-composer.sh

* Add missing CSFLE tag to no-aws-creds tests
  • Loading branch information
alcaeus authored Oct 18, 2023
1 parent 8337d6d commit bf22101
Show file tree
Hide file tree
Showing 48 changed files with 2,190 additions and 1,106 deletions.
42 changes: 42 additions & 0 deletions .evergreen/compile-extension.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/sh
set -o errexit # Exit the script with error if any of the commands fail

PATH="$PHP_PATH/bin:$PATH"

install_extension ()
{
rm -f ${PHP_PATH}/lib/php.ini

if [ "x${EXTENSION_BRANCH}" != "x" ] || [ "x${EXTENSION_REPO}" != "x" ]; then
CLONE_REPO=${EXTENSION_REPO:-https://github.com/mongodb/mongo-php-driver}
CHECKOUT_BRANCH=${EXTENSION_BRANCH:-master}

echo "Compiling driver branch ${CHECKOUT_BRANCH} from repository ${CLONE_REPO}"

mkdir -p /tmp/compile
rm -rf /tmp/compile/mongo-php-driver
git clone ${CLONE_REPO} /tmp/compile/mongo-php-driver
cd /tmp/compile/mongo-php-driver

git checkout ${CHECKOUT_BRANCH}
git submodule update --init
phpize
./configure --enable-mongodb-developer-flags
make all -j20 > /dev/null
make install

cd ${PROJECT_DIRECTORY}
elif [ "${EXTENSION_VERSION}" != "" ]; then
echo "Installing driver version ${EXTENSION_VERSION} from PECL"
MAKEFLAGS=-j20 pecl install -f mongodb-${EXTENSION_VERSION}
else
echo "Installing latest driver version from PECL"
MAKEFLAGS=-j20 pecl install -f mongodb
fi

cp ${PROJECT_DIRECTORY}/.evergreen/config/php.ini ${PHP_PATH}/lib/php.ini

php --ri mongodb
}

install_extension
Loading

0 comments on commit bf22101

Please sign in to comment.