Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 168 additions & 0 deletions .github/workflows/composer-install-matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
name: Composer install matrix

# Matrix over (PHP version × application roster). Each cell is a
# resolution smoke test: does `composer install` succeed on the bundle
# plus a specific set of Horde apps? No runtime bring-up, no tests.
#
# Rosters escalate: base-only < core-groupware < extended < full <
# wide-libs. If a bigger roster passes and a smaller one fails, look
# at the diff of packages between them.
#
# PHP versions match .horde.yml's ci-platform matrix (8.2 through 8.5).
# All installed from ppa:ondrej/php on ubuntu-24.04. PHP 8.1 is dropped
# because horde/hordectl requires ^8.2 and the bundle transitively
# depends on it via horde/hordectl in composer.json.
#
# Per-package stability flags (@RC, @beta, @alpha) are used to pin H6
# apps that have not yet reached stable. This avoids a global
# minimum-stability flip and matches what a downstream installer would
# write in composer.json today.
#
# Bugs this replaces: php.yml's whups step ran `require horde/kronolith`;
# php83.yml required horde/trean twice. Both are fixed here by pulling
# the roster out into a data list.

on:
push:
branches: ['FRAMEWORK_6_0']
pull_request:
branches: ['FRAMEWORK_6_0']
schedule:
- cron: '0 0 */2 * *'
workflow_dispatch:

permissions:
contents: read

jobs:
install:
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4', '8.5']
roster: [base-only, core-groupware, extended, full]
include:
# wide-libs adds 24 extra libraries on top of `full`. It's one
# cell rather than a whole row because running the same wide
# resolution graph on every PHP version doesn't add signal
# beyond what `full` already covers.
- php: '8.4'
roster: wide-libs
name: install (php${{ matrix.php }}, ${{ matrix.roster }})
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- name: Install PHP ${{ matrix.php }} from ondrej PPA
run: |
set -ex
sudo add-apt-repository ppa:ondrej/php -y
sudo apt -o Dpkg::Progress-Fancy=0 update
sudo apt -o Dpkg::Progress-Fancy=0 install -y \
php${{ matrix.php }} \
php${{ matrix.php }}-cli \
php${{ matrix.php }}-fpm \
php${{ matrix.php }}-dom \
php${{ matrix.php }}-pdo \
php${{ matrix.php }}-sqlite3 \
php${{ matrix.php }}-mysql \
php${{ matrix.php }}-curl \
php${{ matrix.php }}-intl \
php${{ matrix.php }}-mbstring \
php${{ matrix.php }}-bcmath \
php${{ matrix.php }}-ldap
sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}
php --version

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache composer packages
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ runner.os }}-php${{ matrix.php }}-${{ matrix.roster }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
composer-${{ runner.os }}-php${{ matrix.php }}-${{ matrix.roster }}-
composer-${{ runner.os }}-php${{ matrix.php }}-

- name: Install bundle dependencies
run: composer install --prefer-dist --no-progress

# Rosters. Every `composer require` step below is gated on the
# roster label. Later rosters implicitly include everything in
# the earlier ones (the yaml gates enforce this because their
# `contains(...)` predicates overlap).

- name: Install core groupware apps
if: contains(fromJSON('["core-groupware","extended","full","wide-libs"]'), matrix.roster)
run: |
# Per-package stability floors: apps whose H6-era line has
# not reached stable yet get @RC or @beta so composer picks
# up the H6 branch instead of the last legacy stable. Apps
# with a stable H6 release (mnemo, ingo, turba, kronolith,
# content) take the plain version. Transitive stability
# doesn't propagate through `composer require`, so packages
# pulled in by whups/passwd that also have no stable H6
# release (horde/scheduler) need their own explicit @flag.
composer require --prefer-dist --no-progress \
'horde/passwd:^6.0.0@RC' \
'horde/content:^3.0.0' \
'horde/timeobjects:^3.0.0@beta' \
'horde/mnemo:^5.0.0' \
'horde/ingo:^4.0.0' \
'horde/turba:^5.0.0' \
'horde/kronolith:^5.0.0' \
'horde/whups:^4.0.0@RC' \
'horde/scheduler:^3.0.0@alpha'

- name: Install extended apps
if: contains(fromJSON('["extended","full","wide-libs"]'), matrix.roster)
run: |
# chora has never reached stable; jonah and trean have RC
# H6 lines that we prefer to the legacy stables.
composer require --prefer-dist --no-progress \
'horde/trean:^2.0.3@RC' \
'horde/chora:^1.0.0@alpha' \
'horde/jonah:^1.0.0@RC'

- name: Install full app set
if: contains(fromJSON('["full","wide-libs"]'), matrix.roster)
run: |
composer require --prefer-dist --no-progress \
'horde/gollem:^5.0.0@beta'

- name: Install additional libraries (wide-libs cell)
if: matrix.roster == 'wide-libs'
run: |
# Historical wide-library sweep. Originally lived in php84-alpha.yml
# under `composer require --no-progress` with global
# minimum-stability=alpha; every one of these now has a stable
# H6-era release, so no stability flags are needed. Kept as a
# single cell to exercise the wide resolution graph.
composer require --prefer-dist --no-progress \
horde/rdo \
horde/mime_viewer \
horde/ldap \
horde/editor \
horde/cache \
horde/cli \
horde/backup \
horde/browser \
horde/icalendar \
horde/dav \
horde/imap_client \
horde/imsp \
horde/itip \
horde/javascriptminify_jsmin \
horde/lock \
horde/log \
horde/mapi \
horde/managesieve \
horde/logintasks \
horde/routes \
horde/spellchecker \
horde/stringprep \
horde/timezone \
horde/version
Loading
Loading