Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
* master:
  Implement Approval Voting Subsystem (#2112)
  Introduce PerPeerSet utility that allows to segrate based on PeerSet (#2420)
  [CI] Move check_labels to github actions (#2415)
  runtime: set equivocation report longevity (#2404)
  Companion for #7936: Migrate pallet-balances to pallet attribute macro (#2331)
  Corrected Physical (#2414)
  validator_discovery: cache by (Hash, ParaId) (#2402)
  Enable wasmtime caching for PVF (companion for #8057) (#2387)
  Use construct_runtime in tests, remove default PalletInfo impl (#2409)
  validator_discovery: pass PeerSet to the request (#2372)
  guide: more robust approval counting procedure (#2378)
  Publish rococo on every push to `rococo-v1` branch (#2388)
  Bump trie-db from 0.22.2 to 0.22.3 (#2344)
  Send view to new peers (#2392)
  • Loading branch information
ordian committed Feb 11, 2021
2 parents 4fdf276 + 35ea1c4 commit f1f6178
Show file tree
Hide file tree
Showing 53 changed files with 1,241 additions and 853 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/check-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check labels

on:
pull_request:
types: [labeled, opened, synchronize, unlabeled]

jobs:
check-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check labels
run: bash ${{ github.workspace }}/scripts/github/check_labels.sh
env:
GITHUB_PR: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109 changes: 39 additions & 70 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# setting DEPLOY_TAG will only deploy the tagged image
#
# please do not add new jobs without "rules:" and "*-env". There are &rules-test for everything,
# &rules-pr-only and &rules-build presets. And "kubernetes-env" with "docker-env" to set a runner
# &rules-pr-only preset. And "kubernetes-env" with "docker-env" to set a runner
# which executes the job.

stages:
Expand Down Expand Up @@ -62,33 +62,17 @@ default:
- cargo --version
- sccache -s

.rules-build: &rules-build
rules:
# Due to https://gitlab.com/gitlab-org/gitlab/-/issues/31264 there's no way to setup a manual
# build job so that publish-docker-rococo would "needs" build-linux-rococo job. This leads
# either to blocked or to forever running pipeline. It was decided to run these jobs from UI
# and on schedule.
#
# $PIPELINE should be passed in https://gitlab.parity.io/parity/polkadot/-/pipeline_schedules
# or other trigger to avoid running these jobs and run just those allowing this variable.
- if: $PIPELINE == "rococo"
when: never
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1

.rules-test: &rules-test
# these jobs run always*
rules:
- if: $PIPELINE == "rococo"
- if: $CI_COMMIT_REF_NAME == "rococo-v1"
when: never
- when: always

.pr-only: &rules-pr-only
# these jobs run only on PRs
rules:
- if: $PIPELINE == "rococo"
- if: $CI_COMMIT_REF_NAME == "rococo-v1"
when: never
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
Expand Down Expand Up @@ -202,28 +186,19 @@ build-linux-release:
<<: *collect-artifacts
<<: *docker-env
<<: *compiler-info
variables:
EXTRA_FLAGS: ""
rules:
# .rules-test with manual on PRs
- if: $PIPELINE == "rococo"
when: never
# extra features when building on `rococo-v1` branch and manual build on PRs
- if: $CI_COMMIT_REF_NAME == "rococo-v1"
variables:
EXTRA_FLAGS: "--features=real-overseer"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
when: manual
allow_failure: true
- when: always
script:
- time cargo build --release --verbose
- sccache -s
- *pack-artifacts

build-linux-rococo:
stage: build
<<: *collect-artifacts
<<: *docker-env
<<: *compiler-info
rules:
- if: $PIPELINE == "rococo"
when: manual
allow_failure: true
- when: always
script:
- time cargo build --release --verbose --features=real-overseer
- time cargo build --release --verbose ${EXTRA_FLAGS}
- sccache -s
- *pack-artifacts

Expand Down Expand Up @@ -270,41 +245,30 @@ generate-impl-guide:
# only VERSION information is needed for the deployment
- find ./artifacts/ -depth -not -name VERSION -not -name artifacts -delete

publish-docker-polkadot:
publish-dockerhub:
stage: publish
<<: *build-push-docker-image
variables:
GIT_STRATEGY: none
# DOCKERFILE: scripts/docker/Dockerfile
IMAGE_NAME: docker.io/parity/polkadot
rules:
# Don't run on releases - this is handled by the Github Action here:
# .github/workflows/publish-docker-release.yml
rules:
- if: $PIPELINE == "rococo"
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
when: never
- if: $CI_COMMIT_REF_NAME == "rococo-v1"
variables:
IMAGE_NAME: docker.io/parity/rococo
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_COMMIT_REF_NAME == "master"
needs:
- job: build-linux-release
artifacts: true
variables:
GIT_STRATEGY: none
# DOCKERFILE: scripts/docker/Dockerfile
IMAGE_NAME: docker.io/parity/polkadot

publish-docker-rococo:
stage: publish
<<: *build-push-docker-image
rules:
- if: $PIPELINE == "rococo"
needs:
- job: build-linux-rococo
artifacts: true
variables:
GIT_STRATEGY: none
# DOCKERFILE: scripts/docker/Dockerfile
IMAGE_NAME: docker.io/parity/rococo

publish-s3-release:
stage: publish
<<: *rules-build
needs:
- job: build-linux-release
artifacts: true
Expand All @@ -314,6 +278,14 @@ publish-s3-release:
GIT_STRATEGY: none
BUCKET: "releases.parity.io"
PREFIX: "polkadot/${ARCH}-${DOCKER_OS}"
rules:
- if: $CI_COMMIT_REF_NAME == "rococo-v1"
variables:
PREFIX: "rococo/${ARCH}-${DOCKER_OS}"
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
before_script:
- *check-versions
script:
Expand Down Expand Up @@ -343,19 +315,16 @@ publish-s3-release:

deploy-polkasync-kusama:
stage: deploy
<<: *rules-build
rules:
# former .rules-build
- if: $CI_COMMIT_REF_NAME == "rococo-v1"
when: never
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
variables:
POLKADOT_CI_COMMIT_NAME: "${CI_COMMIT_REF_NAME}"
POLKADOT_CI_COMMIT_REF: "${CI_COMMIT_REF}"
allow_failure: true
trigger: "parity/infrastructure/parity-testnet"

#### stage: .post

check-labels:
stage: .post
image: paritytech/tools:latest
<<: *rules-pr-only
<<: *kubernetes-env
script:
- ./scripts/gitlab/check_labels.sh
Loading

0 comments on commit f1f6178

Please sign in to comment.