hello world
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
parent
8b60dda9ca
commit
aa2fecead8
|
@ -0,0 +1,37 @@
|
||||||
|
name: Build and test Go
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- { OS: "linux", ARCH: "386", ARM: "" }
|
||||||
|
- { OS: "linux", ARCH: "amd64", ARM: "" }
|
||||||
|
- { OS: "linux", ARCH: "arm", ARM: "5" }
|
||||||
|
- { OS: "linux", ARCH: "arm", ARM: "6" }
|
||||||
|
- { OS: "linux", ARCH: "arm", ARM: "7" }
|
||||||
|
- { OS: "linux", ARCH: "arm64", ARM: "" }
|
||||||
|
- { OS: "darwin", ARCH: "amd64", ARM: "" }
|
||||||
|
steps:
|
||||||
|
- name: Set up Go 1.18
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: 1.18
|
||||||
|
|
||||||
|
- name: Check out source code
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Go test
|
||||||
|
run: make check
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: make build OS=${{ matrix.OS }} ARCH=${{ matrix.ARCH }} ARM=${{ matrix.ARM }}
|
|
@ -0,0 +1,34 @@
|
||||||
|
name: Release the package for all the architecture.
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- { OS: "linux", ARCH: "386" }
|
||||||
|
- { OS: "linux", ARCH: "amd64" }
|
||||||
|
- { OS: "linux", ARCH: "arm" }
|
||||||
|
- { OS: "linux", ARCH: "arm64" }
|
||||||
|
- { OS: "darwin", ARCH: "amd64" }
|
||||||
|
steps:
|
||||||
|
- name: Set up Go 1.18
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: 1.18
|
||||||
|
|
||||||
|
- name: Check out source code
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: make build OS=${{ matrix.OS }} ARCH=${{ matrix.ARCH }}
|
||||||
|
|
||||||
|
- name: Upload Archive
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
path: lnprototest*
|
|
@ -19,3 +19,5 @@
|
||||||
|
|
||||||
# Go workspace file
|
# Go workspace file
|
||||||
go.work
|
go.work
|
||||||
|
|
||||||
|
lnprototestd
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
CC=go
|
||||||
|
FMT=gofmt
|
||||||
|
NAME=lnprototestd
|
||||||
|
BASE_DIR=/script
|
||||||
|
OS=linux
|
||||||
|
ARCH=386
|
||||||
|
ARM=
|
||||||
|
|
||||||
|
default: fmt lint
|
||||||
|
$(CC) build -o $(NAME) cmd/main.go
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
$(CC) fmt ./...
|
||||||
|
|
||||||
|
lint:
|
||||||
|
golangci-lint run
|
||||||
|
|
||||||
|
check:
|
||||||
|
$(CC) test -v ./...
|
||||||
|
|
||||||
|
check-dev:
|
||||||
|
richgo test ./... -v
|
||||||
|
|
||||||
|
build:
|
||||||
|
env GOOS=$(OS) GOARCH=$(ARCH) GOARM=$(ARM) $(CC) build -o $(NAME)-$(OS)-$(ARCH) cmd/main.go
|
||||||
|
|
||||||
|
coffee:
|
||||||
|
$(CC) build -o $(NAME) -ldflags "-s -w" cmd/main.go
|
||||||
|
|
||||||
|
dep:
|
||||||
|
$(CC) get -u all
|
|
@ -0,0 +1,6 @@
|
||||||
|
// / Lightning Network protocol integration tests
|
||||||
|
// /
|
||||||
|
// / Author: Vincenzo Palazzo <vincenzopalazzo@member.fsf.org>
|
||||||
|
package main
|
||||||
|
|
||||||
|
func main() {}
|
|
@ -0,0 +1,163 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710146030,
|
||||||
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705309234,
|
||||||
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"goflake": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1680659771,
|
||||||
|
"narHash": "sha256-5Gli0PdnZh2rUQTDapyz0pDG+yzRq5AAPoMpZkdMaGQ=",
|
||||||
|
"owner": "sagikazarmark",
|
||||||
|
"repo": "go-flake",
|
||||||
|
"rev": "1a32d77792361575b617f7e52f107273ef4ba723",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "sagikazarmark",
|
||||||
|
"repo": "go-flake",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1666539104,
|
||||||
|
"narHash": "sha256-jeuC+d375wHHxMOFLgu7etseCQVJuPNKoEc9X9CsErg=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "0e6df35f39651504249a05191f9a78d251707e22",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710712015,
|
||||||
|
"narHash": "sha256-2T+pn4qVH55hJobyUz3N78jqarNOYfTyYVMbzmJn+3g=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "5bd006778f756658054b376f1da46c9bee41410d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1706487304,
|
||||||
|
"narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "90f456026d284c22b3e3497be980b2e47d0b28ac",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"goflake": "goflake",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"rust-overlay": "rust-overlay"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rust-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
|
"nixpkgs": "nixpkgs_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710641527,
|
||||||
|
"narHash": "sha256-R9JZEevtSyg7++LEryYJRrfyEe45azJxmu2k9VezEW0=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "50db54295d3922a3b7a40d580b84d75150b36c34",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
{
|
||||||
|
description = "A rewriating of lnprototest library for black box testing of the lightning network protocol";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
goflake.url = "github:sagikazarmark/go-flake";
|
||||||
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils, goflake, rust-overlay, ... }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [ rust-overlay.overlay ];
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
packages = {
|
||||||
|
default = pkgs.gnumake;
|
||||||
|
};
|
||||||
|
formatter = pkgs.nixpkgs-fmt;
|
||||||
|
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
# build dependencies
|
||||||
|
libcap
|
||||||
|
gcc
|
||||||
|
pkg-config
|
||||||
|
git
|
||||||
|
|
||||||
|
gnumake
|
||||||
|
golangci-lint
|
||||||
|
|
||||||
|
go
|
||||||
|
|
||||||
|
# integration test dependencies
|
||||||
|
clightning
|
||||||
|
bitcoind
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
export CGO_ENABLED=0
|
||||||
|
export HOST_CC=gcc
|
||||||
|
export PWD=$(pwd)
|
||||||
|
|
||||||
|
make dep
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
Loading…
Reference in New Issue