flake.lock: Update #1167
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file builds given version of PHP and pushes it to Cachix cache. | |
# The following secrets need to be set: | |
# - “CACHIX_AUTH_TOKEN” for uploading built Nix packages to Cachix | |
name: Build | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: "PHP ${{ matrix.php.branch }} on ${{ matrix.archs.arch }}" | |
runs-on: ${{ matrix.archs.os }} | |
strategy: | |
matrix: | |
php: | |
- branch: '8.3' | |
- branch: '8.2' | |
- branch: '8.1' | |
- branch: '8.0' | |
- branch: '7.4' | |
- branch: '7.3' | |
- branch: '7.2' | |
- branch: '7.1' | |
- branch: '7.0' | |
- branch: '5.6' | |
archs: | |
[ | |
{ os: ubuntu-latest, arch: x86_64-linux }, | |
{ os: macOS-latest, arch: x86_64-darwin }, | |
] | |
# We want to fix failures individually. | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v4 | |
- name: Set up Nix cache | |
uses: cachix/cachix-action@v12 | |
with: | |
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 "minor=$minor" >> $GITHUB_OUTPUT | |
echo "major=$major" >> $GITHUB_OUTPUT | |
echo "attr=$attr" >> $GITHUB_OUTPUT | |
- name: Build PHP | |
run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-php | |
- name: List extensions | |
run: | | |
nix eval --json --impure --expr 'builtins.attrNames (import ./.).packages.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}.extensions' | |
- name: Build Imagick extension | |
run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-imagick | |
- name: Build Redis extension | |
run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-redis | |
- name: Build Redis 3 extension | |
if: ${{ steps.params.outputs.major < 8 && matrix.archs.arch == 'x86_64-linux' }} | |
run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-redis3 | |
- name: Build MySQL extension | |
if: ${{ steps.params.outputs.major < 7 }} | |
run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-mysql | |
- name: Build Xdebug extension | |
if: ${{ !(steps.params.outputs.major == 8 && steps.params.outputs.minor == 3) }} | |
run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-xdebug | |
- name: Build Tidy extension | |
run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-tidy | |
- name: Check that composer PHAR works | |
run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-composer-phar | |
- name: Validate php.extensions.mysqli default unix socket path | |
run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-mysqli-socket-path | |
- name: Validate php.extensions.pdo_mysql default unix socket path | |
run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-pdo_mysql-socket-path |