ci: exclude PHP 5.6 builds on aarch64-linux
#538
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
name: Builds | |
on: | |
pull_request: | |
push: | |
branches: | |
- "master" | |
paths: | |
- "**.nix" | |
- ".github/workflows/*.yaml" | |
jobs: | |
determine-matrix: | |
name: Figure out the packages we need to build | |
runs-on: ubuntu-latest | |
outputs: | |
phps: ${{ steps.set-phps.outputs.phps }} | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v27 | |
- name: Build PHP matrix | |
id: set-phps | |
run: | | |
echo phps=$( | |
nix eval --json --impure --expr 'builtins.filter (x: builtins.substring 0 3 x == "php") (builtins.attrNames (import ./.).packages.x86_64-linux)' | |
) >> $GITHUB_OUTPUT | |
build: | |
name: "${{ matrix.phps }} on ${{ matrix.archs.arch }}" | |
needs: [determine-matrix] | |
runs-on: ${{ matrix.archs.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
phps: ${{fromJson(needs.determine-matrix.outputs.phps)}} | |
archs: | |
[ | |
{ os: ubuntu-24.04-arm, arch: aarch64-linux }, | |
{ os: ubuntu-latest, arch: x86_64-linux }, | |
{ os: macOS-latest, arch: x86_64-darwin }, | |
{ os: macos-14, arch: aarch64-darwin }, | |
] | |
exclude: | |
- phps: php56 | |
archs: | |
- { os: ubuntu-24.04-arm, arch: aarch64-linux } | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v27 | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: nix-shell | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
extraPullNames: fossar | |
- name: Build ${{ matrix.phps }} binary | |
run: | | |
nix build .#${{ matrix.phps }} | |
- name: Build ${{ matrix.phps }} environment | |
run: | | |
nix build .#env-${{ matrix.phps }} | |
- name: Build ${{ matrix.phps }} with all extensions enabled | |
continue-on-error: true | |
run: | | |
NIXPKGS_ALLOW_BROKEN=1 \ | |
NIXPKGS_ALLOW_UNFREE=1 \ | |
NIXPKGS_ALLOW_INSECURE=1 \ | |
nix build --impure --expr 'let pkgs = (import ./.).outputs.packages.${builtins.currentSystem}; php = pkgs.${{ matrix.phps }}; allExtensions = (builtins.attrNames php.extensions); in (import ./.).api.makePhp pkgs {php = "${{ matrix.phps }}"; withExtensions = allExtensions;}' |