From da4d23a91a1e629ba0206a5ad9d070651a9690ac Mon Sep 17 00:00:00 2001 From: jonghwan Date: Mon, 15 Mar 2021 14:23:31 +0800 Subject: [PATCH] build all --- .github/workflows/lint.yml | 29 ------------------ .github/workflows/nix.yml | 63 -------------------------------------- .goreleaser.yml | 30 +++++++++--------- 3 files changed, 16 insertions(+), 106 deletions(-) delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/nix.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index eb30fd759..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Lint -on: - pull_request: - push: - branches: - - master - - release/** -jobs: - golangci: - name: golangci-lint - runs-on: ubuntu-latest - timeout-minutes: 6 - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - uses: technote-space/get-diff-action@v3 - with: - SUFFIX_FILTER: | - .go - .mod - .sum - - uses: golangci/golangci-lint-action@master - with: - # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.29 - args: --timeout 10m - github-token: ${{ secrets.github_token }} - if: "env.GIT_DIFF != ''" diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml deleted file mode 100644 index 92a89faf7..000000000 --- a/.github/workflows/nix.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: nix flow -on: - pull_request: - push: - branches: - - master - - release/** - tags: - - '*' - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - uses: cachix/install-nix-action@v12 - - uses: cachix/cachix-action@v8 - with: - name: crypto-com - skipPush: true - - name: lint - run: make lint-ci - - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - uses: cachix/install-nix-action@v12 - - uses: cachix/cachix-action@v8 - with: - name: crypto-com - signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - skipPush: ${{github.event_name == 'pull_request'}} - - name: Run integration tests - run: make nix-integration-test - - name: Build chain utils - run: nix-build -A chain-utils-testnet - - name: Upload coverage report - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.*.txt - flags: integration_tests - - name: Publish docker image - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - run: | - nix-build -A pystarportImage docker.nix - IMAGE=$(docker load < result) - IMAGE=${IMAGE#Loaded image: } - if [[ "$GITHUB_REF" = "refs/tags/"* ]]; then - TAG=${GITHUB_REF#refs/tags/} - else - TAG="latest" - fi - TARGET="docker.pkg.github.com/${{ github.repository }}/chain-main-pystarport:$TAG" - docker tag $IMAGE $TARGET - docker login -u "$GITHUB_ACTOR" -p "${{ github.token }}" docker.pkg.github.com - docker push $TARGET - echo "pushed: $TARGET" diff --git a/.goreleaser.yml b/.goreleaser.yml index 221dad3c3..603b32b2b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,47 +3,47 @@ before: - go mod download builds: - - id: "chain-maind-darwin-arm64" + - id: "chain-maind-darwin" main: ./cmd/chain-maind binary: bin/chain-maind env: - CGO_ENABLED=1 - - CC=oa64-clang - - CXX=oa64-clang++ + - CC=o64-clang + - CXX=o64-clang++ goos: - darwin goarch: - - arm64 + - amd64 flags: - -tags=cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu ldflags: - -s -w -X github.com/cosmos/cosmos-sdk/version.Name=crypto-org-chain -X github.com/cosmos/cosmos-sdk/version.ServerName=chain-maind -X github.com/cosmos/cosmos-sdk/version.ClientName=chain-maincli -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}} - - id: "chain-maind-darwin" + - id: "chain-maind-linux" main: ./cmd/chain-maind binary: bin/chain-maind env: - CGO_ENABLED=1 - - CC=o64-clang - - CXX=o64-clang++ + - CC=gcc + - CXX=g++ goos: - - darwin + - linux goarch: - amd64 flags: - - -tags=cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu + - -tags=cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu ldflags: - -s -w -X github.com/cosmos/cosmos-sdk/version.Name=crypto-org-chain -X github.com/cosmos/cosmos-sdk/version.ServerName=chain-maind -X github.com/cosmos/cosmos-sdk/version.ClientName=chain-maincli -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}} - - id: "chain-maind-linux" + - id: "chain-maind-linux-arm64" main: ./cmd/chain-maind binary: bin/chain-maind env: - CGO_ENABLED=1 - - CC=gcc - - CXX=g++ + - CC=aarch64-linux-gnu-gcc + - CXX=aarch64-linux-gnu-g++ goos: - linux goarch: - - amd64 + - arm64 flags: - -tags=cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu ldflags: @@ -79,6 +79,8 @@ archives: - chain-maind-darwin - chain-maind-windows - chain-maind-linux + - chain-maind-linux-arm64 + checksum: name_template: 'checksums.txt' changelog: @@ -98,4 +100,4 @@ snapshot: # owner: "crypto-org-chain" # name: "homebrew-chain-maind" # install: | -# bin.install "chain-maind" \ No newline at end of file +# bin.install "chain-maind"