Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coding style cleanups #108

Merged
merged 3 commits into from
May 15, 2022
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
60 changes: 31 additions & 29 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,19 @@ on:

jobs:
build:
name: 'PHP ${{ matrix.php.major }}.${{ matrix.php.minor }}'
name: 'PHP ${{ matrix.php.branch }}'
runs-on: ubuntu-20.04
strategy:
matrix:
php:
- major: 8
minor: 1
- major: 8
minor: 0
- major: 7
minor: 4
- major: 7
minor: 3
- major: 7
minor: 2
- major: 7
minor: 1
- major: 7
minor: 0
- major: 5
minor: 6
- branch: '8.1'
- branch: '8.0'
- branch: '7.4'
- branch: '7.3'
- branch: '7.2'
- branch: '7.1'
- branch: '7.0'
- branch: '5.6'
# We want to fix failures individually.
fail-fast: false
steps:
Expand All @@ -44,34 +36,44 @@ jobs:
name: fossar
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Set job parameters
id: params
run: |
branch=${{ matrix.php.branch }}
major=${branch%%.*}
minor=${branch#*.}
attr=php$major$minor
echo "::set-output name=major::$major"
echo "::set-output name=attr::$attr"

- name: Build PHP
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-php
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-php

- name: Build Imagick extension
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-imagick
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-imagick

- name: Build Redis extension
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-redis
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-redis

- name: Build Redis 3 extension
if: ${{ matrix.php.major < 8 }}
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-redis3
if: ${{ steps.params.outputs.major < 8 }}
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-redis3

- name: Build MySQL extension
if: ${{ matrix.php.major < 7 }}
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-mysql
if: ${{ steps.params.outputs.major < 7 }}
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-mysql

- name: Build Xdebug extension
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-xdebug
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-xdebug

- name: Build Tidy extension
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-tidy
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-tidy

- name: Check that composer PHAR works
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-composer-phar
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-composer-phar

- name: Validate php.extensions.mysqli default unix socket path
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-mysqli-socket-path
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-mysqli-socket-path

- name: Validate php.extensions.pdo_mysql default unix socket path
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-pdo_mysql-socket-path
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-pdo_mysql-socket-path
Loading