Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
tkxkd0159 committed Oct 26, 2023
2 parents 9cfe605 + 0cf81b5 commit 1aa1942
Show file tree
Hide file tree
Showing 31 changed files with 26,283 additions and 21,306 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autopr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: pull-request
uses: repo-sync/pull-request@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-generated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: arduino/setup-protoc@v2

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"
- run: if [ ! -x "$(command -v yarn)" ]; then npm install -g yarn; fi
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci-smart-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

env:
TEST_DOCKER_IMAGE: finschianode:smartcontractci
GO_VERSION: "1.20"

jobs:
cleanup-runs:
Expand Down Expand Up @@ -60,9 +61,9 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: ${{ env.GO_VERSION }}
- name: Build
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false LINK_STATICALLY=true make build
- name: Upload build
uses: actions/upload-artifact@v3
with:
Expand All @@ -80,7 +81,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: ${{ env.GO_VERSION }}
- name: Download smart contracts
uses: dsaltares/fetch-gh-release-asset@master
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: "Set tag as version"
run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV # set env.VERSION=v0.0.0
- name: "Checkout code"
uses: actions/checkout@v4
uses: actions/checkout@v3.1.0
- name: "Create compressed repository source"
run: |
git archive --format=tar.gz --prefix="fnsad-${{ env.VERSION }}/" HEAD -o fnsad-${{ env.VERSION }}.tar.gz
Expand All @@ -38,7 +38,7 @@ jobs:
run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV # set env.VERSION=v0.0.0

- name: Check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,31 @@ name: Release
# This workflow helps with creating releases.
# This job will only be triggered when a tag (vX.X.x) is pushed
on:
# can be used to re-release an existing tag
workflow_dispatch:

push:
# Sequence of patterns matched against refs/tags
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+*" # Push events to matching v*, i.e. v1.0, v20.15.10

permissions:
contents: write
packages: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Create release
uses: goreleaser/goreleaser-action@v4
with:
args: release --clean --release-notes ./RELEASE_CHANGELOG.md
fetch-depth: 0
ref: ${{ github.event.inputs.release_tag }}

- run: git fetch --force --tags

- name: Build & publish release
run: |
make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,11 @@ jobs:
if [ ${{ steps.test-blocks.outcome }} == 'failure' ] ; then
exit 1
fi
test-upgrade-name:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test upgrade name
run: |
make test-upgrade-name
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ docs/_build
docs/tutorial
dist
tools-stamp
temp

