Skip to content

Commit bf22101

Browse files
authored
PHPLIB-1260: Revamp evergreen config (#1179)
* 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
1 parent 8337d6d commit bf22101

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2190
-1106
lines changed

.evergreen/compile-extension.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/sh
2+
set -o errexit # Exit the script with error if any of the commands fail
3+
4+
PATH="$PHP_PATH/bin:$PATH"
5+
6+
install_extension ()
7+
{
8+
rm -f ${PHP_PATH}/lib/php.ini
9+
10+
if [ "x${EXTENSION_BRANCH}" != "x" ] || [ "x${EXTENSION_REPO}" != "x" ]; then
11+
CLONE_REPO=${EXTENSION_REPO:-https://github.com/mongodb/mongo-php-driver}
12+
CHECKOUT_BRANCH=${EXTENSION_BRANCH:-master}
13+
14+
echo "Compiling driver branch ${CHECKOUT_BRANCH} from repository ${CLONE_REPO}"
15+
16+
mkdir -p /tmp/compile
17+
rm -rf /tmp/compile/mongo-php-driver
18+
git clone ${CLONE_REPO} /tmp/compile/mongo-php-driver
19+
cd /tmp/compile/mongo-php-driver
20+
21+
git checkout ${CHECKOUT_BRANCH}
22+
git submodule update --init
23+
phpize
24+
./configure --enable-mongodb-developer-flags
25+
make all -j20 > /dev/null
26+
make install
27+
28+
cd ${PROJECT_DIRECTORY}
29+
elif [ "${EXTENSION_VERSION}" != "" ]; then
30+
echo "Installing driver version ${EXTENSION_VERSION} from PECL"
31+
MAKEFLAGS=-j20 pecl install -f mongodb-${EXTENSION_VERSION}
32+
else
33+
echo "Installing latest driver version from PECL"
34+
MAKEFLAGS=-j20 pecl install -f mongodb
35+
fi
36+
37+
cp ${PROJECT_DIRECTORY}/.evergreen/config/php.ini ${PHP_PATH}/lib/php.ini
38+
39+
php --ri mongodb
40+
}
41+
42+
install_extension

0 commit comments

Comments
 (0)