From 45d4e9804c3f479540d029892c12a281fb4e6b8c Mon Sep 17 00:00:00 2001 From: soc1c Date: Tue, 18 Jun 2019 08:34:55 +0200 Subject: [PATCH 1/9] ci: run on tags --- .circleci/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23be8e223..ba87baef1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,4 +60,12 @@ workflows: release: jobs: - tests-linux-go-1.12 + filters: + branches: + only: /.*/ - build-linux-go-1.12 + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ From 812359c52ed9480ed88df5afddca4c16be2fb5ef Mon Sep 17 00:00:00 2001 From: soc1c Date: Tue, 18 Jun 2019 11:03:13 +0200 Subject: [PATCH 2/9] ci: create minimal non-working yaml --- .circleci/config.yml | 75 +++++++++++--------------------------------- 1 file changed, 18 insertions(+), 57 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ba87baef1..ea680680c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,71 +1,32 @@ version: 2 jobs: - build-linux-go-1.12: - working_directory: ~/go-ethereum - docker: - - image: circleci/golang:1.12 + build: steps: - - checkout - - restore_cache: - keys: - - go-mod-v4-{{ checksum "go.sum" }} - run: name: Compile Binaries - command: make build - - run: - name: Release Artifacts - command: | - pushd ./bin/ - sha256sum ./abigen > ./abigen.sha256 - sha256sum ./bootnode > ./bootnode.sha256 - sha256sum ./disasm > ./disasm.sha256 - sha256sum ./ethtest > ./ethtest.sha256 - sha256sum ./evm > ./evm.sha256 - sha256sum ./geth > ./geth.sha256 - sha256sum ./rlpdump > ./rlpdump.sha256 - popd - mkdir ./artifacts/ - VERSION=$(bin/geth version | grep -i version | head -n1 | awk '{print $2}') - cp -rv ./bin ./geth-classic-${VERSION}-linux - tar -zcvf geth-classic-${VERSION}-linux.tar.gz geth-classic-${VERSION}-linux - cp -v ./geth-classic-${VERSION}-linux.tar.gz ./artifacts/ - pushd ./artifacts - sha256sum ./geth-classic-${VERSION}-linux.tar.gz > ./geth-classic-${VERSION}-linux.sha256 - popd - - store_artifacts: - path: ~/go-ethereum/artifacts - - 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 + command: echo "Compile Binaries" + tests: steps: - - checkout - - restore_cache: - keys: - - go-mod-v4-{{ checksum "go.sum" }} - run: name: Run All Tests - command: make test - - save_cache: - key: go-mod-v4-{{ checksum "go.sum" }} - paths: - - "/go/pkg/mod" + command: echo "Run All Tests" + build: + steps: + - run: + name: Release Artifacts + command: echo "Release Artifacts" workflows: version: 2 - release: + minimal: jobs: - - tests-linux-go-1.12 - filters: - branches: - only: /.*/ - - build-linux-go-1.12 + - build + - tests + requires: + - build + - release + requires: + - tests filters: tags: - only: /^v.*/ - branches: - ignore: /.*/ + only: /^v.*$/ From a67bc6b95787a01ed17184c31caf11514ccccbe5 Mon Sep 17 00:00:00 2001 From: soc1c Date: Tue, 18 Jun 2019 11:12:58 +0200 Subject: [PATCH 3/9] ci: mvp it --- .circleci/config.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ea680680c..65c37e1c9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,15 +1,4 @@ -version: 2 jobs: - build: - steps: - - run: - name: Compile Binaries - command: echo "Compile Binaries" - tests: - steps: - - run: - name: Run All Tests - command: echo "Run All Tests" build: steps: - run: @@ -17,16 +6,9 @@ jobs: command: echo "Release Artifacts" workflows: - version: 2 minimal: jobs: - - build - - tests - requires: - - build - release - requires: - - tests filters: tags: only: /^v.*$/ From 76a507a44915c19a79216fd802520f30ae30eaae Mon Sep 17 00:00:00 2001 From: soc1c Date: Tue, 18 Jun 2019 11:35:37 +0200 Subject: [PATCH 4/9] ci: restore yaml --- .circleci/config.yml | 67 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 65c37e1c9..d3d179750 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,14 +1,71 @@ +version: 2 jobs: - build: + 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 - run: name: Release Artifacts - command: echo "Release Artifacts" + command: | + pushd ./bin/ + sha256sum ./abigen > ./abigen.sha256 + sha256sum ./bootnode > ./bootnode.sha256 + sha256sum ./disasm > ./disasm.sha256 + sha256sum ./ethtest > ./ethtest.sha256 + sha256sum ./evm > ./evm.sha256 + sha256sum ./geth > ./geth.sha256 + sha256sum ./rlpdump > ./rlpdump.sha256 + popd + mkdir ./artifacts/ + VERSION=$(bin/geth version | grep -i version | head -n1 | awk '{print $2}') + cp -rv ./bin ./geth-classic-${VERSION}-linux + tar -zcvf geth-classic-${VERSION}-linux.tar.gz geth-classic-${VERSION}-linux + cp -v ./geth-classic-${VERSION}-linux.tar.gz ./artifacts/ + pushd ./artifacts + sha256sum ./geth-classic-${VERSION}-linux.tar.gz > ./geth-classic-${VERSION}-linux.sha256 + popd + - store_artifacts: + path: ~/go-ethereum/artifacts + - 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: Run All Tests + command: make test + - save_cache: + key: go-mod-v4-{{ checksum "go.sum" }} + paths: + - "/go/pkg/mod" workflows: - minimal: + version: 2 + release: jobs: - - release + - tests-linux-go-1.12: + filters: + branches: + only: /.*/ + - build-linux-go-1.12: filters: tags: - only: /^v.*$/ + only: /^v.*/ + branches: + ignore: /.*/ From d627e8935a160fc6b98d28db6cbcd5d51e682e61 Mon Sep 17 00:00:00 2001 From: soc1c Date: Tue, 18 Jun 2019 11:39:38 +0200 Subject: [PATCH 5/9] ci: split out release job --- .circleci/config.yml | 58 +++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d3d179750..175d388bc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,38 @@ 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: 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,32 +70,18 @@ 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: Run All Tests - command: make test - - save_cache: - key: go-mod-v4-{{ checksum "go.sum" }} - paths: - - "/go/pkg/mod" workflows: version: 2 release: jobs: + - build-linux-go-1.12 - tests-linux-go-1.12: - filters: - branches: - only: /.*/ - - build-linux-go-1.12: + requires: + - build-linux-go-1.12 + - release-linux-go-1.12: + requires: + - tests-linux-go-1.12 filters: tags: only: /^v.*/ From 00e19b45cc3f16a53de2195332e2605ea4189f9a Mon Sep 17 00:00:00 2001 From: soc1c Date: Tue, 18 Jun 2019 11:50:19 +0200 Subject: [PATCH 6/9] ci: filter tags --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 175d388bc..9d27ca05e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,5 +85,3 @@ workflows: filters: tags: only: /^v.*/ - branches: - ignore: /.*/ From 5f0ee946cff0bf7723820935510ebeb76745cc70 Mon Sep 17 00:00:00 2001 From: soc1c Date: Tue, 18 Jun 2019 11:51:26 +0200 Subject: [PATCH 7/9] ci: fix regex --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d27ca05e..d2b2898fa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -84,4 +84,4 @@ workflows: - tests-linux-go-1.12 filters: tags: - only: /^v.*/ + only: /^v*/ From 3fa3bcd68804ace96e35458df59fc0e6dacbdb24 Mon Sep 17 00:00:00 2001 From: soc1c Date: Tue, 18 Jun 2019 11:56:05 +0200 Subject: [PATCH 8/9] ci: filter tags --- .circleci/config.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d2b2898fa..4d779447d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -75,13 +75,21 @@ workflows: version: 2 release: jobs: - - 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 + - build-linux-go-1.12 filters: tags: only: /^v*/ + branches: + ignore: /.*/ From dd6b3c414cc96aa01ebeffa0a76927f42ca23ba0 Mon Sep 17 00:00:00 2001 From: soc1c Date: Tue, 18 Jun 2019 11:58:59 +0200 Subject: [PATCH 9/9] ci: fix regex --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4d779447d..37da77aa1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,9 +87,9 @@ workflows: only: /.*/ - release-linux-go-1.12: requires: - - build-linux-go-1.12 + - tests-linux-go-1.12 filters: tags: - only: /^v*/ + only: /^v.*/ branches: ignore: /.*/