# Data - ideally these don't exist
baseapp/data/*
Expand Down
146 changes: 107 additions & 39 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,112 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# you may remove this if you don't need go generate
- go generate ./...
project_name: fnsad

env:
- CGO_ENABLED=1

builds:
-
id: "finschia"
main: ./cmd/fnsad
binary: build/fnsad
env:
- CGO_ENABLED=0
flags:
- -mod=readonly
- -tags=netgo ledger
ldflags:
- -X github.com/Finschia/finschia-sdk/version.Name=finschia
- -X github.com/Finschia/finschia-sdk/version.ServerName=finschia
- -X github.com/Finschia/finschia-sdk/version.Version={{ .Version }}
- -X github.com/Finschia/finschia-sdk/version.Commit={{ .FullCommit }}
- -X "github.com/Finschia/finschia-sdk/version.BuildTags=netgo,ledger"
- id: darwin
main: ./cmd/fnsad
binary: fnsad
hooks:
pre:
- wget https://github.com/Finschia/wasmvm/releases/download/{{ .Env.WASMVM_VERSION }}/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a
goos:
- darwin
goarch:
- amd64
- arm64
env:
- CC=o64-clang
- CGO_LDFLAGS=-L/lib
flags:
- -mod=readonly
- -trimpath
ldflags:
- -X github.com/Finschia/finschia-sdk/version.Name=finschia
- -X github.com/Finschia/finschia-sdk/version.AppName=fnsad
- -X github.com/Finschia/finschia-sdk/version.Version={{ .Version }}
- -X github.com/Finschia/finschia-sdk/version.Commit={{ .Commit }}
- -X github.com/Finschia/finschia-sdk/types.DBBackend=goleveldb
- -X github.com/Finschia/finschia-sdk/version.BuildTags=netgo,ledger,static_wasm
- -X github.com/Finschia/ostracon/version.TMCoreSemVer={{ .Env.OST_VERSION }}
- -s -w
- -linkmode=external
tags:
- netgo
- ledger
- static_wasm
overrides:
- goos: darwin
goarch: arm64
env:
- CC=oa64-clang

- id: linux
main: ./cmd/fnsad
binary: fnsad
hooks:
pre:
- wget https://github.com/Finschia/wasmvm/releases/download/{{ .Env.WASMVM_VERSION }}/libwasmvm_muslc.x86_64.a -O /usr/lib/x86_64-linux-gnu/libwasmvm_muslc.a
- wget https://github.com/Finschia/wasmvm/releases/download/{{ .Env.WASMVM_VERSION }}/libwasmvm_muslc.aarch64.a -O /usr/lib/aarch64-linux-gnu/libwasmvm_muslc.a
goos:
- linux
goarch:
- amd64
- arm64
env:
- CC=x86_64-linux-gnu-gcc
flags:
- -mod=readonly
- -trimpath
ldflags:
- -X github.com/Finschia/finschia-sdk/version.Name=finschia
- -X github.com/Finschia/finschia-sdk/version.AppName=fnsad
- -X github.com/Finschia/finschia-sdk/version.Version={{ .Version }}
- -X github.com/Finschia/finschia-sdk/version.Commit={{ .Commit }}
- -X github.com/Finschia/finschia-sdk/types.DBBackend=goleveldb
- -X "github.com/Finschia/finschia-sdk/version.BuildTags=netgo,osusergo,ledger,muslc"
- -X github.com/Finschia/ostracon/version.TMCoreSemVer={{ .Env.OST_VERSION }}
- -w -s
- -linkmode=external
- -extldflags '-Wl,-z,muldefs -static -lm'
tags:
- netgo
- osusergo
- ledger
- muslc
overrides:
- goos: linux
goarch: arm64
env:
- CC=aarch64-linux-gnu-gcc

universal_binaries:
- id: darwin

archives:
-
builds: ['fnsad']
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
files:
- LICENSE
- docs/getting-started/*
# disables archiving; to enable use commented lines below
- id: binaries
format: binary
name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"

# - id: zip
# format: tar.gz
# wrap_in_directory: true
# name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
# files:
# - LICENSE
# - RELEASE_CHANGELOG.md

release:
name_template: "v{{.Version}}"
draft: true

checksum:
name_template: 'checksums.txt'
name_template: "sha256sum-v{{ .Version }}.txt"
algorithm: sha256

snapshot:
name_template: "{{ .Tag }}-next"
name_template: SNAPSHOT-{{ .Commit }}

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
skip: false
17 changes: 3 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,19 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]

### Features
* (feat) [\#243](https://github.com/Finschia/finschia/pull/243) Bump github.com/Finschia/finschia-sdk from v0.47.0 to v0.47.1-rc1
* (ibc) [\#246](https://github.com/Finschia/finschia/pull/246) Update ibc-go to v4

### Improvements
* (improvements) [\#230](https://github.com/Finschia/finschia/pull/230) fix Makefile for format and execute make format #230

* (build) [\#221](https://github.com/Finschia/finschia/pull/221) compile static binary as release assets and docker image
* (swagger) [\#223](https://github.com/Finschia/finschia/pull/223) add integrated swagger for finschia

### Bug Fixes
* (build) [\#236](https://github.com/Finschia/finschia/pull/236) fix compile error when the build_tags is multiple.

### Breaking Changes
* (ostracon) [\#240](https://github.com/Finschia/finschia/pull/240) remove `libsodium` vrf library

### Build, CI
* (ci) [\#185](https://github.com/Finschia/finschia/pull/185) update `tag.yml` github action
* (ci) [\#189](https://github.com/Finschia/finschia/pull/189) add dependabot github action
* (ci) [\#213](https://github.com/Finschia/finschia/pull/213) add mergify ci
* (ci) [\#233](https://github.com/Finschia/finschia/pull/233) add smart contract CI test
* (build) [\#237](https://github.com/Finschia/finschia/pull/237) rearrange Dockerfile and Makefile commands
* (build) [\#241](https://github.com/Finschia/finschia/pull/241) Update golang version to 1.20
* (ci) [\#290](https://github.com/Finschia/finschia/pull/290) remove autopr ci
* (ci) [\#291](https://github.com/Finschia/finschia/pull/291) fix goreleaser ci error and replace release-build

### Docs

<!-- Release links -->
[Unreleased]: https://github.com/Finschia/finschia/compare/v1.0.0...HEAD
[Unreleased]: https://github.com/Finschia/finschia/compare/v2.0.0...HEAD
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
go mod download

# Install libwasmvm.*.a
RUN ARCH=$(uname -m) && WASMVM_VERSION=$(go list -m github.com/Finschia/wasmvm | awk '{print $2}' | grep -o 'v\d\+\.\d\+\.\d\+-\d\+\.\d\+\.\d\+') && \
RUN ARCH=$(uname -m) && WASMVM_VERSION=$(go list -m github.com/Finschia/wasmvm | awk '{print $2}') && \
curl -L -f -o /lib/libwasmvm_muslc.a https://github.com/Finschia/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm_muslc.$ARCH.a && ls -al /lib/libwasmvm_muslc.a && \
# verify checksum
curl -L -f -o /tmp/checksums.txt https://github.com/Finschia/wasmvm/releases/download/$WASMVM_VERSION/checksums.txt && ls -al /tmp/checksums.txt && \
Expand Down
Loading

0 comments on commit 1aa1942

Please sign in to comment.