mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-26 08:26:20 +00:00
151 lines
4.8 KiB
YAML
151 lines
4.8 KiB
YAML
sudo: required
|
|
language: go
|
|
go_import_path: github.com/XinFinOrg/XDPoSChain
|
|
|
|
env:
|
|
global:
|
|
- GOPROXY=https://proxy.golang.org
|
|
- GO111MODULE=on
|
|
|
|
|
|
jobs:
|
|
include:
|
|
# TODO: temporary turn off linting to help fix all the tests. We will turn it back on once the branch is stable
|
|
# - stage: Lint
|
|
# sudo: false
|
|
# go: '1.14.x'
|
|
# git:
|
|
# submodules: false
|
|
# script:
|
|
# - go run build/ci.go lint
|
|
|
|
- stage: Tests
|
|
os: linux
|
|
dist: bionic
|
|
go: 1.14.x
|
|
env:
|
|
- GO111MODULE=auto
|
|
name: A-B tests
|
|
script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/XinFinOrg\/XDPoSChain\/[a-b].*")
|
|
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/XinFinOrg\/XDPoSChain\/c[a-m].*")
|
|
os: linux
|
|
dist: bionic
|
|
go: 1.14.x
|
|
env:
|
|
- GO111MODULE=auto
|
|
name: C-[a-m] tests
|
|
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/XinFinOrg\/XDPoSChain\/c[n-o].*")
|
|
os: linux
|
|
dist: bionic
|
|
go: 1.14.x
|
|
env:
|
|
- GO111MODULE=auto
|
|
name: C-[n-o] tests
|
|
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/XinFinOrg\/XDPoSChain\/c[p-z].*")
|
|
os: linux
|
|
dist: bionic
|
|
go: 1.14.x
|
|
env:
|
|
- GO111MODULE=auto
|
|
name: C-[p-z] tests
|
|
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/XinFinOrg\/XDPoSChain\/[d-i].*")
|
|
os: linux
|
|
dist: bionic
|
|
go: 1.14.x
|
|
env:
|
|
- GO111MODULE=auto
|
|
name: D-I tests
|
|
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/XinFinOrg\/XDPoSChain\/[j-n].*")
|
|
os: linux
|
|
dist: bionic
|
|
go: 1.14.x
|
|
env:
|
|
- GO111MODULE=auto
|
|
name: J-N tests
|
|
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/XinFinOrg\/XDPoSChain\/[o-r].*")
|
|
os: linux
|
|
dist: bionic
|
|
go: 1.14.x
|
|
env:
|
|
- GO111MODULE=auto
|
|
name: O-R tests
|
|
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/XinFinOrg\/XDPoSChain\/s.*")
|
|
os: linux
|
|
dist: bionic
|
|
go: 1.14.x
|
|
env:
|
|
- GO111MODULE=auto
|
|
name: S tests
|
|
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/XinFinOrg\/XDPoSChain\/[t-z].*")
|
|
os: linux
|
|
dist: bionic
|
|
go: 1.14.x
|
|
env:
|
|
- GO111MODULE=auto
|
|
name: T-Z tests
|
|
- stage: Github release
|
|
go: '1.14.x'
|
|
script:
|
|
- GOARCH=amd64 GOOS=linux go build -o ./build/bin/XDC-linux-amd64 ./cmd/XDC
|
|
deploy:
|
|
provider: releases
|
|
api_key: $GITHUB_TOKEN
|
|
overwrite: true
|
|
file_glob: true
|
|
file: build/bin/XDC-*
|
|
skip_cleanup: true
|
|
on:
|
|
tags: true
|
|
|
|
- stage: Build and push image
|
|
services:
|
|
- docker
|
|
install: skip
|
|
before_script:
|
|
- docker build -t XinFinOrg/XDPoSChain .
|
|
- docker build -t XinFinOrg/node -f Dockerfile.node .
|
|
script:
|
|
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
|
- docker tag XinFinOrg/XDPoSChain XinFinOrg/XDPoSChain:latest
|
|
- docker push XinFinOrg/XDPoSChain:latest
|
|
- docker tag XinFinOrg/XDPoSChain XinFinOrg/XDPoSChain:$TRAVIS_BUILD_ID
|
|
- docker push XinFinOrg/XDPoSChain:$TRAVIS_BUILD_ID
|
|
- docker tag XinFinOrg/node XinFinOrg/node:latest
|
|
- docker push XinFinOrg/node:latest
|
|
- docker tag XinFinOrg/node XinFinOrg/node:$TRAVIS_BUILD_ID
|
|
- docker push XinFinOrg/node:$TRAVIS_BUILD_ID
|
|
|
|
- stage: Build and push image (tagged)
|
|
services:
|
|
- docker
|
|
install: skip
|
|
before_script:
|
|
- docker build -t XinFinOrg/XDPoSChain .
|
|
- docker build -t XinFinOrg/XDPoSChain -f Dockerfile.node .
|
|
script:
|
|
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
|
- docker tag XinFinOrg/XDPoSChain XinFinOrg/XDPoSChain:latest
|
|
- docker push XinFinOrg/XDPoSChain:latest
|
|
- docker tag XinFinOrg/XDPoSChain XinFinOrg/XDPoSChain:$TRAVIS_TAG
|
|
- docker push XinFinOrg/XDPoSChain:$TRAVIS_TAG
|
|
- docker tag XinFinOrg/XDPoSChain XinFinOrg/node:latest
|
|
- docker push XinFinOrg/node:latest
|
|
- docker tag XinFinOrg/node XinFinOrg/node:$TRAVIS_TAG
|
|
- docker push XinFinOrg/node:$TRAVIS_TAG
|
|
|
|
stages:
|
|
# - name: Lint
|
|
- name: Build and test
|
|
- name: Github release
|
|
if: type != pull_request AND branch =~ ^v AND tag IS present AND repo = XinFinOrg/XDPoSChain
|
|
- name: Build and push image
|
|
if: type != pull_request AND branch = master AND tag IS blank AND repo = XinFinOrg/XDPoSChain
|
|
- name: Build and push image (tagged)
|
|
if: type != pull_request AND branch =~ ^v AND tag IS present AND repo = XinFinOrg/XDPoSChain
|
|
|
|
notifications:
|
|
slack:
|
|
rooms:
|
|
secure:
|
|
on_success: change
|
|
on_failure: always
|