mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
update travis
- Build and test - Github release - Build and push image - Build and push image (tagged)*
This commit is contained in:
parent
7d08fa95ba
commit
545fff8f8e
1 changed files with 103 additions and 74 deletions
177
.travis.yml
177
.travis.yml
|
|
@ -1,81 +1,110 @@
|
||||||
|
sudo: required
|
||||||
language: go
|
language: go
|
||||||
go_import_path: github.com/XinFinOrg/XDPoSChain
|
go_import_path: github.com/XinFinOrg/XDPoSChain
|
||||||
sudo: false
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- GOPROXY=https://proxy.golang.org
|
||||||
|
- GO111MODULE=on
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
# This builder only tests code linters on latest version of Go
|
|
||||||
- stage: lint
|
- stage: Lint
|
||||||
os: linux
|
sudo: false
|
||||||
dist: bionic
|
go: '1.12.x'
|
||||||
go: 1.14.x
|
git:
|
||||||
env:
|
submodules: false
|
||||||
- lint
|
|
||||||
git:
|
|
||||||
submodules: false # avoid cloning ethereum/tests
|
|
||||||
script:
|
script:
|
||||||
- go run build/ci.go lint
|
- go run build/ci.go lint
|
||||||
|
|
||||||
- stage: Tests
|
- stage: Build and test
|
||||||
os: linux
|
go: '1.12.x'
|
||||||
dist: bionic
|
script:
|
||||||
go: 1.14.x
|
- sudo modprobe fuse
|
||||||
env:
|
- sudo chmod 666 /dev/fuse
|
||||||
- GO111MODULE=auto
|
- sudo chown root:$USER /etc/fuse.conf
|
||||||
name: A-B tests
|
- go run build/ci.go install
|
||||||
script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/ethereum\/go-ethereum\/[a-b].*")
|
- while sleep 540; do echo "[ still running ]"; done &
|
||||||
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/ethereum\/go-ethereum\/c[a-m].*")
|
- go run build/ci.go test -coverage
|
||||||
os: linux
|
- kill %1
|
||||||
dist: bionic
|
after_success:
|
||||||
go: 1.14.x
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
env:
|
|
||||||
- GO111MODULE=auto
|
- go: '1.11.x'
|
||||||
name: C-[a-m] tests
|
script:
|
||||||
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/ethereum\/go-ethereum\/c[n-o].*")
|
- sudo modprobe fuse
|
||||||
os: linux
|
- sudo chmod 666 /dev/fuse
|
||||||
dist: bionic
|
- sudo chown root:$USER /etc/fuse.conf
|
||||||
go: 1.14.x
|
- go run build/ci.go install
|
||||||
env:
|
- while sleep 540; do echo "[ still running ]"; done &
|
||||||
- GO111MODULE=auto
|
- go run build/ci.go test -coverage
|
||||||
name: C-[n-o] tests
|
- kill %1
|
||||||
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/ethereum\/go-ethereum\/c[p-z].*")
|
|
||||||
os: linux
|
- stage: Github release
|
||||||
dist: bionic
|
go: '1.12.x'
|
||||||
go: 1.14.x
|
script:
|
||||||
env:
|
- GOARCH=amd64 GOOS=linux go build -o ./build/bin/XDC-linux-amd64 -v ./cmd/XDC
|
||||||
- GO111MODULE=auto
|
deploy:
|
||||||
name: C-[p-z] tests
|
provider: releases
|
||||||
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/ethereum\/go-ethereum\/[d-i].*")
|
api_key: $GITHUB_TOKEN
|
||||||
os: linux
|
overwrite: true
|
||||||
dist: bionic
|
file_glob: true
|
||||||
go: 1.14.x
|
file: build/bin/XDC-*
|
||||||
env:
|
skip_cleanup: true
|
||||||
- GO111MODULE=auto
|
on:
|
||||||
name: D-I tests
|
tags: true
|
||||||
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/ethereum\/go-ethereum\/[j-n].*")
|
|
||||||
os: linux
|
- stage: Build and push image
|
||||||
dist: bionic
|
services:
|
||||||
go: 1.14.x
|
- docker
|
||||||
env:
|
install: skip
|
||||||
- GO111MODULE=auto
|
before_script:
|
||||||
name: J-N tests
|
- docker build -t XinFinOrg/XDPoSChain .
|
||||||
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/ethereum\/go-ethereum\/[o-r].*")
|
- docker build -t XinFinOrg/node -f Dockerfile.node .
|
||||||
os: linux
|
script:
|
||||||
dist: bionic
|
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
||||||
go: 1.14.x
|
- docker tag XinFinOrg/XDPoSChain XinFinOrg/XDPoSChain:latest
|
||||||
env:
|
- docker push XinFinOrg/XDPoSChain:latest
|
||||||
- GO111MODULE=auto
|
- docker tag XinFinOrg/XDPoSChain XinFinOrg/XDPoSChain:$TRAVIS_BUILD_ID
|
||||||
name: O-R tests
|
- docker push XinFinOrg/XDPoSChain:$TRAVIS_BUILD_ID
|
||||||
- script: travis_retry go run build/ci.go test -v -coverage $(go list ./... | grep "github.com\/ethereum\/go-ethereum\/s.*")
|
- docker tag XinFinOrg/node XinFinOrg/node:latest
|
||||||
os: linux
|
- docker push XinFinOrg/node:latest
|
||||||
dist: bionic
|
- docker tag XinFinOrg/node XinFinOrg/node:$TRAVIS_BUILD_ID
|
||||||
go: 1.14.x
|
- docker push XinFinOrg/node:$TRAVIS_BUILD_ID
|
||||||
env:
|
|
||||||
- GO111MODULE=auto
|
- stage: Build and push image (tagged)
|
||||||
name: S tests
|
services:
|
||||||
- script: travis_retry go run build/ci.go test -coverage $(go list ./... | grep "github.com\/ethereum\/go-ethereum\/[t-z].*")
|
- docker
|
||||||
os: linux
|
install: skip
|
||||||
dist: bionic
|
before_script:
|
||||||
go: 1.14.x
|
- docker build -t XinFinOrg/XDPoSChain .
|
||||||
env:
|
- docker build -t XinFinOrg/XDPoSChain -f Dockerfile.node .
|
||||||
- GO111MODULE=auto
|
script:
|
||||||
name: T-Z tests
|
- 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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue