-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into lexnv/metadata-v16-associated-types
- Loading branch information
Showing
14 changed files
with
206 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,20 +14,8 @@ concurrency: | |
|
||
jobs: | ||
preflight: | ||
if: contains(github.event.label.name, 'GHA-migration') | ||
uses: ./.github/workflows/reusable-preflight.yml | ||
|
||
test-rustdoc: | ||
runs-on: ${{ needs.preflight.outputs.RUNNER }} | ||
if: ${{ needs.preflight.outputs.changes_rust }} | ||
needs: [preflight] | ||
container: | ||
image: ${{ needs.preflight.outputs.IMAGE }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: forklift cargo doc --workspace --all-features --no-deps | ||
env: | ||
SKIP_WASM_BUILD: 1 | ||
test-doc: | ||
runs-on: ${{ needs.preflight.outputs.RUNNER }} | ||
needs: [preflight] | ||
|
@@ -42,7 +30,7 @@ jobs: | |
build-rustdoc: | ||
runs-on: ${{ needs.preflight.outputs.RUNNER }} | ||
if: ${{ needs.preflight.outputs.changes_rust }} | ||
needs: [preflight, test-rustdoc] | ||
needs: [preflight] | ||
container: | ||
image: ${{ needs.preflight.outputs.IMAGE }} | ||
steps: | ||
|
@@ -88,6 +76,23 @@ jobs: | |
retention-days: 1 | ||
if-no-files-found: error | ||
|
||
confirm-required-jobs-passed: | ||
runs-on: ubuntu-latest | ||
name: All docs jobs passed | ||
# If any new job gets added, be sure to add it to this array | ||
needs: [test-doc, build-rustdoc, build-implementers-guide] | ||
if: always() && !cancelled() | ||
steps: | ||
- run: | | ||
tee resultfile <<< '${{ toJSON(needs) }}' | ||
FAILURES=$(cat resultfile | grep '"result": "failure"' | wc -l) | ||
if [ $FAILURES -gt 0 ]; then | ||
echo "### At least one required job failed ❌" >> $GITHUB_STEP_SUMMARY | ||
exit 1 | ||
else | ||
echo '### Good job! All the required jobs passed 🚀' >> $GITHUB_STEP_SUMMARY | ||
fi | ||
publish-rustdoc: | ||
if: github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
|
@@ -121,13 +126,30 @@ jobs: | |
- run: mkdir -p book | ||
- name: Move book files | ||
run: mv /tmp/book/html/* book/ | ||
- name: Push to GH-Pages branch | ||
uses: github-actions-x/[email protected] | ||
with: | ||
github-token: ${{ steps.app-token.outputs.token }} | ||
push-branch: "gh-pages" | ||
commit-message: "___Updated docs for ${{ github.head_ref || github.ref_name }}___" | ||
force-add: "true" | ||
files: ${{ github.head_ref || github.ref_name }}/ book/ | ||
name: devops-parity | ||
email: [email protected] | ||
- name: Push changes to gh-pages | ||
env: | ||
TOKEN: ${{ steps.app-token.outputs.token }} | ||
APP_NAME: "paritytech-upd-ghpages-polkadotsdk" | ||
REF_NAME: ${{ github.head_ref || github.ref_name }} | ||
Green: "\e[32m" | ||
NC: "\e[0m" | ||
run: | | ||
echo "${Green}Git add${NC}" | ||
git add book/ | ||
git add ${REF_NAME}/ | ||
echo "${Green}git status | wc -l${NC}" | ||
git status | wc -l | ||
echo "${Green}Add new remote with gh app token${NC}" | ||
git remote set-url origin $(git config remote.origin.url | sed "s/github.com/${APP_NAME}:${TOKEN}@github.com/g") | ||
echo "${Green}Remove http section that causes issues with gh app auth token${NC}" | ||
sed -i.bak '/\[http/d' ./.git/config | ||
sed -i.bak '/extraheader/d' ./.git/config | ||
echo "${Green}Git push${NC}" | ||
git config user.email "[email protected]" | ||
git config user.name "${APP_NAME}" | ||
git commit --amend -m "___Updated docs" || echo "___Nothing to commit___" | ||
git push origin gh-pages --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,6 @@ | ||
# This file is part of .gitlab-ci.yml | ||
# Here are all jobs that are executed during "publish" stage | ||
|
||
publish-rustdoc: | ||
stage: publish | ||
extends: | ||
- .kubernetes-env | ||
- .publish-gh-pages-refs | ||
variables: | ||
CI_IMAGE: node:18 | ||
GIT_DEPTH: 100 | ||
RUSTDOCS_DEPLOY_REFS: "master" | ||
needs: | ||
- job: build-rustdoc | ||
artifacts: true | ||
- job: build-implementers-guide | ||
artifacts: true | ||
script: | ||
# If $CI_COMMIT_REF_NAME doesn't match one of $RUSTDOCS_DEPLOY_REFS space-separated values, we | ||
# exit immediately. | ||
# Putting spaces at the front and back to ensure we are not matching just any substring, but the | ||
# whole space-separated value. | ||
# setup ssh | ||
- eval $(ssh-agent) | ||
- ssh-add - <<< ${GITHUB_SSH_PRIV_KEY} | ||
- mkdir ~/.ssh && touch ~/.ssh/known_hosts | ||
- ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | ||
# Set git config | ||
- git config user.email "[email protected]" | ||
- git config user.name "${GITHUB_USER}" | ||
- git config remote.origin.url "[email protected]:/paritytech/${CI_PROJECT_NAME}.git" | ||
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" | ||
- git fetch origin gh-pages | ||
# Save README and docs | ||
- cp -r ./crate-docs/ /tmp/doc/ | ||
- cp -r ./artifacts/book/ /tmp/ | ||
- cp README.md /tmp/doc/ | ||
# we don't need to commit changes because we copy docs to /tmp | ||
- git checkout gh-pages --force | ||
# Enable if docs needed for other refs | ||
# Install `index-tpl-crud` and generate index.html based on RUSTDOCS_DEPLOY_REFS | ||
# - which index-tpl-crud &> /dev/null || yarn global add @substrate/index-tpl-crud | ||
# - index-tpl-crud upsert ./index.html ${CI_COMMIT_REF_NAME} | ||
# Ensure the destination dir doesn't exist. | ||
- rm -rf ${CI_COMMIT_REF_NAME} | ||
- rm -rf book/ | ||
- mv -f /tmp/doc ${CI_COMMIT_REF_NAME} | ||
# dir for implementors guide | ||
- mkdir -p book | ||
- mv /tmp/book/html/* book/ | ||
# Upload files | ||
- git add --all | ||
# `git commit` has an exit code of > 0 if there is nothing to commit. | ||
# This causes GitLab to exit immediately and marks this job failed. | ||
# We don't want to mark the entire job failed if there's nothing to | ||
# publish though, hence the `|| true`. | ||
- git commit --amend -m "___Updated docs" || | ||
echo "___Nothing to commit___" | ||
- git push origin gh-pages --force | ||
# artificial sleep to publish gh-pages | ||
- sleep 300 | ||
after_script: | ||
- rm -rf .git/ ./* | ||
|
||
# note: images are used not only in zombienet but also in rococo, wococo and versi | ||
.build-push-image: | ||
image: $BUILDAH_IMAGE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Fix memory leak in litep2p public addresses | ||
|
||
doc: | ||
- audience: [ Node Dev, Node Operator ] | ||
description: | | ||
This PR bounds the number of public addresses of litep2p to 32 entries. | ||
This ensures we do not increase the number of addresses over time, and that the DHT | ||
authority records will not exceed the upper size limit. | ||
|
||
crates: | ||
- name: sc-network | ||
bump: patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
title: Remove pallet::getter from pallet-offences | ||
doc: | ||
- audience: Runtime Dev | ||
description: | | ||
This PR removes pallet::getter from pallet-offences from type Reports. It also adds a test to verify that retrieval of Reports still works with storage::getter. | ||
|
||
crates: | ||
- name: pallet-offences | ||
bump: patch |
Oops, something went wrong.