Skip to content

[temp] Build cardano-node on push to branch #11

[temp] Build cardano-node on push to branch

[temp] Build cardano-node on push to branch #11

Workflow file for this run

# Produce distributable binaries for cardano-node 8.7.2
#
# XXX: Remove again when upstream releases them (again).
name: Cardano-node
on:
workflow_dispatch:
push:
branches:
- "cardano-node-github-workflow"
jobs:
build-executables-linux:
name: "Build x86_64-linux static executables"
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout cardano-node 8.7.2
uses: actions/checkout@v4
with:
repository: IntersectMBO/cardano-node
ref: 8.7.2
- name: ❄ Prepare nix
uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
accept-flake-config = true
log-lines = 1000
- name: ❄ Build cardano-node static executables
run: |
mkdir -p out/
nix build .#hydraJobs.x86_64-linux.musl.cardano-node
cp result/bin/* out/
nix build .#hydraJobs.x86_64-linux.musl.cardano-cli
cp result/bin/* out/
- name: 💾 Upload matching cardano-node executables
uses: actions/upload-artifact@v4
with:
name: cardano-node-x86_64-linux # automatically zips
path: out/*
build-executables-macos:
name: "Build aarch64-darwin dynamic executables"
runs-on: [self-hosted, macOS, ARM64]
steps:
- name: 📥 Checkout cardano-node 8.7.2
uses: actions/checkout@v4
with:
# 8.7.2-fork which provides a macos flake output
repository: ch1bo/cardano-node
ref: 170817f5ba3f7838ffd9bd181bc30504906a6506
- name: ❄ Prepare nix
uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
accept-flake-config = true
log-lines = 1000
- name: ❄ Build executables
run: |
mkdir -p out
nix build .#hydraJobs.aarch64-darwin.native.cardano-node-macos
tar -C out -xzvf result/cardano-node-*-macos.tar.gz cardano-node cardano-cli '*.dylib'
# NOTE: github strips permissions so setting chmod +x here does not help
- name: 💾 Upload executables
uses: actions/upload-artifact@v4
with:
name: cardano-node-aarch64-darwin # automatically zips
path: out/*