This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
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 #445 from BitCannaGlobal/v4
Update v4-devnet-1 with v4 changes
- Loading branch information
Showing
7 changed files
with
218 additions
and
41,349 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,44 @@ | ||
# This is a basic workflow that is manually triggered | ||
|
||
name: compile bcna | ||
|
||
# Controls when the action will run. Workflow runs when manually triggered using the UI | ||
# or API. | ||
on: | ||
workflow_dispatch: | ||
# This workflow makes x86_64 binaries for mac, windows, and linux. | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: [amd64, arm64] | ||
targetos: [darwin, linux] | ||
include: | ||
- targetos: windows | ||
arch: amd64 | ||
name: bcna ${{ matrix.arch }} for ${{ matrix.targetos }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: "^1.23" | ||
env: | ||
GOOS: ${{ matrix.targetos }} | ||
GOARCH: ${{ matrix.arch }} | ||
|
||
- name: run tests | ||
run: go test ./... | ||
|
||
# we build and install in case we want to run it or capture an artifact as we do in the step below. | ||
- name: Compile bcnad | ||
run: | | ||
go build ./... | ||
go install ./... | ||
# now uploads genesis.json and bin | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: bcnad ${{ matrix.targetos }} ${{ matrix.arch }} | ||
path: build/bcnad |
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,37 @@ | ||
name: "Release" | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- v4 | ||
jobs: | ||
draft-release: | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Copy Binary | ||
run: | | ||
make build-reproducible-all | ||
- name: List files | ||
run: ls -R | ||
|
||
- name: Draft Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
files: | | ||
build/bcnad_linux_arm64 | ||
build/bcnad_linux_amd64 | ||
build/bcnad_sha256.txt |
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,39 @@ | ||
ARG IMG_TAG=latest | ||
ARG PLATFORM="linux/amd64" | ||
ARG GO_VERSION="1.23.1" | ||
ARG RUNNER_IMAGE="gcr.io/distroless/static" | ||
|
||
FROM --platform=${PLATFORM} golang:${GO_VERSION}-alpine3.20 as builder | ||
WORKDIR /src/app/ | ||
COPY go.mod go.sum* ./ | ||
RUN go mod download | ||
COPY . . | ||
|
||
# From https://github.com/CosmWasm/wasmd/blob/master/Dockerfile | ||
# For more details see https://github.com/CosmWasm/wasmvm#builds-of-libwasmvm | ||
ARG ARCH=x86_64 | ||
# See https://github.com/CosmWasm/wasmvm/releases | ||
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.3/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a | ||
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.3/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a | ||
#ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.3/libwasmvmstatic_darwin.a /lib/libwasmvm_muslc.darwin.a | ||
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep faea4e15390e046d2ca8441c21a88dba56f9a0363f92c5d94015df0ac6da1f2d | ||
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 8dab08434a5fe57a6fbbcb8041794bc3c31846d31f8ff5fb353ee74e0fcd3093 | ||
#RUN sha256sum /lib/libwasmvm_muslc.darwin.a | grep f7a997c6a769e5624dac910dc2f0bec4c386aeb54342dd04ef6d5eba0340a20d | ||
RUN cp /lib/libwasmvm_muslc.${ARCH}.a /lib/libwasmvm_muslc.a | ||
|
||
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 | ||
RUN apk add --no-cache $PACKAGES | ||
RUN set -eux; apk add --no-cache ca-certificates build-base; | ||
|
||
ARG VERSION="" | ||
RUN BUILD_TAGS=muslc LINK_STATICALLY=true LDFLAGS=-buildid=$VERSION make build | ||
|
||
# Add to a distroless container | ||
ARG PLATFORM="linux/amd64" | ||
FROM --platform=${PLATFORM} gcr.io/distroless/cc:$IMG_TAG | ||
ARG IMG_TAG | ||
COPY --from=builder /src/app/build/bcnad /usr/local/bin/bcnad | ||
|
||
EXPOSE 26656 26657 1317 9090 | ||
|
||
ENTRYPOINT ["bcnad"] |
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
Oops, something went wrong.