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

Commit

Permalink
Merge branch 'master' of github.com:paritytech/polkadot into seun-sc-…
Browse files Browse the repository at this point in the history
…cli-subkey
  • Loading branch information
seunlanlege committed Aug 20, 2020
2 parents 5ee5bd8 + 013c4a8 commit ae5b7a3
Show file tree
Hide file tree
Showing 305 changed files with 36,018 additions and 15,253 deletions.
14 changes: 12 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
root = true
[*]

[*.rs]
indent_style=tab
indent_size=tab
tab_width=4
max_line_length=120
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
max_line_length=120
insert_final_newline=true

[*.yml]
indent_style=space
indent_size=2
tab_width=8
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
insert_final_newline=true

[*.sh]
indent_style=space
indent_size=2
tab_width=8
end_of_line=lf
17 changes: 17 additions & 0 deletions .github/workflows/burnin-label-notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Notify devops when burn-in label applied
on:
pull_request:
types: [labeled]

jobs:
notify-devops:
runs-on: ubuntu-latest
steps:
- name: Notify devops
if: github.event.label.name == 'A1-needsburnin'
uses: s3krit/matrix-message-action@v0.0.2
with:
room_id: ${{ secrets.POLKADOT_DEVOPS_MATRIX_ROOM_ID }}
access_token: ${{ secrets.POLKADOT_DEVOPS_MATRIX_ACCESS_TOKEN }}
message: "@room Burn-in request received for the following PR: ${{ github.event.pull_request.html_url }}"
server: "matrix.parity.io"
143 changes: 143 additions & 0 deletions .github/workflows/publish-draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: Publish draft release

on:
push:
tags:
- v**.**.**

jobs:
build-runtimes:
runs-on: ubuntu-latest
strategy:
matrix:
runtime: ['polkadot', 'kusama']
container:
image: chevdor/srtool:nightly-2020-07-20
volumes:
- ${{ github.workspace }}:/build
env:
PACKAGE: ${{ matrix.runtime }}-runtime
RUSTC_VERSION: nightly-2020-07-20
steps:
- uses: actions/checkout@v2
- name: Cache target dir
uses: actions/cache@v2
with:
path: '${{ github.workspace }}/target'
key: srtool-target-${{ matrix.runtime }}-${{ github.sha }}
restore-keys: |
srtool-target-${{ matrix.runtime }}-
srtool-target-
- name: Build ${{ matrix.runtime }} runtime
id: build-runtime
shell: bash
run: |
cd /build
pwd
ls -la
build --json | tee srtool_output.json
cat srtool_output.json
while IFS= read -r line; do
echo "::set-output name=$line::$(jq -r ".$line" < srtool_output.json)"
done <<< "$(jq -r 'keys[]' < srtool_output.json)"
- name: Upload ${{ matrix.runtime }} srtool json
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.runtime }}-srtool-json
path: srtool_output.json
- name: Upload ${{ matrix.runtime }} runtime
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.runtime }}-runtime
path: "${{ steps.build-runtime.outputs.wasm }}"

