-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from cspr-rad/add-casper-node
Add casper node, casper-client-rs, casper-node-launcher
- Loading branch information
Showing
9 changed files
with
4,816 additions
and
0 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,50 @@ | ||
name: check | ||
on: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
check: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
|
||
- name: System Info | ||
run: | | ||
uname -a | ||
nix --version | ||
- name: format | ||
if: matrix.os == 'ubuntu-latest' | ||
run: nix build -L --no-link --show-trace .#checks.x86_64-linux.format | ||
|
||
- name: casper-node | ||
if: matrix.os == 'ubuntu-latest' | ||
run: nix build -L --no-link --show-trace .#packages.x86_64-linux.casper-node | ||
|
||
- name: casper-node | ||
if: matrix.os == 'macos-latest' | ||
run: nix build -L --no-link --show-trace .#packages.x86_64-darwin.casper-node | ||
|
||
- name: casper-node-launcher | ||
if: matrix.os == 'ubuntu-latest' | ||
run: nix build -L --no-link --show-trace .#packages.x86_64-linux.casper-node-launcher | ||
|
||
- name: casper-node-launcher | ||
if: matrix.os == 'macos-latest' | ||
run: nix build -L --no-link --show-trace .#packages.x86_64-darwin.casper-node-launcher | ||
|
||
- name: casper-client-rs | ||
if: matrix.os == 'ubuntu-latest' | ||
run: nix build -L --no-link --show-trace .#packages.x86_64-linux.casper-client-rs | ||
|
||
- name: casper-client-rs | ||
if: matrix.os == 'macos-latest' | ||
run: nix build -L --no-link --show-trace .#packages.x86_64-darwin.casper-client-rs |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,53 @@ | ||
{ | ||
description = "A collection of casper related packages"; | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
}; | ||
outputs = { self, nixpkgs, ... }: | ||
let | ||
eachSystem = systems: f: | ||
let | ||
# Merge together the outputs for all systems. | ||
op = attrs: system: | ||
let | ||
ret = f system; | ||
op = attrs: key: attrs // | ||
{ | ||
${key} = (attrs.${key} or { }) | ||
// { ${system} = ret.${key}; }; | ||
} | ||
; | ||
in | ||
builtins.foldl' op attrs (builtins.attrNames ret); | ||
in | ||
builtins.foldl' op { } systems; | ||
|
||
eachDefaultSystem = eachSystem [ | ||
"aarch64-darwin" | ||
"x86_64-darwin" | ||
"x86_64-linux" | ||
]; | ||
in | ||
eachDefaultSystem (system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
csprpkgs = pkgs.recurseIntoAttrs (pkgs.callPackage ./pkgs { }); | ||
in | ||
{ | ||
packages = { | ||
inherit (csprpkgs) | ||
casper-node | ||
casper-node-launcher | ||
casper-client-rs | ||
; | ||
}; | ||
formatter = pkgs.nixpkgs-fmt; | ||
|
||
checks.format = pkgs.runCommand "format-check" { buildInputs = [ pkgs.nixpkgs-fmt ]; } '' | ||
set -euo pipefail | ||
cd ${self} | ||
nixpkgs-fmt --check . | ||
touch $out | ||
''; | ||
}); | ||
} |
Oops, something went wrong.