From d8112c877a08ee88cd38e87e3f4b50b1707840c9 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Thu, 10 Apr 2025 10:17:09 +0200 Subject: [PATCH] Test against stable 2.0 version of the extension --- .evergreen/config.yml | 2 + .evergreen/config/generate-config.php | 5 +- .../generated/build/build-extension.yml | 240 ++++++++---------- .../config/generated/test-variant/lowest.yml | 16 ++ .../config/generated/test-variant/phpc.yml | 42 +++ .../templates/build/build-extension.yml | 60 ++--- .github/workflows/coding-standards.yml | 4 +- .github/workflows/generator.yml | 4 +- .github/workflows/static-analysis.yml | 4 +- .github/workflows/tests.yml | 4 +- 10 files changed, 206 insertions(+), 175 deletions(-) create mode 100644 .evergreen/config/generated/test-variant/lowest.yml create mode 100644 .evergreen/config/generated/test-variant/phpc.yml diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 1c4e2a22a..2c7fcb3b9 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -71,3 +71,5 @@ include: - filename: .evergreen/config/generated/test/require-api-version.yml - filename: .evergreen/config/generated/test/csfle.yml - filename: .evergreen/config/generated/test-variant/modern-php-full.yml + - filename: .evergreen/config/generated/test-variant/phpc.yml + - filename: .evergreen/config/generated/test-variant/lowest.yml diff --git a/.evergreen/config/generate-config.php b/.evergreen/config/generate-config.php index 802a0af9f..82a1d701a 100644 --- a/.evergreen/config/generate-config.php +++ b/.evergreen/config/generate-config.php @@ -58,9 +58,8 @@ // Test variants $allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'modern-php-full.yml', $supportedPhpVersions); -// TODO: Re-enable when 2.0.0 is released -// $allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'phpc.yml', [$latestPhpVersion]); -// $allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'lowest.yml', [$lowestPhpVersion]); +$allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'phpc.yml', [$latestPhpVersion]); +$allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'lowest.yml', [$lowestPhpVersion]); echo "Generated config. Use the following list to import files:\n"; echo implode("\n", array_map('getImportConfig', $allFiles)) . "\n"; diff --git a/.evergreen/config/generated/build/build-extension.yml b/.evergreen/config/generated/build/build-extension.yml index 993396ec7..04860628e 100644 --- a/.evergreen/config/generated/build/build-extension.yml +++ b/.evergreen/config/generated/build/build-extension.yml @@ -7,41 +7,37 @@ tasks: vars: PHP_VERSION: "8.4" - func: "compile extension" - # TODO: remove once 2.0.0 is released + - func: "upload extension" + - name: "build-php-8.4-lowest" + tags: ["build", "php8.4", "lowest", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.4" + - func: "compile extension" + vars: + EXTENSION_VERSION: "2.0.0" + - func: "upload extension" + - name: "build-php-8.4-next-stable" + tags: ["build", "php8.4", "next-stable", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.4" + - func: "compile extension" + vars: + EXTENSION_BRANCH: "v2.0" + - func: "upload extension" + - name: "build-php-8.4-next-minor" + tags: ["build", "php8.4", "next-minor"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.4" + - func: "compile extension" vars: EXTENSION_BRANCH: "v2.x" - func: "upload extension" - # TODO: re-enable once 2.0.0 is released -# - name: "build-php-8.4-lowest" -# tags: ["build", "php8.4", "lowest", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.4" -# - func: "compile extension" -# vars: -# EXTENSION_VERSION: "2.0.0" -# - func: "upload extension" -# - name: "build-php-8.4-next-stable" -# tags: ["build", "php8.4", "next-stable", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.4" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v2.0" -# - func: "upload extension" -# - name: "build-php-8.4-next-minor" -# tags: ["build", "php8.4", "next-minor"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.4" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v2.x" -# - func: "upload extension" - name: "build-php-8.3" tags: ["build", "php8.3", "stable", "pr", "tag"] commands: @@ -49,41 +45,37 @@ tasks: vars: PHP_VERSION: "8.3" - func: "compile extension" - # TODO: remove once 2.0.0 is released + - func: "upload extension" + - name: "build-php-8.3-lowest" + tags: ["build", "php8.3", "lowest", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.3" + - func: "compile extension" + vars: + EXTENSION_VERSION: "2.0.0" + - func: "upload extension" + - name: "build-php-8.3-next-stable" + tags: ["build", "php8.3", "next-stable", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.3" + - func: "compile extension" + vars: + EXTENSION_BRANCH: "v2.0" + - func: "upload extension" + - name: "build-php-8.3-next-minor" + tags: ["build", "php8.3", "next-minor"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.3" + - func: "compile extension" vars: EXTENSION_BRANCH: "v2.x" - func: "upload extension" - # TODO: re-enable once 2.0.0 is released -# - name: "build-php-8.3-lowest" -# tags: ["build", "php8.3", "lowest", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.3" -# - func: "compile extension" -# vars: -# EXTENSION_VERSION: "2.0.0" -# - func: "upload extension" -# - name: "build-php-8.3-next-stable" -# tags: ["build", "php8.3", "next-stable", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.3" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v2.0" -# - func: "upload extension" -# - name: "build-php-8.3-next-minor" -# tags: ["build", "php8.3", "next-minor"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.3" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v2.x" -# - func: "upload extension" - name: "build-php-8.2" tags: ["build", "php8.2", "stable", "pr", "tag"] commands: @@ -91,41 +83,37 @@ tasks: vars: PHP_VERSION: "8.2" - func: "compile extension" - # TODO: remove once 2.0.0 is released + - func: "upload extension" + - name: "build-php-8.2-lowest" + tags: ["build", "php8.2", "lowest", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.2" + - func: "compile extension" + vars: + EXTENSION_VERSION: "2.0.0" + - func: "upload extension" + - name: "build-php-8.2-next-stable" + tags: ["build", "php8.2", "next-stable", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.2" + - func: "compile extension" + vars: + EXTENSION_BRANCH: "v2.0" + - func: "upload extension" + - name: "build-php-8.2-next-minor" + tags: ["build", "php8.2", "next-minor"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.2" + - func: "compile extension" vars: EXTENSION_BRANCH: "v2.x" - func: "upload extension" - # TODO: re-enable once 2.0.0 is released -# - name: "build-php-8.2-lowest" -# tags: ["build", "php8.2", "lowest", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.2" -# - func: "compile extension" -# vars: -# EXTENSION_VERSION: "2.0.0" -# - func: "upload extension" -# - name: "build-php-8.2-next-stable" -# tags: ["build", "php8.2", "next-stable", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.2" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v2.0" -# - func: "upload extension" -# - name: "build-php-8.2-next-minor" -# tags: ["build", "php8.2", "next-minor"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.2" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v2.x" -# - func: "upload extension" - name: "build-php-8.1" tags: ["build", "php8.1", "stable", "pr", "tag"] commands: @@ -133,38 +121,34 @@ tasks: vars: PHP_VERSION: "8.1" - func: "compile extension" - # TODO: remove once 2.0.0 is released + - func: "upload extension" + - name: "build-php-8.1-lowest" + tags: ["build", "php8.1", "lowest", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.1" + - func: "compile extension" + vars: + EXTENSION_VERSION: "2.0.0" + - func: "upload extension" + - name: "build-php-8.1-next-stable" + tags: ["build", "php8.1", "next-stable", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.1" + - func: "compile extension" + vars: + EXTENSION_BRANCH: "v2.0" + - func: "upload extension" + - name: "build-php-8.1-next-minor" + tags: ["build", "php8.1", "next-minor"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.1" + - func: "compile extension" vars: EXTENSION_BRANCH: "v2.x" - func: "upload extension" - # TODO: re-enable once 2.0.0 is released -# - name: "build-php-8.1-lowest" -# tags: ["build", "php8.1", "lowest", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.1" -# - func: "compile extension" -# vars: -# EXTENSION_VERSION: "2.0.0" -# - func: "upload extension" -# - name: "build-php-8.1-next-stable" -# tags: ["build", "php8.1", "next-stable", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.1" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v2.0" -# - func: "upload extension" -# - name: "build-php-8.1-next-minor" -# tags: ["build", "php8.1", "next-minor"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.1" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v2.x" -# - func: "upload extension" diff --git a/.evergreen/config/generated/test-variant/lowest.yml b/.evergreen/config/generated/test-variant/lowest.yml new file mode 100644 index 000000000..ce3b5fc69 --- /dev/null +++ b/.evergreen/config/generated/test-variant/lowest.yml @@ -0,0 +1,16 @@ +# This file is generated automatically - please edit the "templates/test-variant/lowest.yml" template file instead. +buildvariants: + - name: test-rhel80-php-8.1-local-lowest + tags: ["test", "rhel", "x64", "php8.1", "pr", "tag"] + display_name: "Test: RHEL 8.0, PHP 8.1, Lowest Dependencies" + run_on: rhel80-small + expansions: + FETCH_BUILD_VARIANT: "build-rhel80" + FETCH_BUILD_TASK: "build-php-8.1-lowest" + PHP_VERSION: "8.1" + DEPENDENCIES: "lowest" + depends_on: + - variant: "build-rhel80" + name: "build-php-8.1-lowest" + tasks: + - ".replicaset .local .4.0 !.csfle" diff --git a/.evergreen/config/generated/test-variant/phpc.yml b/.evergreen/config/generated/test-variant/phpc.yml new file mode 100644 index 000000000..e0eb428ce --- /dev/null +++ b/.evergreen/config/generated/test-variant/phpc.yml @@ -0,0 +1,42 @@ +# This file is generated automatically - please edit the "templates/test-variant/phpc.yml" template file instead. +buildvariants: + # Variants with different PHPC versions + - name: test-debian12-php-8.3-phpc-next-stable + tags: ["test", "debian", "x64", "php8.3", "pr", "tag"] + display_name: "Test: Debian 12, PHP 8.3, PHPC next-stable" + run_on: debian12-small + expansions: + FETCH_BUILD_VARIANT: "build-debian12" + FETCH_BUILD_TASK: "build-php-8.3-next-stable" + PHP_VERSION: "8.3" + depends_on: + - variant: "build-debian12" + name: "build-php-8.3-next-stable" + tasks: + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - "test_serverless_task_group" + - "test_serverless_proxy_task_group" + - "test-atlas-data-lake" + + - name: test-debian12-php-8.3-phpc-next-minor + tags: ["test", "debian", "x64", "php8.3"] + display_name: "Test: Debian 12, PHP 8.3, PHPC next-minor" + run_on: debian12-small + expansions: + FETCH_BUILD_VARIANT: "build-debian12" + FETCH_BUILD_TASK: "build-php-8.3-next-minor" + PHP_VERSION: "8.3" + depends_on: + - variant: "build-debian12" + name: "build-php-8.3-next-minor" + tasks: + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - "test_serverless_task_group" + - "test_serverless_proxy_task_group" + - "test-atlas-data-lake" diff --git a/.evergreen/config/templates/build/build-extension.yml b/.evergreen/config/templates/build/build-extension.yml index 1599967ab..08d4ecc2a 100644 --- a/.evergreen/config/templates/build/build-extension.yml +++ b/.evergreen/config/templates/build/build-extension.yml @@ -5,38 +5,34 @@ vars: PHP_VERSION: "%phpVersion%" - func: "compile extension" - # TODO: remove once 2.0.0 is released + - func: "upload extension" + - name: "build-php-%phpVersion%-lowest" + tags: ["build", "php%phpVersion%", "lowest", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "%phpVersion%" + - func: "compile extension" + vars: + EXTENSION_VERSION: "2.0.0" + - func: "upload extension" + - name: "build-php-%phpVersion%-next-stable" + tags: ["build", "php%phpVersion%", "next-stable", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "%phpVersion%" + - func: "compile extension" + vars: + EXTENSION_BRANCH: "v2.0" + - func: "upload extension" + - name: "build-php-%phpVersion%-next-minor" + tags: ["build", "php%phpVersion%", "next-minor"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "%phpVersion%" + - func: "compile extension" vars: EXTENSION_BRANCH: "v2.x" - func: "upload extension" - # TODO: re-enable once 2.0.0 is released -# - name: "build-php-%phpVersion%-lowest" -# tags: ["build", "php%phpVersion%", "lowest", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "%phpVersion%" -# - func: "compile extension" -# vars: -# EXTENSION_VERSION: "2.0.0" -# - func: "upload extension" -# - name: "build-php-%phpVersion%-next-stable" -# tags: ["build", "php%phpVersion%", "next-stable", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "%phpVersion%" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v2.0" -# - func: "upload extension" -# - name: "build-php-%phpVersion%-next-minor" -# tags: ["build", "php%phpVersion%", "next-minor"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "%phpVersion%" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v2.x" -# - func: "upload extension" diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index b03f7779f..462e4d67e 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -13,9 +13,7 @@ on: env: PHP_VERSION: "8.2" - # TODO: change to "stable" once 2.0.0 is released - # DRIVER_VERSION: "stable" - DRIVER_VERSION: "mongodb/mongo-php-driver@v2.x" + DRIVER_VERSION: "stable" jobs: phpcs: diff --git a/.github/workflows/generator.yml b/.github/workflows/generator.yml index 711befabd..9b504ef34 100644 --- a/.github/workflows/generator.yml +++ b/.github/workflows/generator.yml @@ -13,9 +13,7 @@ on: env: PHP_VERSION: "8.2" - # TODO: change to "stable" once 2.0.0 is released - # DRIVER_VERSION: "stable" - DRIVER_VERSION: "mongodb/mongo-php-driver@v2.x" + DRIVER_VERSION: "stable" jobs: psalm: diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 82919098f..0103bdcd1 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -19,9 +19,7 @@ on: env: PHP_VERSION: "8.2" - # TODO: change to "stable" once 2.0.0 is released - # DRIVER_VERSION: "stable" - DRIVER_VERSION: "mongodb/mongo-php-driver@v2.x" + DRIVER_VERSION: "stable" jobs: psalm: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b7738ca3c..36640a724 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,9 +12,7 @@ on: - "feature/*" env: - # TODO: change to "stable" once 2.0.0 is released - # DRIVER_VERSION: "stable" - DRIVER_VERSION: "mongodb/mongo-php-driver@v2.x" + DRIVER_VERSION: "stable" jobs: phpunit: