Skip to content

Commit

Permalink
Merge branch 'v1.x' into merge-v1.20-into-v1.x-1726570880844
Browse files Browse the repository at this point in the history
* v1.x:
  Update branch names for GHA workflows (#1646)
  PHPC-2343: Require PHP 8.1 (#1631)
  • Loading branch information
alcaeus committed Sep 17, 2024
2 parents cd1f874 + 04c29be commit 08364be
Show file tree
Hide file tree
Showing 202 changed files with 434 additions and 3,164 deletions.
3 changes: 1 addition & 2 deletions .evergreen/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ initialisation. If a build step fails, test tasks are skipped for that platform

Build tasks are generated automatically and included in the main config file. The `build-variants.yml` file contains
the list of supported platforms that the extension is built for. `build-task-groups.yml` defines the task groups that
contain the build tasks. Note there is a separate task that skips PHP 7.4 and 8.0, as these versions do not support
OpenSSL 3 (currently used on RHEL 9+ and Ubuntu 22.04+).
contain the build tasks.

## Build Step 2: Run Tests

Expand Down
3 changes: 1 addition & 2 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,5 @@ include:
- filename: .evergreen/config/generated/test/ocsp.yml
- filename: .evergreen/config/generated/test/require-api-version.yml
- filename: .evergreen/config/generated/test/skip-crypt-shared.yml
- filename: .evergreen/config/generated/test-variant/modern-php-full.yml
- filename: .evergreen/config/generated/test-variant/legacy-php-full.yml
- filename: .evergreen/config/generated/test-variant/php-full.yml
- filename: .evergreen/config/generated/test-variant/libmongoc.yml
14 changes: 1 addition & 13 deletions .evergreen/config/build-task-groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,14 @@ task_groups:
# Builds all versions of PHP
- name: "build-all-php"
# Keep this number in sync with the number of PHP versions to allow for parallel builds
max_hosts: 4
max_hosts: 3
setup_task: *build_setup
setup_task_can_fail_task: true
setup_task_timeout_secs: 1800
teardown_task: *build_teardown
tasks:
- ".build"

# Builds all versions of PHP that support OpenSSL 3 (PHP 8.1+)
- name: "build-php-openssl3"
# Keep this number in sync with the number of PHP versions to allow for parallel builds
# Subtract 2 versions as PHP 7.4 and 8.0 are not built with OpenSSL 3
max_hosts: 2
setup_task: *build_setup
setup_task_can_fail_task: true
setup_task_timeout_secs: 1800
teardown_task: *build_teardown
tasks:
- ".build !.php7.4 !.php8.0"

- name: "build-php-libmongoc"
# Keep this in sync with the actual number of libmongoc builds (typically 3) defined in _template-build-libmongoc.yml
max_hosts: 3
Expand Down
8 changes: 4 additions & 4 deletions .evergreen/config/build-variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildvariants:
tags: ["build", "debian", "x64", "pr", "tag"]
run_on: debian12-small
tasks:
- name: "build-php-openssl3"
- name: "build-all-php"
- name: "build-php-libmongoc"
- name: build-debian11
display_name: "Build: Debian 11"
Expand All @@ -35,7 +35,7 @@ buildvariants:
tags: ["build", "rhel", "x64", "pr", "tag"]
run_on: rhel90-small
tasks:
- name: "build-php-openssl3"
- name: "build-all-php"
- name: build-rhel8-zseries
display_name: "Build: RHEL 8 Zseries"
tags: ["build", "rhel", "zseries", "tag"]
Expand Down Expand Up @@ -73,13 +73,13 @@ buildvariants:
tags: ["build", "ubuntu", "x64", "pr", "tag"]
run_on: ubuntu2204-small
tasks:
- name: "build-php-openssl3"
- name: "build-all-php"
- name: build-ubuntu2204-arm64
display_name: "Build: Ubuntu 22.04 ARM64"
tags: ["build", "ubuntu", "arm64", "tag"]
run_on: ubuntu2204-arm64-small
tasks:
- name: "build-php-openssl3"
- name: "build-all-php"
- name: build-ubuntu2004
display_name: "Build: Ubuntu 20.04 x64"
tags: ["build", "ubuntu", "x64", "tag"]
Expand Down
14 changes: 4 additions & 10 deletions .evergreen/config/generate-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
<?php

// Supported PHP versions. Add new versions to the beginning of the list
$modernPhpVersions = [
$phpVersions = [
'8.3',
'8.2',
'8.1',
];
$legacyPhpVersions = [
'8.0',
'7.4',
];
$supportedPhpVersions = array_merge($modernPhpVersions, $legacyPhpVersions);

// Supported MongoDB versions. Add new versions after "rapid"
$supportedMongoDBVersions = [
Expand All @@ -26,7 +21,7 @@
'4.0',
];

$latestPhpVersion = max($supportedPhpVersions);
$latestPhpVersion = max($phpVersions);

// Only test the latest PHP version for libmongoc
$libmongocBuildPhpVersions = [ $latestPhpVersion ];
Expand Down Expand Up @@ -57,7 +52,7 @@
$allFiles = [];

// Build tasks
$allFiles[] = generateConfigs('tasks', 'build', 'phpVersion', 'build-php.yml', $supportedPhpVersions);
$allFiles[] = generateConfigs('tasks', 'build', 'phpVersion', 'build-php.yml', $phpVersions);
$allFiles[] = generateConfigs('tasks', 'build', 'phpVersion', 'build-libmongoc.yml', $libmongocBuildPhpVersions);

// Test tasks
Expand All @@ -68,8 +63,7 @@
$allFiles[] = generateConfigs('tasks', 'test', 'mongodbVersion', 'skip-crypt-shared.yml', $skipCryptSharedServerVersions);

// Test variants
$allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'modern-php-full.yml', $modernPhpVersions);
$allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'legacy-php-full.yml', $legacyPhpVersions);
$allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'php-full.yml', $phpVersions);
$allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'libmongoc.yml', [$latestPhpVersion]);

