-
Notifications
You must be signed in to change notification settings - Fork 86
86 lines (75 loc) · 2.57 KB
/
binaries.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Build distributable executables for hydra
name: Binaries
on:
push:
branches:
- "**"
tags:
- "*.*.*"
jobs:
# Produces static ELF binary for using MuslC which includes all needed
# libraries statically linked into it.
build-executables-linux:
name: "Build x86_64-linux static executables"
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
with:
# Also ensure we have all history with all tags
fetch-depth: 0
- name: ❄ Prepare nix
uses: cachix/install-nix-action@v26
with:
extra_nix_config: |
accept-flake-config = true
log-lines = 1000
- name: ❄ Cachix cache of nix derivations
uses: cachix/cachix-action@v14
with:
name: cardano-scaling
authToken: '${{ secrets.CACHIX_CARDANO_SCALING_AUTH_TOKEN }}'
- name: ❄ Build static executables
run: |
nix build .#release-static
# XXX: Why unzip https://github.com/actions/upload-artifact/issues/39
echo "VERSION=$(git describe --always ${{ github.ref }})" >> "$GITHUB_ENV"
unzip result/*.zip -d out
- name: 💾 Upload executables
uses: actions/upload-artifact@v4
with:
name: hydra-x86_64-linux-${{ env.VERSION }} # automatically zips
path: out/*
# Produces a dynamic Mach-O binary which is still dynamically linked against
# system dependencies, but all third-party libraries are statically linked.
build-executables-macos:
name: "Build aarch64-darwin dynamic executables"
runs-on: [self-hosted, macOS, ARM64]
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
with:
# Also ensure we have all history with all tags
fetch-depth: 0
- name: ❄ Prepare nix
uses: cachix/install-nix-action@v26
with:
extra_nix_config: |
accept-flake-config = true
log-lines = 1000
- name: ❄ Cachix cache of nix derivations
uses: cachix/cachix-action@v14
with:
name: cardano-scaling
authToken: '${{ secrets.CACHIX_CARDANO_SCALING_AUTH_TOKEN }}'
- name: ❄ Build executables
run: |
nix build .#release
# XXX: Why unzip https://github.com/actions/upload-artifact/issues/39
echo "VERSION=$(git describe --always ${{ github.ref }})" >> "$GITHUB_ENV"
unzip result/*.zip -d out
- name: 💾 Upload executables
uses: actions/upload-artifact@v4
with:
name: hydra-aarch64-darwin-${{ env.VERSION }} # automatically zips
path: out/*