-
-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (52 loc) · 1.56 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Builds
concurrency:
group: php-src-nix
cancel-in-progress: true
on:
pull_request:
workflow_dispatch:
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: DeterminateSystems/nix-installer-action@main
- name: Build PHP matrix
id: set-phps
run: |
echo phps=$(
nix flake show --json | jq '.packages ."x86_64-linux" | keys'
) >> $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-latest, arch: x86_64-linux },
{ os: macOS-latest, arch: x86_64-darwin },
{ os: macos-14, arch: aarch64-darwin }
]
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Run the Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- uses: cachix/cachix-action@v15
with:
name: php-src-nix
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build ${{ matrix.phps }}
run: |
nix build .#${{ matrix.phps }}