Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions .github/workflows/release-upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,40 @@

jobs:
wait-for-hydra:
name: "Wait for hydra check-runs"
name: "Wait for hydra check-runs (${{ matrix.system }})"
strategy:
matrix:
system: [x86_64-linux, aarch64-linux]
runs-on: ubuntu-latest
steps:
- name: Waiting for ci/hydra-build:x86_64-linux.required to complete
- name: Waiting for ci/hydra-build:${{ matrix.system }}.required to complete
run: |
while [[ true ]]; do
check_name='ci/hydra-build:x86_64-linux.required'
check_name='ci/hydra-build:${{ matrix.system }}.required'
conclusion=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs?check_name=$check_name" --paginate --jq '.check_runs[].conclusion')
case "$conclusion" in
success)
echo "$check_name succeeded"
exit 0;;
'')
echo "$check_name pending. Waiting 30s..."
sleep 30;;
*)
echo "$check_name terminated unsuccessfully"
exit 1;;
esac
done

pull:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
needs: [wait-for-hydra]
strategy:
matrix:
arch: [linux]
name: "Download Asset from the Cache"
include:
- system: x86_64-linux
asset_name: dmq-node-linux
- system: aarch64-linux
asset_name: dmq-node-linux-aarch64
name: "Download Asset from the Cache (${{ matrix.system }})"
runs-on: ubuntu-latest
steps:
- name: Install Nix with good defaults
Expand All @@ -67,26 +74,23 @@

- name: Build
run: |
case ${{ matrix.arch }} in
linux)
nix build \
--builders "" \
--max-jobs 0 \
.#packages.x86_64-linux.dmq-node-static
esac
nix build \
--builders "" \
--max-jobs 0 \
.#packages.${{ matrix.system }}.dmq-node-static

- name: Compress binary
run: tar -czf dmq-node-linux.tar.gz result/bin/dmq-node
run: tar -czf ${{ matrix.asset_name }}.tar.gz result/bin/dmq-node

- name: Checksums
run: |
sha256sum dmq-node-linux.tar.gz >> "dmq-node-linux.tar.gz.sha256sum.txt"
sha256sum ${{ matrix.asset_name }}.tar.gz >> "${{ matrix.asset_name }}.tar.gz.sha256sum.txt"

- name: Release
uses: input-output-hk/action-gh-release@v1
with:
draft: true
name: "Release dmq-node-${{ github.ref_name }}"
files: |
dmq-node-linux.tar.gz
dmq-node-linux.tar.gz.sha256sum.txt
${{ matrix.asset_name }}.tar.gz
${{ matrix.asset_name }}.tar.gz.sha256sum.txt
9 changes: 9 additions & 0 deletions dmq-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

<!-- scriv-insert-here -->

<a id='changelog-0.7.1.0'></a>
## 0.7.1.0 -- 2026-09-01

### Non-Breaking

- Bump `ouroboros-consensus` to `v4.1`.

- Build natively on `aarch64-linux`, included the build artifact it in a release.

<a id='changelog-0.7.0.0'></a>
## 0.7.0.0 -- 2026-07-31

Expand Down
21 changes: 0 additions & 21 deletions dmq-node/changelog.d/20260812_kolam_bump_consensus_4_1.md

This file was deleted.

2 changes: 1 addition & 1 deletion dmq-node/dmq-node.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.4
name: dmq-node
version: 0.7.0.0
version: 0.7.1.0
synopsis: Decentralised Message Queue Node
description:
Decentralised Message Queue Node based on Cardano Diffusion
Expand Down
10 changes: 8 additions & 2 deletions nix/dmq-node.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@ let
inputMap = { "https://chap.intersectmbo.org/" = inputs.CHaP; };

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

modules = [
(forAllProjectPackages ({ ... }: {
Expand Down
14 changes: 11 additions & 3 deletions nix/outputs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ let

buildSystem = pkgs.stdenv.buildPlatform.system;

# Fully static, natively-built variant for each system we support it on.
# Both are libc swaps for the build platform's own arch, not a cross-arch
# build (see `crossPlatforms` in nix/dmq-node.nix).
staticCrossTarget = {
"x86_64-linux" = "musl64";
"aarch64-linux" = "aarch64-multiplatform-musl";
};

packages = rec {
# TODO: `nix build .\#dmq-node` will have the git revision set in the binary,
# `nib build .\#hydraJobs.x86_64-linux.packages.dmq-node:exe:dmq-node` won't
Expand All @@ -21,11 +29,11 @@ let
# (inputs.self.rev or inputs.self.dirtyShortRev)
pkgs.dmq-node.hsPkgs.dmq-node.components.exes.dmq-node;
default = dmq-node;
} // lib.optionalAttrs (buildSystem == "x86_64-linux") {
} // lib.optionalAttrs (builtins.hasAttr buildSystem staticCrossTarget) {
dmq-node-static =
# pkgs.setGitRev
# (inputs.self.rev or inputs.self.dirtyShortRev)
pkgs.dmq-node.projectCross.musl64.hsPkgs.dmq-node.components.exes.dmq-node;
pkgs.dmq-node.projectCross.${staticCrossTarget.${buildSystem}}.hsPkgs.dmq-node.components.exes.dmq-node;
docker-dmq = pkgs.dockerTools.buildImage {
name = "docker-dmq-node";
tag = "latest";
Expand Down Expand Up @@ -70,7 +78,7 @@ let
{
"x86_64-linux" = defaultHydraJobs;
"x86_64-darwin" = { };
"aarch64-linux" = { };
"aarch64-linux" = defaultHydraJobs;
"aarch64-darwin" = defaultHydraJobs;
}.${system};
in
Expand Down
Loading