-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1233 from input-output-hk/cardano-node-github-wor…
…kflow Create a github action to build cardano-node binaries
- Loading branch information
Showing
4 changed files
with
80 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Produce distributable binaries for cardano-node 8.7.2 | ||
# | ||
# XXX: Remove again when upstream releases them (again). | ||
name: Cardano-node | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
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/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters