From bf9a53fc534ccf88f65db6a26879eae6e9cd3df1 Mon Sep 17 00:00:00 2001 From: Talha Cross <47772477+soc1c@users.noreply.github.com> Date: Tue, 18 Jun 2019 16:53:06 +0200 Subject: [PATCH] ci: only build releases on tags (#72) * ci: run on tags * ci: create minimal non-working yaml * ci: mvp it * ci: restore yaml * ci: split out release job * ci: filter tags * ci: fix regex * ci: filter tags * ci: fix regex --- .circleci/config.yml | 74 +++++++++++++++++++++++++++++++------------- 1 file changed, 53 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d08d427c..79fe377e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,41 @@ version: 2 jobs: build-linux-go-1.12: + working_directory: ~/go-ethereum + docker: + - image: circleci/golang:1.12 + steps: + - checkout + - restore_cache: + keys: + - go-mod-v4-{{ checksum "go.sum" }} + - run: + name: Compile Binaries + command: make build + - save_cache: + key: go-mod-v4-{{ checksum "go.sum" }} + paths: + - "/go/pkg/mod" + tests-linux-go-1.12: + working_directory: ~/go-ethereum + docker: + - image: circleci/golang:1.12 + steps: + - checkout + - restore_cache: + keys: + - go-mod-v4-{{ checksum "go.sum" }} + - run: + name: Initialize Ethereum Testsuite + command: git submodule update --init --recursive + - run: + name: Run All Tests + command: make test + - save_cache: + key: go-mod-v4-{{ checksum "go.sum" }} + paths: + - "/go/pkg/mod" + release-linux-go-1.12: working_directory: ~/go-ethereum docker: - image: circleci/golang:1.12 @@ -38,29 +73,26 @@ jobs: key: go-mod-v4-{{ checksum "go.sum" }} paths: - "/go/pkg/mod" - tests-linux-go-1.12: - working_directory: ~/go-ethereum - docker: - - image: circleci/golang:1.12 - steps: - - checkout - - restore_cache: - keys: - - go-mod-v4-{{ checksum "go.sum" }} - - run: - name: Initialize Ethereum Testsuite - command: git submodule update --init --recursive - - run: - name: Run All Tests - command: make test - - save_cache: - key: go-mod-v4-{{ checksum "go.sum" }} - paths: - - "/go/pkg/mod" workflows: version: 2 release: jobs: - - tests-linux-go-1.12 - - build-linux-go-1.12 + - build-linux-go-1.12: + filters: + tags: + only: /.*/ + - tests-linux-go-1.12: + requires: + - build-linux-go-1.12 + filters: + tags: + only: /.*/ + - release-linux-go-1.12: + requires: + - tests-linux-go-1.12 + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/