Skip to content
Open
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
86 changes: 86 additions & 0 deletions .github/workflows/release-upload.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Post Release Upload
# This makes it easy to get download release binaries built using
# a github action for any tagged commit.
#
# This workflow builds and uploads the linux
# binary packages as github assets.
#
# It uses `--builders "" --max-jobs 0` to ensure the assets are
# from the IOG cache.
on:
workflow_dispatch:
release:
types:
- published
push:
tags:
- '**'
env:
# Only to avoid some repetition
FLAKE_REF: github:${{ github.repository }}/${{ github.ref_name }}
GH_TOKEN: ${{ github.token }}

jobs:
wait-for-hydra:
name: "Wait for hydra check-runs"
runs-on: ubuntu-latest
steps:
- name: Waiting for ci/hydra-build:x86_64-linux.required to complete
run: |
while [[ true ]]; do
check_name='ci/hydra-build:x86_64-linux.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:
needs: [wait-for-hydra]
strategy:
matrix:
arch: [linux]
name: "Download Asset from the Cache"
runs-on: ubuntu-latest
steps:
- name: Install Nix with good defaults
uses: input-output-hk/install-nix-action@v20
with:
extra_nix_config: |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
substituters = https://cache.iog.io/ https://cache.nixos.org/
experimental-features = nix-command flakes fetch-closure
allow-import-from-derivation = true
accept-flake-config = true
nix_path: nixpkgs=channel:nixos-unstable

- name: Checkout repository
uses: actions/checkout@v3

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

- name: Compress binary
run: tar -czf dmq-node-linux.tar.gz result/bin/dmq-node

- name: Release
uses: input-output-hk/action-gh-release@v1
with:
draft: true
files: |
dmq-node-linux.tar.gz
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
# Decentralized Message Queue

TODO fix these links

[![mingw64](https://img.shields.io/github/actions/workflow/status/intersectmbo/ouroboros-network/build.yml?event=merge_group&label=mingw64&style=for-the-badge)](https://github.com/intersectmbo/ouroboros-network/actions/workflows/build.yml)
[![Nightly CI](https://img.shields.io/github/actions/workflow/status/intersectmbo/ouroboros-network/nightly.yml?branch=main&label=Nightly&style=for-the-badge)](https://github.com/intersectmbo/ouroboros-network/actions/workflows/nightly.yml)

The DMQ node allows for client peers to communicate efficiently by publishing
and consuming messages which are diffused over a P2P network to other nodes.

This repository provides the `dmq-node` executable to participate in the DMQ network.

TODO diagram
```mermaid
stateDiagram-v2
dn: dmq-node
tr: trace-dispatcher/iohk-monitoring-framework
on: ouroboros-network
oc: ouroboros-consensus
cl: cardano-ledger
dn --> tr
dn --> on
# Instructions

## Building the project

We use cabal to build our project, potentially inside a Nix shell (nix develop or nix-shell). It should suffice with:
```bash
> cabal build dmq-node
```

# Instructions
The executable can be run with:
```bash
> cabal run dmq-node
```

## Testing the project

TODO
To run the test suite, one can use:

``` bash
> cabal test all
```

# Contributing

Expand Down
2 changes: 1 addition & 1 deletion nix/outputs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ let
];
};
config = {
Entrypoint = [ "${packages.dmq-node-static}/bin/dmq-node-static" ];
Entrypoint = [ "${packages.dmq-node-static}/bin/dmq-node" ];
};
};
};
Expand Down
Loading