Skip to content

Commit

Permalink
ci: optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jun 28, 2023
1 parent 91d1237 commit 1d258c7
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
- name: Install the Nix package manager
uses: cachix/install-nix-action@v22

- id: set-matrix
- name: Build PHP versions matrix
id: set-matrix
run: |
echo "matrix=$(
nix eval --json --impure \
--expr 'builtins.filter (x: (null == builtins.match "(.*)-nts" x)) (builtins.attrNames (import ./.).packages.x86_64-linux)'
echo "php-matrix=$(
nix eval --json --impure --expr 'builtins.filter (x: builtins.substring 0 3 x == "php") (builtins.attrNames (import ./.).packages.x86_64-linux)'
)" >> $GITHUB_OUTPUT
build:
Expand All @@ -38,7 +38,7 @@ jobs:
strategy:
fail-fast: false
matrix:
packages: ${{fromJson(needs.determine-matrix.outputs.matrix)}}
packages: ${{fromJson(needs.determine-matrix.outputs.php-matrix)}}
operating-system: [ubuntu-latest, macOS-latest]

steps:
Expand All @@ -59,20 +59,21 @@ jobs:
run: |
nix build .#${{ matrix.packages }}
- name: Build ${{ matrix.packages }}
run: |
nix build .#env-${{ matrix.packages }}
- name: Build XDebug extension
if: "!contains( matrix.packages, 'env-' )"
continue-on-error: true
run: |
nix build .#${{ matrix.packages }}.extensions.xdebug
- name: Build pcov extension
if: "!contains( matrix.packages, 'env-' )"
continue-on-error: true
run: |
nix build .#${{ matrix.packages }}.extensions.pcov
- name: Build oci8 extension
if: "!contains( matrix.packages, 'env-' )"
continue-on-error: true
run: |
nix build .#${{ matrix.packages }}.extensions.oci8

0 comments on commit 1d258c7

Please sign in to comment.