From 5a1ad063db56df791c9bd8a56be587f59c07f311 Mon Sep 17 00:00:00 2001 From: Ed FitzGerald Date: Wed, 10 Jun 2020 17:49:32 +0100 Subject: [PATCH] Port CI to next branch (#16) --- .github/CODEOWNERS | 13 ------- .github/ISSUE_TEMPLATE/bug-report.md | 38 ------------------- .github/ISSUE_TEMPLATE/feature-request.md | 36 ------------------ .github/PULL_REQUEST_TEMPLATE.md | 34 ----------------- .github/stale.yml | 45 ----------------------- .github/workflows/build_and_test.yml | 37 +++++++++++++++++++ .github/workflows/linkchecker.yml | 11 ------ ci.Dockerfile | 34 +++++++++++++++++ 8 files changed, 71 insertions(+), 177 deletions(-) delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/ISSUE_TEMPLATE/bug-report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature-request.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/stale.yml create mode 100644 .github/workflows/build_and_test.yml delete mode 100644 .github/workflows/linkchecker.yml create mode 100644 ci.Dockerfile diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 1c7206ff75..0000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,13 +0,0 @@ -# CODEOWNERS: https://help.github.com/articles/about-codeowners/ - -# Primary repo maintainers -* @rigelrozanski @alexanderbez @jackzampolin @alessio @fedekunze - -############################################################################### -# Module Specific Ownership -# See CONTRIBUTING.md for further details -############################################################################### - -# The following contributors own all files in the x/nft directory at the root -# of the repository and any of its subdirectories. -x/nft @okwme @fedekunze diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index 369cd676cb..0000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug Report -about: Create a report to help us squash bugs! - ---- - - - - - -## Summary of Bug - - - -## Version - - - -## Steps to Reproduce - - - -____ - -## For Admin Use - -- [ ] Not duplicate issue -- [ ] Appropriate labels applied -- [ ] Appropriate contributors tagged -- [ ] Contributor assigned/self-assigned diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index 324ab9a8ab..0000000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -name: Feature Request -about: Create a proposal to request a feature - ---- - - - -## Summary - - - -## Problem Definition - - - -## Proposal - - - -____ - -#### For Admin Use - -- [ ] Not duplicate issue -- [ ] Appropriate labels applied -- [ ] Appropriate contributors tagged -- [ ] Contributor assigned/self-assigned diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 6dd37f7f28..0000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,34 +0,0 @@ - - -Closes: #XXX - -## Description - - - -______ - -For contributor use: - -- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) -- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. -- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md). -- [ ] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) -- [ ] Updated relevant documentation (`docs/`) or specification (`x//spec/`) -- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). -- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` -- [ ] Re-reviewed `Files changed` in the Github PR explorer - -______ - -For admin use: - -- [ ] Added appropriate labels to PR (ex. `WIP`, `R4R`, `docs`, etc) -- [ ] Reviewers assigned -- [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]" ([coding standards](https://github.com/tendermint/coding/blob/master/README.md#merging-a-pr)) diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 044feb3843..0000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,45 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 10 - -# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 4 - -# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) -onlyLabels: [] - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - pinned - - security - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: true - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: true - -# Label to use when marking as stale -staleLabel: stale - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -# Limit to only `issues` or `pulls` -only: pulls - -# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': -pulls: - daysUntilStale: 30 - markComment: > - This pull request has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml new file mode 100644 index 0000000000..23b6a2d5a7 --- /dev/null +++ b/.github/workflows/build_and_test.yml @@ -0,0 +1,37 @@ +name: Build and test +on: + push: + branches: + - master + - next + - release/* + pull_request: + branches: + - master + - next + - release/* + +jobs: + build-and-test: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - name: Set up ssh keys + uses: webfactory/ssh-agent@v0.2.0 + with: + ssh-private-key: ${{ secrets.FETCH_BOT_SSH_KEY }} + - name: Build Docker container + env: + DOCKER_BUILDKIT: 1 + run: | + docker build \ + --no-cache \ + --progress plain \ + --ssh default \ + --tag fetch_cosmos_sdk:$GITHUB_SHA \ + --file ./ci.Dockerfile \ + ./ + - name: Run make test + run: | + docker run --rm fetch_cosmos_sdk:$GITHUB_SHA \ + make test diff --git a/.github/workflows/linkchecker.yml b/.github/workflows/linkchecker.yml deleted file mode 100644 index c78daa396f..0000000000 --- a/.github/workflows/linkchecker.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Check links -on: [pull_request] -jobs: - link-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Link Checker - uses: peter-evans/link-checker@v1 - with: - args: -v -r * \ No newline at end of file diff --git a/ci.Dockerfile b/ci.Dockerfile new file mode 100644 index 0000000000..15dc0e3e3e --- /dev/null +++ b/ci.Dockerfile @@ -0,0 +1,34 @@ +#syntax = docker/dockerfile:experimental +#export DOCKER_BUILDKIT=1 + +FROM golang:buster + +ENV GOPRIVATE="github.com/fetchai/*" + +WORKDIR /workspace/mcl +RUN --mount=type=ssh \ + apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y \ + curl \ + wget \ + jq \ + file \ + make \ + git \ + libgmp-dev \ + gcc \ + g++ \ + swig \ + libboost-serialization-dev && \ + git clone https://github.com/herumi/mcl && cd mcl && make install && ldconfig && \ + mkdir -m 700 /root/.ssh && \ + touch -m 600 /root/.ssh/known_hosts && \ + git config --global url."git@github.com:".insteadOf https://github.com/ && \ + ssh-keyscan github.com > /root/.ssh/known_hosts + +WORKDIR /workspace/cosmos-sdk +COPY . . +RUN --mount=type=ssh \ + make go-mod-cache && \ + make build