-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1b8f6c7
Showing
63 changed files
with
4,727 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,80 @@ | ||
# This is a basic workflow that is manually triggered | ||
|
||
name: billboard | ||
|
||
# Controls when the action will run. Workflow runs when manually triggered using the UI | ||
# or API. | ||
on: [push, pull_request] | ||
|
||
# This workflow makes x86_64 binaries for mac, windows, and linux. | ||
|
||
|
||
jobs: | ||
mac-windows: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
targetos: [windows, darwin] | ||
name: billboard for ${{ matrix.targetos }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.15 | ||
env: | ||
GOOS: ${{ matrix.targetos }} | ||
|
||
- name: Compile | ||
run: | | ||
cd cmd/billboardd | ||
go build . | ||
cd .. | ||
cd billboardcli | ||
go build . | ||
# - uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: billboardcli ${{ matrix.targetos }} | ||
# path: cmd/billboardcli/billboardcli | ||
# | ||
# - uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: billboardd ${{ matrix.targetos }} | ||
# path: cmd/billboardd/billboardd | ||
|
||
linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: [arm64, riscv64, amd64] | ||
|
||
name: billboard for ${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.15 | ||
env: | ||
GOARCH: ${{ matrix.arch }} | ||
|
||
- name: Compile | ||
run: | | ||
cd cmd/billboardd | ||
go build . | ||
cd .. | ||
cd billboardcli | ||
go build . | ||
# - uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: billboardcli ${{ matrix.arch }} | ||
# path: cmd/billboardcli/billboardcli | ||
# | ||
# - uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: billboardd ${{ matrix.arch }} | ||
# path: cmd/billboardd/billboardd |
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,16 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
.idea |
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,34 @@ | ||
# Simple usage with a mounted data directory: | ||
# > docker build -t billboard . | ||
# | ||
# > docker run -it -p 26657:26657 -v ~/.billboardd:/root/.billboardd billboard billboardd init testing | ||
# > docker run -it -p 26657:26657 -v ~/.billboardd:/root/.billboardd billboard billboardd start | ||
FROM golang:alpine AS build-env | ||
|
||
# Install minimum necessary dependencies, | ||
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 | ||
RUN apk add --no-cache $PACKAGES | ||
|
||
# Set working directory for the build | ||
WORKDIR /go/src/github.com/iczc/billboard | ||
|
||
# Add source files | ||
COPY . . | ||
|
||
# build billboard | ||
RUN make install | ||
|
||
|
||
# Final image | ||
FROM alpine:edge | ||
|
||
# Install ca-certificates | ||
RUN apk add --update ca-certificates | ||
WORKDIR /root | ||
|
||
# Copy over binaries from the build-env | ||
COPY --from=build-env /go/bin/billboardd /usr/bin/billboardd | ||
COPY --from=build-env /go/bin/billboardcli /usr/bin/billboardcli | ||
|
||
# Run billboardd by default, omit entrypoint to ease using container with billboardcli | ||
CMD ["billboardd"] |
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,26 @@ | ||
PACKAGES=$(shell go list ./... | grep -v '/simulation') | ||
|
||
VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//') | ||
COMMIT := $(shell git log -1 --format='%H') | ||
|
||
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=billboard \ | ||
-X github.com/cosmos/cosmos-sdk/version.ServerName=billboardd \ | ||
-X github.com/cosmos/cosmos-sdk/version.ClientName=billboardcli \ | ||
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ | ||
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) | ||
|
||
BUILD_FLAGS := -ldflags '$(ldflags)' | ||
|
||
all: install | ||
|
||
install: go.sum | ||
@echo "--> Installing billboardd & billboardcli" | ||
@go install -mod=readonly $(BUILD_FLAGS) ./cmd/billboardd | ||
@go install -mod=readonly $(BUILD_FLAGS) ./cmd/billboardcli | ||
|
||
go.sum: go.mod | ||
@echo "--> Ensure dependencies have not been modified" | ||
GO111MODULE=on go mod verify | ||
|
||
test: | ||
@go test -mod=readonly $(PACKAGES) |
Oops, something went wrong.