echo "Generated config. Use the following list to import files:\n";
Expand Down
14 changes: 0 additions & 14 deletions .evergreen/config/generated/build/build-php.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 0 additions & 120 deletions .evergreen/config/generated/test-variant/legacy-php-full.yml

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 0 additions & 59 deletions .evergreen/config/templates/test-variant/legacy-php-full.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/actions/windows/prepare-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@ outputs:
runs:
using: composite
steps:
# Reinstall VC15 (Visual Studio 2017) for PHP 7.4 using a derivation of the
# script suggested in https://github.com/actions/runner-images/issues/9701
- name: Install VC15 component for PHP 7.4
if: ${{ inputs.version == '7.4' }}
shell: pwsh
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$installPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$component = "Microsoft.VisualStudio.Component.VC.v141.x86.x64"
$args = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$installPath`"", '--add', $component, '--quiet', '--norestart', '--nocache')
$process = Start-Process -FilePath cmd.exe -ArgumentList $args -Wait -PassThru -WindowStyle Hidden
- name: Setup PHP SDK
id: setup-php
uses: php/setup-php-sdk@v0.9
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/arginfo-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ on:
pull_request:
branches:
- "v*.*"
- "master"
- "feature/*"
push:
branches:
- "v*.*"
- "master"
- "feature/*"

env:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ on:
pull_request:
branches:
- "v*.*"
- "master"
- "feature/*"
push:
branches:
- "v*.*"
- "master"
- "feature/*"

env:
PHP_VERSION: "7.4"
PHP_VERSION: "8.1"

jobs:
coding-standards:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/composer-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ on:
pull_request:
branches:
- "v*.*"
- "master"
- "feature/*"
push:
branches:
- "v*.*"
- "master"
- "feature/*"

jobs:
Expand Down
Loading

0 comments on commit 08364be

Please sign in to comment.