get-rust-versions:
runs-on: ubuntu-latest
container:
image: paritytech/ci-linux:production
outputs:
rustc-stable: ${{ steps.get-rust-versions.outputs.stable }}
rustc-nightly: ${{ steps.get-rust-versions.outputs.nightly }}
steps:
- id: get-rust-versions
run: |
echo "::set-output name=stable::$(rustc +stable --version)"
echo "::set-output name=nightly::$(rustc +nightly --version)"
publish-draft-release:
runs-on: ubuntu-latest
needs: ['get-rust-versions', 'build-runtimes']
outputs:
release_url: ${{ steps.create-release.outputs.html_url }}
asset_upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
path: polkadot
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7
- name: Download srtool json output
uses: actions/download-artifact@v2
- name: Generate release text
env:
RUSTC_STABLE: ${{ needs.get-rust-versions.outputs.rustc-stable }}
RUSTC_NIGHTLY: ${{ needs.get-rust-versions.outputs.rustc-nightly }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gem install changelogerator git toml
ruby $GITHUB_WORKSPACE/polkadot/scripts/github/generate_release_text.rb | tee release_text.md
- name: Create draft release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Polkadot ${{ github.ref }}
body_path: ./release_text.md
draft: true

post_to_matrix:
runs-on: ubuntu-latest
needs: publish-draft-release
steps:
- name: Internal polkadot channel
uses: s3krit/matrix-message-action@v0.0.2
with:
room_id: ${{ secrets.INTERNAL_POLKADOT_MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: "**New version of polkadot tagged**: ${{ github.ref }}<br/>Gav: Draft release created: ${{ needs.publish-draft-release.outputs.release_url }}"
server: "matrix.parity.io"

publish-runtimes:
runs-on: ubuntu-latest
needs: ['publish-draft-release']
strategy:
matrix:
runtime: ['polkadot', 'kusama']
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: ${{ matrix.runtime }}-runtime
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7
- name: Get runtime version
id: get-runtime-ver
run: |
runtime_ver="$(ruby -e 'require "./scripts/github/lib.rb"; puts get_runtime("${{ matrix.runtime }}")')"
echo "::set-output name=runtime_ver::$runtime_ver"
- name: Upload ${{ matrix.runtime }} wasm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.publish-draft-release.outputs.asset_upload_url }}
asset_path: ./${{ matrix.runtime }}_runtime.compact.wasm
asset_name: ${{ matrix.runtime }}_runtime-v${{ steps.get-runtime-ver.outputs.runtime_ver }}.compact.wasm
asset_content_type: application/wasm
31 changes: 10 additions & 21 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,12 @@ check-line-width:
interruptible: true
allow_failure: true

publish-draft-release:
test-deterministic-wasm:
stage: test
only:
- tags
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/ # i.e. v1.0.1, v2.1.0rc1
<<: *docker-env
except:
script:
- apt-get -y update; apt-get -y install jq
- ./scripts/gitlab/publish_draft_release.sh
interruptible: true
allow_failure: true
- ./scripts/gitlab/test_deterministic_wasm.sh

test-linux-stable: &test
stage: test
Expand All @@ -117,7 +113,7 @@ test-linux-stable: &test
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
TARGET: native
script:
- time cargo test --all --release --verbose --locked --features runtime-benchmarks
- ./scripts/gitlab/test_linux_stable.sh
- sccache -s

check-web-wasm: &test
Expand All @@ -128,14 +124,7 @@ check-web-wasm: &test
script:
# WASM support is in progress. As more and more crates support WASM, we
# should add entries here. See https://github.com/paritytech/polkadot/issues/625
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path runtime/polkadot/Cargo.toml
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path runtime/kusama/Cargo.toml
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path erasure-coding/Cargo.toml
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path parachain/Cargo.toml
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path primitives/Cargo.toml
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path rpc/Cargo.toml
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path statement-table/Cargo.toml
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path cli/Cargo.toml --no-default-features --features browser
- ./scripts/gitlab/check_web_wasm.sh
- sccache -s

check-runtime-benchmarks: &test
Expand All @@ -145,7 +134,7 @@ check-runtime-benchmarks: &test
<<: *compiler_info
script:
# Check that the node will compile with `runtime-benchmarks` feature flag.
- time cargo check --features runtime-benchmarks
- ./scripts/gitlab/check_runtime_benchmarks.sh
- sccache -s

build-wasm-release:
Expand Down Expand Up @@ -195,7 +184,7 @@ generate-impl-guide:
name: michaelfbryan/mdbook-docker-image:latest
entrypoint: [""]
script:
- mdbook build roadmap/implementors-guide
- mdbook build roadmap/implementers-guide

.publish-build: &publish-build
stage: publish
Expand Down Expand Up @@ -253,8 +242,8 @@ publish-s3-release:
- echo "uploading objects to https://${BUCKET}/${PREFIX}/${VERSION}"
- aws s3 sync ./artifacts/ s3://${BUCKET}/${PREFIX}/${VERSION}/
- echo "update objects at https://${BUCKET}/${PREFIX}/${EXTRATAG}"
- for file in ./artifacts/*; do
name="$(basename ${file})";
- find ./artifacts -type f | while read file; do
name="${file#./artifacts/}";
aws s3api copy-object
--copy-source ${BUCKET}/${PREFIX}/${VERSION}/${name}
--bucket ${BUCKET} --key ${PREFIX}/${EXTRATAG}/${name};
Expand Down
Loading

0 comments on commit ae5b7a3

Please sign in to comment.