-
Notifications
You must be signed in to change notification settings - Fork 29
152 lines (146 loc) · 5.83 KB
/
pipeline.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Pipeline
on:
pull_request:
branches:
- master
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
nix-fmt-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: fmt
run: |
find . -iname '*.nix' | xargs nix shell -f ./ nixpkgs-fmt -c nixpkgs-fmt --check
- name: check
run: nix flake check
native-linux:
strategy:
fail-fast: false
matrix:
setup:
- { ocaml-version: 4_14, continue-on-error: false }
- { ocaml-version: 5_0, continue-on-error: false }
- { ocaml-version: 5_1, continue-on-error: false }
name: Native packages (Linux, OCaml ${{ matrix.setup.ocaml-version }})
runs-on: ubuntu-latest
env:
NIXPKGS_ALLOW_UNFREE: 1
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
experimental-features = nix-command flakes
system-features = nixos-test benchmark big-parallel kvm
extra-substituters = https://anmonteiro.nix-cache.workers.dev
extra-trusted-public-keys = ocaml.nix-cache.com-1:/xI2h2+56rwFfKyyFVbkJSeGqSIYMC/Je+7XXqGKDIY=
- uses: nix-ocaml/nix-s3-action@fork
with:
endpoint: "s3://overlays?endpoint=https://7a53c28e9b7a91239f9ed42da04276bc.r2.cloudflarestorage.com"
signingKey: ${{ secrets.R2_SIGNING_KEY }}
awsAccessKeyId: ${{ secrets.R2_ACCESS_KEY_ID }}
awsSecretAccessKey: ${{ secrets.R2_SECRET_ACESS_KEY }}
- name: Build nix packages
run: ./ci.sh x86_64-linux build_${{ matrix.setup.ocaml-version }}
continue-on-error: ${{ matrix.setup.continue-on-error }}
top-level-packages:
strategy:
fail-fast: false
matrix:
setup:
- { os: ubuntu-latest, target: x86_64-linux }
- { os: macos-13, target: x86_64-darwin }
name: Native (Top-level) packages (${{ matrix.setup.os }})
runs-on: ${{ matrix.setup.os }}
env:
NIXPKGS_ALLOW_UNFREE: 1
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
experimental-features = nix-command flakes
system-features = nixos-test benchmark big-parallel kvm
extra-substituters = https://anmonteiro.nix-cache.workers.dev
extra-trusted-public-keys = ocaml.nix-cache.com-1:/xI2h2+56rwFfKyyFVbkJSeGqSIYMC/Je+7XXqGKDIY=
- uses: nix-ocaml/nix-s3-action@fork
with:
endpoint: "s3://overlays?endpoint=https://7a53c28e9b7a91239f9ed42da04276bc.r2.cloudflarestorage.com"
signingKey: ${{ secrets.R2_SIGNING_KEY }}
awsAccessKeyId: ${{ secrets.R2_ACCESS_KEY_ID }}
awsSecretAccessKey: ${{ secrets.R2_SECRET_ACESS_KEY }}
- name: Build nix packages
run: ./ci.sh ${{ matrix.setup.target }} build_top-level-packages
native-macos:
strategy:
fail-fast: false
matrix:
setup:
- { ocaml-version: 4_14, continue-on-error: false }
- { ocaml-version: 5_0, continue-on-error: false }
- { ocaml-version: 5_1, continue-on-error: false }
name: Native packages (macOS, OCaml ${{ matrix.setup.ocaml-version }})
runs-on: macos-13
env:
NIXPKGS_ALLOW_UNFREE: 1
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
experimental-features = nix-command flakes
system-features = nixos-test benchmark big-parallel kvm
extra-substituters = https://anmonteiro.nix-cache.workers.dev
extra-trusted-public-keys = ocaml.nix-cache.com-1:/xI2h2+56rwFfKyyFVbkJSeGqSIYMC/Je+7XXqGKDIY=
- uses: nix-ocaml/nix-s3-action@fork
with:
endpoint: "s3://overlays?endpoint=https://7a53c28e9b7a91239f9ed42da04276bc.r2.cloudflarestorage.com"
signingKey: ${{ secrets.R2_SIGNING_KEY }}
awsAccessKeyId: ${{ secrets.R2_ACCESS_KEY_ID }}
awsSecretAccessKey: ${{ secrets.R2_SECRET_ACESS_KEY }}
- name: Build nix packages
run: ./ci.sh x86_64-darwin build_${{ matrix.setup.ocaml-version }}
continue-on-error: ${{ matrix.setup.continue-on-error }}
cross-compilers:
# needs: [native-linux]
strategy:
fail-fast: false
matrix:
setup:
- { ocaml-version: 4_14, continue-on-error: false }
- { ocaml-version: 5_0, continue-on-error: false }
- { ocaml-version: 5_1, continue-on-error: false }
target:
- arm64
- musl
name: ${{matrix.target}} packages (OCaml ${{ matrix.setup.ocaml-version }})
runs-on: ubuntu-latest
env:
NIXPKGS_ALLOW_UNFREE: 1
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
experimental-features = nix-command flakes
system-features = nixos-test benchmark big-parallel kvm
extra-substituters = https://anmonteiro.nix-cache.workers.dev
extra-trusted-public-keys = ocaml.nix-cache.com-1:/xI2h2+56rwFfKyyFVbkJSeGqSIYMC/Je+7XXqGKDIY=
- uses: nix-ocaml/nix-s3-action@fork
with:
endpoint: "s3://overlays?endpoint=https://7a53c28e9b7a91239f9ed42da04276bc.r2.cloudflarestorage.com"
signingKey: ${{ secrets.R2_SIGNING_KEY }}
awsAccessKeyId: ${{ secrets.R2_ACCESS_KEY_ID }}
awsSecretAccessKey: ${{ secrets.R2_SECRET_ACESS_KEY }}
- name: Build nix packages
run : ./ci.sh x86_64-linux ${{matrix.target}}_${{matrix.setup.ocaml-version}}
continue-on-error: ${{ matrix.setup.continue-on-error }}