-
Notifications
You must be signed in to change notification settings - Fork 8
53 lines (47 loc) · 1.42 KB
/
build.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
name: Build fh artifacts
on:
workflow_call:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
build-artifacts:
runs-on: ${{ matrix.systems.runner }}
permissions:
id-token: "write"
contents: "read"
strategy:
matrix:
systems:
- nix-system: "aarch64-darwin"
runner: "macos-latest-xlarge"
artifact: "fh-ARM64-macOS"
- nix-system: "x86_64-darwin"
runner: "macos-14-large"
artifact: "fh-X64-macOS"
- nix-system: "aarch64-linux"
runner: "namespace-profile-default-arm64"
artifact: "fh-X64-Linux"
- nix-system: "x86_64-linux"
runner: "ubuntu-22.04"
artifact: "fh-ARM64-linux"
steps:
- name: git checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Set up Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-flakehub: true
- name: Build package for ${{ matrix.systems.nix-system }}
run: |
nix build -L ".#packages.${{ matrix.systems.nix-system }}.default"
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
# Artifact name
name: ${{ matrix.systems.artifact }}
path: result/bin/fh
retention-days: 1