forked from quic-go/quic-go
103 lines
2.9 KiB
YAML
103 lines
2.9 KiB
YAML
version: 2.1
|
|
executors:
|
|
test-go114:
|
|
docker:
|
|
- image: "circleci/golang:1.14"
|
|
environment:
|
|
runrace: true
|
|
test-go113:
|
|
docker:
|
|
- image: "circleci/golang:1.13"
|
|
environment:
|
|
runrace: true
|
|
interop:
|
|
docker:
|
|
- image: circleci/buildpack-deps:stretch
|
|
environment:
|
|
IMAGE_NAME: martenseemann/quic-go-interop
|
|
|
|
jobs:
|
|
"test": &test
|
|
executor: test-go114
|
|
working_directory: /go/src/github.com/lucas-clemente/quic-go
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: "Setup build environment"
|
|
command: |
|
|
go get github.com/onsi/ginkgo/ginkgo
|
|
go get github.com/onsi/gomega
|
|
- run:
|
|
name: "Build infos"
|
|
command: go version
|
|
- run:
|
|
name: "Run benchmark tests"
|
|
command: ginkgo -randomizeAllSpecs -trace benchmark -- -size=10
|
|
- run:
|
|
name: "Run benchmark tests with race detector"
|
|
command: ginkgo -race -randomizeAllSpecs -trace benchmark -- -size=5
|
|
- run:
|
|
name: "Run tools tests"
|
|
command: ginkgo -race -r -v -randomizeAllSpecs -trace integrationtests/tools
|
|
- run:
|
|
name: "Run self integration tests"
|
|
command: ginkgo -v -randomizeAllSpecs -trace integrationtests/self
|
|
- run:
|
|
name: "Run self integration tests with race detector"
|
|
command: ginkgo -race -v -randomizeAllSpecs -trace integrationtests/self
|
|
- run:
|
|
name: "Run self integration tests with qlog"
|
|
command: ginkgo -v -randomizeAllSpecs -trace integrationtests/self -- -qlog
|
|
go114:
|
|
<<: *test
|
|
go113:
|
|
<<: *test
|
|
executor: test-go113
|
|
interop-build:
|
|
executor: interop
|
|
steps:
|
|
- checkout
|
|
- setup_remote_docker:
|
|
docker_layer_caching: true
|
|
- run:
|
|
name: Build docker image
|
|
command: cd interop && docker build . -t $IMAGE_NAME:latest --pull --build-arg CACHEBUST=$(date +%s)
|
|
- run:
|
|
name: Archive Docker image
|
|
command: docker save -o image.tar $IMAGE_NAME
|
|
- persist_to_workspace:
|
|
root: .
|
|
paths:
|
|
- ./image.tar
|
|
interop-publish:
|
|
executor: interop
|
|
steps:
|
|
- attach_workspace:
|
|
at: /tmp/workspace
|
|
- setup_remote_docker
|
|
- run:
|
|
name: Load archived Docker image
|
|
command: docker load -i /tmp/workspace/image.tar
|
|
- run:
|
|
name: Publish quic-go-interop
|
|
command: |
|
|
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
|
|
docker push $IMAGE_NAME:latest
|
|
|
|
workflows:
|
|
workflow:
|
|
jobs:
|
|
- go114
|
|
- go113
|
|
- interop-build:
|
|
filters:
|
|
branches:
|
|
only: interop
|
|
- interop-publish:
|
|
requires:
|
|
- go114
|
|
- interop-build
|
|
filters:
|
|
branches:
|
|
only: interop
|