Skip to content

Commit 4b15fb9

Browse files
committed
Update copyright notices, upgrade nixos to 24.05, add php 8.4
1 parent 4a345d0 commit 4b15fb9

File tree

8 files changed

+242
-86
lines changed

8 files changed

+242
-86
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- "8.1"
2424
- "8.2"
2525
- "8.3"
26+
- "8.4"
2627
steps:
2728
- uses: actions/checkout@v4
2829

@@ -62,6 +63,7 @@ jobs:
6263
- "8.1"
6364
- "8.2"
6465
- "8.3"
66+
- "8.4"
6567
steps:
6668
- uses: actions/checkout@v4
6769

@@ -126,8 +128,26 @@ jobs:
126128
with:
127129
parallel-finished: true
128130

129-
nix:
131+
nix-matrix:
130132
runs-on: ubuntu-latest
133+
outputs:
134+
matrix: ${{ steps.set-matrix.outputs.matrix }}
135+
steps:
136+
- uses: actions/checkout@v4
137+
- uses: cachix/install-nix-action@v27
138+
- id: set-matrix
139+
name: Generate Nix Matrix
140+
run: |
141+
set -Eeu
142+
matrix="$(nix eval --json '.#githubActions.matrix')"
143+
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
144+
145+
nix:
146+
name: "nix (${{ matrix.name }})"
147+
runs-on: ${{ matrix.os }}
148+
needs: nix-matrix
149+
strategy:
150+
matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
131151
steps:
132152
- uses: actions/checkout@v4
133153

@@ -136,34 +156,50 @@ jobs:
136156
id: nix-cache
137157
with:
138158
path: /tmp/nix-store.nar
139-
key: nix-store.nar-${{ runner.os }}-${{ hashFiles('flake.nix', 'flake.lock') }}
140-
restore-keys: nix-store.nar-${{ runner.os }}-
159+
key: nix-store.nar-${{ runner.os }}-${{ hashFiles('flake.lock') }}-${{ matrix.attr }}
160+
restore-keys: |
161+
nix-store.nar-${{ runner.os }}-${{ hashFiles('flake.lock') }}-${{ matrix.attr }}
162+
nix-store.nar-${{ runner.os }}-${{ hashFiles('flake.lock') }}-
163+
nix-store.nar-${{ runner.os }}-
141164
142-
- uses: cachix/install-nix-action@V27
165+
- uses: cachix/install-nix-action@v27
143166
with:
144-
nix_path: nixpkgs=channel:nixos-23.11
167+
nix_path: nixpkgs=channel:nixos-24.05
145168

146169
- name: Import Nix Store Cache
147170
if: "steps.nix-cache.outputs.cache-hit == 'true'"
148171
run: |
149172
nix-store --import < /tmp/nix-store.nar
150173
151-
- name: nix build -L
152-
run: |
153-
nix eval .#packages --impure --raw --apply '(import ./.github/attrs.nix { prefix = ".#packages"; })' \
154-
| xargs nix build -L
155-
156-
- run: nix flake check -L
174+
- run: nix build -L ".#${{ matrix.attr }}"
175+
176+
- run: find -L result*; cp result-coverage/coverage.info coverage.info || true
177+
178+
# - name: Upload coverage reports to Codecov
179+
# if: ${{ hashFiles('coverage.info') != '' }}
180+
# uses: codecov/codecov-action@v4
181+
# with:
182+
# file: coverage.info
183+
# token: ${{ secrets.CODECOV_TOKEN }}
184+
# slug: jbboehr/php-perfifidous
185+
#
186+
# - name: Coveralls
187+
# if: ${{ hashFiles('coverage.info') != '' }}
188+
# uses: coverallsapp/github-action@v2
189+
# continue-on-error: true
190+
# with:
191+
# file: coverage.info
192+
# format: lcov
193+
# parallel: true
157194

158195
- name: Export Nix Store Cache
159196
shell: bash
197+
# partially based on https://github.com/NixOS/nix/issues/1245#issuecomment-282586759
160198
run: |
161-
packages=
162-
packages+=$(nix eval .#packages --impure --raw --apply '(import ./.github/attrs.nix { prefix = ".#packages"; })')
163-
packages+=$'\n'
164-
packages+=$(nix eval .#checks --impure --raw --apply '(import ./.github/attrs.nix { prefix = ".#checks"; })')
165-
echo "$packages" \
166-
| xargs -I{} bash -c 'nix eval --raw {} && echo' \
167-
| grep -v pre-commit-run \
168-
| xargs nix-store -qR \
169-
| xargs nix-store --export > /tmp/nix-store.nar
199+
drv="$(nix-store -qd "$(readlink result)")"
200+
drvRefs="$( echo "$drv" | xargs nix-store -q --references )"
201+
( echo "$drvRefs" | grep '[.]drv$' | xargs nix-store -q --outputs ;
202+
echo "$drvRefs" | grep -v '[.]drv$' ) | \
203+
xargs nix-store -r | \
204+
xargs nix-store -qR |
205+
xargs nix-store --export > /tmp/nix-store.nar

config.m4

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright (c) anno Domini nostri Jesu Christi MMXVI-MMXXIV John Boehr & contributors
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU Affero General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU Affero General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU Affero General Public License
14+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
115

216
PHP_ARG_ENABLE(embed, whether to enable embed support,
317
[ --enable-embed Enable embed support])

derivation.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright (c) anno Domini nostri Jesu Christi MMXVI-MMXXIV John Boehr & contributors
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU Affero General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU Affero General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU Affero General Public License
14+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
115
{
216
lib,
317
php,

0 commit comments

Comments
 (0)