Skip to content

Commit 4a6f910

Browse files
authored
Merge pull request #72 from IntersectMBO/coot/aarch64-linux-build
Run hydra on aarch64-linux
2 parents 7fed922 + 0fa553f commit 4a6f910

6 files changed

Lines changed: 49 additions & 43 deletions

File tree

.github/workflows/release-upload.yaml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@ env:
2222

2323
jobs:
2424
wait-for-hydra:
25-
name: "Wait for hydra check-runs"
25+
name: "Wait for hydra check-runs (${{ matrix.system }})"
26+
strategy:
27+
matrix:
28+
system: [x86_64-linux, aarch64-linux]
2629
runs-on: ubuntu-latest
2730
steps:
28-
- name: Waiting for ci/hydra-build:x86_64-linux.required to complete
31+
- name: Waiting for ci/hydra-build:${{ matrix.system }}.required to complete
2932
run: |
3033
while [[ true ]]; do
31-
check_name='ci/hydra-build:x86_64-linux.required'
34+
check_name='ci/hydra-build:${{ matrix.system }}.required'
3235
conclusion=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs?check_name=$check_name" --paginate --jq '.check_runs[].conclusion')
3336
case "$conclusion" in
3437
success)
@@ -47,8 +50,12 @@ jobs:
4750
needs: [wait-for-hydra]
4851
strategy:
4952
matrix:
50-
arch: [linux]
51-
name: "Download Asset from the Cache"
53+
include:
54+
- system: x86_64-linux
55+
asset_name: dmq-node-linux
56+
- system: aarch64-linux
57+
asset_name: dmq-node-linux-aarch64
58+
name: "Download Asset from the Cache (${{ matrix.system }})"
5259
runs-on: ubuntu-latest
5360
steps:
5461
- name: Install Nix with good defaults
@@ -67,26 +74,23 @@ jobs:
6774

6875
- name: Build
6976
run: |
70-
case ${{ matrix.arch }} in
71-
linux)
72-
nix build \
73-
--builders "" \
74-
--max-jobs 0 \
75-
.#packages.x86_64-linux.dmq-node-static
76-
esac
77+
nix build \
78+
--builders "" \
79+
--max-jobs 0 \
80+
.#packages.${{ matrix.system }}.dmq-node-static
7781
7882
- name: Compress binary
79-
run: tar -czf dmq-node-linux.tar.gz result/bin/dmq-node
83+
run: tar -czf ${{ matrix.asset_name }}.tar.gz result/bin/dmq-node
8084

8185
- name: Checksums
8286
run: |
83-
sha256sum dmq-node-linux.tar.gz >> "dmq-node-linux.tar.gz.sha256sum.txt"
87+
sha256sum ${{ matrix.asset_name }}.tar.gz >> "${{ matrix.asset_name }}.tar.gz.sha256sum.txt"
8488
8589
- name: Release
8690
uses: input-output-hk/action-gh-release@v1
8791
with:
8892
draft: true
8993
name: "Release dmq-node-${{ github.ref_name }}"
9094
files: |
91-
dmq-node-linux.tar.gz
92-
dmq-node-linux.tar.gz.sha256sum.txt
95+
${{ matrix.asset_name }}.tar.gz
96+
${{ matrix.asset_name }}.tar.gz.sha256sum.txt

dmq-node/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
<!-- scriv-insert-here -->
44

5+
<a id='changelog-0.7.1.0'></a>
6+
## 0.7.1.0 -- 2026-09-01
7+
8+
### Non-Breaking
9+
10+
- Bump `ouroboros-consensus` to `v4.1`.
11+
12+
- Build natively on `aarch64-linux`, included the build artifact it in a release.
13+
514
<a id='changelog-0.7.0.0'></a>
615
## 0.7.0.0 -- 2026-07-31
716

dmq-node/changelog.d/20260812_kolam_bump_consensus_4_1.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

dmq-node/dmq-node.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 3.4
22
name: dmq-node
3-
version: 0.7.0.0
3+
version: 0.7.1.0
44
synopsis: Decentralised Message Queue Node
55
description:
66
Decentralised Message Queue Node based on Cardano Diffusion

nix/dmq-node.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,15 @@ let
4141
inputMap = { "https://chap.intersectmbo.org/" = inputs.CHaP; };
4242

4343
# TODO: enable cross compilation for windows by adding `p.ucrt64`.
44+
#
45+
# Both of these are libc swaps for the build platform's own arch (not a
46+
# cross-arch build), giving a fully static, natively-built executable:
47+
# `musl64` on x86_64-linux, `aarch64-multiplatform-musl` on aarch64-linux.
4448
crossPlatforms = p:
45-
lib.optionals (pkgs.stdenv.hostPlatform.isLinux && config.compiler-nix-name == defaultCompiler)
46-
[ p.musl64 ];
49+
lib.optionals (pkgs.stdenv.hostPlatform.isLinux && config.compiler-nix-name == defaultCompiler) (
50+
lib.optional pkgs.stdenv.hostPlatform.isx86_64 p.musl64
51+
++ lib.optional pkgs.stdenv.hostPlatform.isAarch64 p.aarch64-multiplatform-musl
52+
);
4753

4854
modules = [
4955
(forAllProjectPackages ({ ... }: {

nix/outputs.nix

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ let
1212

1313
buildSystem = pkgs.stdenv.buildPlatform.system;
1414

15+
# Fully static, natively-built variant for each system we support it on.
16+
# Both are libc swaps for the build platform's own arch, not a cross-arch
17+
# build (see `crossPlatforms` in nix/dmq-node.nix).
18+
staticCrossTarget = {
19+
"x86_64-linux" = "musl64";
20+
"aarch64-linux" = "aarch64-multiplatform-musl";
21+
};
22+
1523
packages = rec {
1624
# TODO: `nix build .\#dmq-node` will have the git revision set in the binary,
1725
# `nib build .\#hydraJobs.x86_64-linux.packages.dmq-node:exe:dmq-node` won't
@@ -21,11 +29,11 @@ let
2129
# (inputs.self.rev or inputs.self.dirtyShortRev)
2230
pkgs.dmq-node.hsPkgs.dmq-node.components.exes.dmq-node;
2331
default = dmq-node;
24-
} // lib.optionalAttrs (buildSystem == "x86_64-linux") {
32+
} // lib.optionalAttrs (builtins.hasAttr buildSystem staticCrossTarget) {
2533
dmq-node-static =
2634
# pkgs.setGitRev
2735
# (inputs.self.rev or inputs.self.dirtyShortRev)
28-
pkgs.dmq-node.projectCross.musl64.hsPkgs.dmq-node.components.exes.dmq-node;
36+
pkgs.dmq-node.projectCross.${staticCrossTarget.${buildSystem}}.hsPkgs.dmq-node.components.exes.dmq-node;
2937
docker-dmq = pkgs.dockerTools.buildImage {
3038
name = "docker-dmq-node";
3139
tag = "latest";
@@ -70,7 +78,7 @@ let
7078
{
7179
"x86_64-linux" = defaultHydraJobs;
7280
"x86_64-darwin" = { };
73-
"aarch64-linux" = { };
81+
"aarch64-linux" = defaultHydraJobs;
7482
"aarch64-darwin" = defaultHydraJobs;
7583
}.${system};
7684
in

0 commit comments

Comments
 (0)