From 4c5a55d706a148606070c0b9a74a1ac81ad9fc57 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 29 May 2019 11:57:41 +0100 Subject: [PATCH] Switch to Buildkite --- .buildkite/pipeline.yaml | 30 ++++++++++++++ .travis.yml | 31 --------------- README.md | 2 +- scripts/travis-test.sh | 86 ---------------------------------------- 4 files changed, 31 insertions(+), 118 deletions(-) create mode 100644 .buildkite/pipeline.yaml delete mode 100644 .travis.yml delete mode 100755 scripts/travis-test.sh diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml new file mode 100644 index 000000000..a48eaaf1c --- /dev/null +++ b/.buildkite/pipeline.yaml @@ -0,0 +1,30 @@ +steps: + - command: + - "./build.sh" + label: "\U0001F528 Build - Go 1.12" + env: + GOGC: "400" + DENDRITE_LINT_DISABLE_GC: "1" + plugins: + - docker#v3.0.1: + image: "1.12-alpine:latest" + + - command: + - "./scripts/find-lint.sh" + label: "\U0001F9F9 Lint - Go 1.12" + env: + GOGC: "400" + DENDRITE_LINT_DISABLE_GC: "1" + plugins: + - docker#v3.0.1: + image: "1.12-alpine:latest" + + - command: + - "go test ./..." + label: "\U0001F9EA Unit tests - Go 1.12" + env: + GOGC: "400" + DENDRITE_LINT_DISABLE_GC: "1" + plugins: + - docker#v3.0.1: + image: "1.12-alpine:latest" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8d5c3a137..000000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: go -go: - - 1.11.x - - 1.12.x - -env: -- TEST_SUITE="lint" -- TEST_SUITE="unit-test" -- TEST_SUITE="integ-test" - -sudo: false - -# Use trusty for postgres 9.5 support -dist: trusty - -addons: - postgresql: "9.5" - -services: - - postgresql - -cache: - directories: - - .downloads - -script: - - ./scripts/travis-test.sh - -# we only need the latest git commit -git: - depth: 1 diff --git a/README.md b/README.md index cc981fafa..86148ad15 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Dendrite [![Build Status](https://travis-ci.org/matrix-org/dendrite.svg?branch=master)](https://travis-ci.org/matrix-org/dendrite) [![CircleCI](https://circleci.com/gh/anoadragon453/dendrite.svg?style=svg)](https://circleci.com/gh/anoadragon453/dendrite) [![Dendrite Dev on Matrix](https://img.shields.io/matrix/dendrite-dev:matrix.org.svg?label=%23dendrite-dev%3Amatrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#dendrite-dev:matrix.org) [![Dendrite on Matrix](https://img.shields.io/matrix/dendrite:matrix.org.svg?label=%23dendrite%3Amatrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#dendrite:matrix.org) +# Dendrite [![CircleCI](https://circleci.com/gh/anoadragon453/dendrite.svg?style=svg)](https://circleci.com/gh/anoadragon453/dendrite) [![Dendrite Dev on Matrix](https://img.shields.io/matrix/dendrite-dev:matrix.org.svg?label=%23dendrite-dev%3Amatrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#dendrite-dev:matrix.org) [![Dendrite on Matrix](https://img.shields.io/matrix/dendrite:matrix.org.svg?label=%23dendrite%3Amatrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#dendrite:matrix.org) Dendrite will be a matrix homeserver written in go. diff --git a/scripts/travis-test.sh b/scripts/travis-test.sh deleted file mode 100755 index c2a5f221f..000000000 --- a/scripts/travis-test.sh +++ /dev/null @@ -1,86 +0,0 @@ -#! /bin/bash - -# The entry point for travis tests -# -# TEST_SUITE env var can be set to "lint", "unit-test" or "integ-test", in -# which case only the linting, unit tests or integration tests will be run -# respectively. If not specified or null all tests are run. - -set -eu - -# Tune the GC to use more memory to reduce the number of garbage collections -export GOGC=400 -export DENDRITE_LINT_DISABLE_GC=1 - -export GO111MODULE=on - -# starts a travis fold section. The first argument is the name of the fold -# section (which appears on the RHS) and may contain no spaces. Remaining -# arguments are echoed in yellow on the LHS as the header line of the fold -# section. -travis_sections=() -function travis_start { - name="$1" - shift - echo -en "travis_fold:start:$name\r" - travis_sections+=($name) - - # yellow/bold - echo -en "\e[33;1m" - echo "$@" - # normal - echo -en "\e[0m" -} - -# ends a travis fold section -function travis_end { - name=${travis_sections[-1]} - unset 'travis_sections[-1]' - echo -en "travis_fold:end:$name\r" -} - -function kill_kafka { - echo "killing kafka" - # sometimes kafka doesn't die on a SIGTERM so we SIGKILL it. - killall -9 -v java -} - -if [ "${TEST_SUITE:-lint}" == "lint" ]; then - ./scripts/find-lint.sh -fi - -if [ "${TEST_SUITE:-unit-test}" == "unit-test" ]; then - go test ./... -fi - -if [ "${TEST_SUITE:-integ-test}" == "integ-test" ]; then - travis_start go-build "Building dendrite and integ tests" - go install ./cmd/... - travis_end - - # Check that all the packages can build. - # When `go build` is given multiple packages it won't output anything, and just - # checks that everything builds. - go build ./cmd/... - - # Create necessary certificates and keys to run dendrite - travis_start certs "Building SSL certs" - openssl req -x509 -newkey rsa:512 -keyout server.key -out server.crt -days 365 -nodes -subj /CN=localhost - travis_end - - travis_start kafka "Installing kafka" - ./scripts/install-local-kafka.sh - travis_end - - # make sure we kill off zookeeper/kafka on exit, because it stops the - # travis container being cleaned up (cf - # https://github.com/travis-ci/travis-ci/issues/8082) - trap kill_kafka EXIT - - # Run the integration tests - for i in roomserver syncserver mediaapi; do - travis_start "$i-integration-tests" "Running integration tests for $i" - $i-integration-tests - travis_end - done -fi