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' into refactor_check_validation_outputs
Browse files Browse the repository at this point in the history
* master:
  Fix incomplete sorting. (#4795)
  Companion for better way to resolve `Phase::Emergency` via governance #10663 (#4757)
  Refactor and fix usage of `get_session_index()` and `get_session_info_by_index()` (#4735)
  `relay chain selection` and `dispute-coordinator` fixes and improvements (#4752)
  Fix tests (#4787)
  log concluded disputes (#4785)
  availability-distribution: look for leaf ancestors within the same session (#4596)
  Companion for Use proper bounded vector type for nominations #10601 (#4709)
  Fix release profile (#4778)
  [ci] remove publish-s3-release (#4779)
  Companion for substrate#10632 (#4689)
  [ci] pipeline chores (#4775)
  New changelog scripts (#4491)
  • Loading branch information
ordian committed Jan 27, 2022
2 parents 765461d + f0041c4 commit 675dde3
Show file tree
Hide file tree
Showing 65 changed files with 2,120 additions and 627 deletions.
75 changes: 63 additions & 12 deletions .github/workflows/publish-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Cache target dir
uses: actions/cache@v2
with:
Expand All @@ -36,21 +37,25 @@ jobs:
restore-keys: |
srtool-target-${{ matrix.runtime }}-
srtool-target-
- name: Build ${{ matrix.runtime }} runtime
id: srtool_build
uses: chevdor/srtool-actions@v0.3.0
with:
# This is the default with chevdor/srtool-actions@v0.3.0 but we make it clear
image: paritytech/srtool
chain: ${{ matrix.runtime }}

- name: Store srtool digest to disk
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.runtime }}_srtool_output.json
- name: Upload ${{ matrix.runtime }} srtool json
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.runtime }}-srtool-json
path: ${{ matrix.runtime }}_srtool_output.json

- name: Upload ${{ matrix.runtime }} runtime
uses: actions/upload-artifact@v2
with:
Expand All @@ -70,20 +75,59 @@ jobs:
with:
fetch-depth: 0
path: polkadot
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.0.0

- name: Download srtool json output
uses: actions/download-artifact@v2
- name: Generate release text

- name: Prepare tooling
run: |
cd polkadot/scripts/changelog
gem install bundler changelogerator:0.9.1
bundle install
changelogerator --help
URL=https://github.com/chevdor/tera-cli/releases/download/v0.2.1/tera-cli_linux_amd64.deb
wget $URL -O tera.deb
sudo dpkg -i tera.deb
tera --version
- name: Generate release notes
env:
RUSTC_STABLE: ${{ needs.get-rust-versions.outputs.rustc-stable }}
RUSTC_NIGHTLY: ${{ needs.get-rust-versions.outputs.rustc-nightly }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NO_CACHE: 1
DEBUG: 1
WESTEND_DIGEST: ${{ github.workspace}}/westend-srtool-json/westend_srtool_output.json
KUSAMA_DIGEST: ${{ github.workspace}}/kusama-srtool-json/kusama_srtool_output.json
POLKADOT_DIGEST: ${{ github.workspace}}/polkadot-srtool-json/polkadot_srtool_output.json
PRE_RELEASE: ${{ github.event.inputs.pre_release }}
HIDE_SRTOOL_ROCOCO: false
run: |
gem install changelogerator:0.0.16 git toml
ruby $GITHUB_WORKSPACE/polkadot/scripts/github/generate_release_text.rb | tee release_text.md
find ${{env.GITHUB_WORKSPACE}} -type f -name "*_srtool_output.json"
ls -al $WESTEND_DIGEST
ls -al $KUSAMA_DIGEST
ls -al $POLKADOT_DIGEST
cd polkadot/scripts/changelog
./bin/changelog
ls -al release-notes.md
ls -al context.json
- name: Archive artifact context.json
uses: actions/upload-artifact@v2
with:
name: release-notes-context
path: |
polkadot/scripts/changelog/context.json
**/*_srtool_output.json
- name: Create draft release
id: create-release
uses: actions/create-release@v1
Expand All @@ -92,12 +136,14 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: Polkadot ${{ github.ref }}
body_path: ./release_text.md
body_path: ./polkadot/scripts/changelog/release-notes.md
draft: true

publish-runtimes:
runs-on: ubuntu-latest
needs: ["publish-draft-release"]
env:
RUNTIME_DIR: runtime
strategy:
matrix:
runtime: ["polkadot", "kusama", "westend"]
Expand All @@ -107,16 +153,21 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.0.0
- name: Get runtime version
id: get-runtime-ver
run: |
ls
ls "${{ matrix.runtime }}-runtime"
runtime_ver="$(ruby -e 'require "./scripts/github/lib.rb"; puts get_runtime("${{ matrix.runtime }}")')"
echo "require './scripts/github/lib.rb'" > script.rb
echo "puts get_runtime(runtime: \"${{ matrix.runtime }}\", runtime_dir: \"$RUNTIME_DIR\")" >> script.rb
echo "Current folder: $PWD"
ls "$RUNTIME_DIR/${{ matrix.runtime }}"
runtime_ver=$(ruby script.rb)
echo "Found version: >$runtime_ver<"
echo "::set-output name=runtime_ver::$runtime_ver"
- name: Upload compressed ${{ matrix.runtime }} wasm
uses: actions/upload-release-asset@v1
env:
Expand Down
65 changes: 1 addition & 64 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,6 @@ default:
#### Vault secrets
.vault-secrets: &vault-secrets
secrets:
AWS_ACCESS_KEY_ID:
vault: cicd/gitlab/$CI_PROJECT_PATH/AWS_ACCESS_KEY_ID@kv
file: false
AWS_SECRET_ACCESS_KEY:
vault: cicd/gitlab/$CI_PROJECT_PATH/AWS_SECRET_ACCESS_KEY@kv
file: false
DOCKER_HUB_USER:
vault: cicd/gitlab/parity/DOCKER_HUB_USER@kv
file: false
DOCKER_HUB_PASS:
vault: cicd/gitlab/parity/DOCKER_HUB_PASS@kv
file: false
GITHUB_PR_TOKEN:
vault: cicd/gitlab/parity/GITHUB_PR_TOKEN@kv
file: false
Expand Down Expand Up @@ -149,9 +137,7 @@ default:
REL_MAN_ROOM_ID:
vault: cicd/gitlab/$CI_PROJECT_PATH/REL_MAN_ROOM_ID@kv
file: false
SSH_PRIVATE_KEY:
vault: cicd/gitlab/$CI_PROJECT_PATH/SSH_PRIVATE_KEY@kv
file: false


#### stage: test

Expand All @@ -160,7 +146,6 @@ check-runtime:
image: paritytech/tools:latest
<<: *kubernetes-env
<<: *test-refs
<<: *vault-secrets
variables:
GITLAB_API: "https://gitlab.parity.io/api/v4"
GITHUB_API_PROJECT: "parity%2Finfrastructure%2Fgithub-api"
Expand All @@ -182,7 +167,6 @@ test-deterministic-wasm:
<<: *test-refs
<<: *docker-env
<<: *compiler-info
<<: *vault-secrets
script:
- ./scripts/gitlab/test_deterministic_wasm.sh

Expand All @@ -191,7 +175,6 @@ test-build-linux-stable:
<<: *docker-env
<<: *compiler-info
<<: *collect-artifacts
<<: *vault-secrets
variables:
RUST_TOOLCHAIN: stable
# Enable debug assertions since we are running optimized builds for testing
Expand Down Expand Up @@ -228,7 +211,6 @@ check-runtime-benchmarks:
<<: *test-refs
<<: *docker-env
<<: *compiler-info
<<: *vault-secrets
script:
# Check that everything compiles with `runtime-benchmarks` feature flag.
- cargo check --features runtime-benchmarks --all
Expand All @@ -239,7 +221,6 @@ check-try-runtime:
<<: *test-refs
<<: *docker-env
<<: *compiler-info
<<: *vault-secrets
script:
# Check that everything compiles with `try-runtime` feature flag.
- cargo check --features try-runtime --all
Expand All @@ -250,7 +231,6 @@ check-no-default-features:
<<: *test-refs
<<: *docker-env
<<: *compiler-info
<<: *vault-secrets
script:
# Check that polkadot-cli will compile no default features.
- pushd node/service && cargo check --no-default-features && popd
Expand Down Expand Up @@ -311,7 +291,6 @@ build-malus:
stage: build
<<: *docker-env
<<: *test-pr-refs
<<: *vault-secrets
script:
- git clone
--depth=1
Expand All @@ -335,7 +314,6 @@ check-transaction-versions:
stage: build
<<: *test-refs
<<: *docker-env
<<: *vault-secrets
image: node:15
needs:
- job: test-build-linux-stable
Expand Down Expand Up @@ -520,47 +498,6 @@ update_westend_weights:

#### stage: publish

publish-s3-release: &publish-s3
stage: publish
needs:
- job: test-build-linux-stable
artifacts: true
<<: *kubernetes-env
<<: *vault-secrets
image: paritytech/awscli:latest
variables:
GIT_STRATEGY: none
PREFIX: "builds/polkadot/${ARCH}-${DOCKER_OS}"
rules:
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
# publishing binaries nightly
- if: $CI_PIPELINE_SOURCE == "schedule"
before_script:
- *check-versions
script:
- echo "uploading objects to https://releases.parity.io/${PREFIX}/${VERSION}"
- aws s3 sync --acl public-read ./artifacts/ s3://${AWS_BUCKET}/${PREFIX}/${VERSION}/
- echo "update objects at https://releases.parity.io/${PREFIX}/${EXTRATAG}"
- find ./artifacts -type f | while read file; do
name="${file#./artifacts/}";
aws s3api copy-object
--copy-source ${AWS_BUCKET}/${PREFIX}/${VERSION}/${name}
--bucket ${AWS_BUCKET} --key ${PREFIX}/${EXTRATAG}/${name};
done
- |
cat <<-EOM
|
| polkadot binary paths:
|
| - https://releases.parity.io/${PREFIX}/${EXTRATAG}/polkadot
| - https://releases.parity.io/${PREFIX}/${VERSION}/polkadot
|
EOM
after_script:
- aws s3 ls s3://${AWS_BUCKET}/${PREFIX}/${EXTRATAG}/
--recursive --human-readable --summarize

publish-rustdoc:
stage: publish
<<: *kubernetes-env
Expand Down
Loading

0 comments on commit 675dde3

Please sign in to comment.