-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (48 loc) · 1.46 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
---
name: "Build tests"
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
checks:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Enable binary cache with Cachix
uses: cachix/cachix-action@v15
with:
name: nix-relic
# If you chose API tokens for write access OR if you have a private cache
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run Nix checks
run: nix flake check
build:
needs: [checks]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
pkg: [infrastructure-agent, ocb, nr-otel-collector]
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Enable binary cache with Cachix
uses: cachix/cachix-action@v15
with:
name: nix-relic
# If you chose API tokens for write access OR if you have a private cache
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build ${{ matrix.pkg }} with Nix
run: nix build --print-out-paths ".#${{ matrix.pkg }}"