Skip to content

Commit

Permalink
Merge branch 'master' into the-right-joyce-update-readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
the-right-joyce authored Aug 28, 2023
2 parents a9943fe + 4252e48 commit 2870e1e
Show file tree
Hide file tree
Showing 15 changed files with 80 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/pr-custom-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ rules:
- min_approvals: 1
teams:
- polkadot-review
- min_approvals: 2
- min_approvals: 1
teams:
- srlabs

Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/auto-label-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# If the author of the issues is not a contributor to the project, label
# the issue with 'Z0-unconfirmed'

name: Label New Issues
on:
issues:
types: [opened]

jobs:
label-new-issues:
runs-on: ubuntu-latest
steps:
- name: Label drafts
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 # 1.0.4
if: github.event.issue.author_association == 'NONE'
with:
add-labels: "I10-unconfirmed"
6 changes: 1 addition & 5 deletions .github/workflows/check-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
API_BASE: https://api.github.com/repos
REPO: ${{ github.repository }}
RULES_PATH: labels/ruled_labels
CHECK_SPECS: "[DRAFT]specs_monorepo.yaml"
CHECK_SPECS: "specs_polkadot-sdk.yaml"
run: |
echo "REPO: ${REPO}"
echo "GITHUB_PR: ${GITHUB_PR}"
Expand All @@ -32,10 +32,6 @@ jobs:
# Temporary, before https://github.com/paritytech/labels/pull/29 is not merged
git clone https://github.com/paritytech/labels
cd labels
git fetch origin the-right-joyce-monorepo-labels
git checkout the-right-joyce-monorepo-labels
cd ..
# Fetch the labels for the PR under test
echo "Fetch the labels for $API_BASE/${REPO}/pulls/${GITHUB_PR}"
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/check-licenses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check licenses

on:
pull_request:

jobs:
check-licenses:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: actions/[email protected]
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@paritytech'
- name: Check the licenses
run: |
shopt -s globstar
npx --yes https://github.com/paritytech/license-scanner scan \
--ensure-licenses=Apache-2.0 \
--ensure-licenses=GPL-3.0-only \
./**/*.rs
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 6 additions & 2 deletions .gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ build-linux-stable:
# Ensure we run the UI tests.
RUN_UI_TESTS: 1
script:
- time cargo build --locked --profile testnet --features pyroscope,fast-runtime --bin polkadot
- time cargo build --locked --profile testnet --features pyroscope,fast-runtime --bin polkadot --bin polkadot-prepare-worker --bin polkadot-execute-worker
# pack artifacts
- mkdir -p ./artifacts
- VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name
- mv ./target/testnet/polkadot ./artifacts/.
- mv ./target/testnet/polkadot-prepare-worker ./artifacts/.
- mv ./target/testnet/polkadot-execute-worker ./artifacts/.
- pushd artifacts
- sha256sum polkadot | tee polkadot.sha256
- shasum -c polkadot.sha256
Expand Down Expand Up @@ -64,10 +66,12 @@ build-malus:
- .run-immediately
- .collect-artifacts
script:
- time cargo build --locked --profile testnet --verbose -p polkadot-test-malus
- time cargo build --locked --profile testnet --verbose -p polkadot-test-malus --bin malus --bin polkadot-prepare-worker --bin polkadot-execute-worker
# pack artifacts
- mkdir -p ./artifacts
- mv ./target/testnet/malus ./artifacts/.
- mv ./target/testnet/polkadot-execute-worker ./artifacts/.
- mv ./target/testnet/polkadot-prepare-worker ./artifacts/.
- echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION
- echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG
- echo "polkadot-test-malus = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"
Expand Down
17 changes: 1 addition & 16 deletions .gitlab/pipeline/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ check-try-runtime:
- time cargo check --locked -p parachain-template-node --features try-runtime
# add after https://github.com/paritytech/substrate/pull/14502 is merged
# experimental code may rely on try-runtime and vice-versa
# - time cargo check --locked --features try-runtime,experimental
- time cargo check --locked --features try-runtime,experimental

cargo-fmt-manifest:
stage: check
Expand Down Expand Up @@ -57,21 +57,6 @@ cargo-deny-licenses:
paths:
- deny.log

spellcheck:
stage: check
extends:
- .kubernetes-env
- .common-refs
script:
- cargo spellcheck --version
# compare with the commit parent to the PR, given it's from a default branch
- git fetch origin +${CI_DEFAULT_BRANCH}:${CI_DEFAULT_BRANCH}
- echo "___Spellcheck is going to check your diff___"
- cargo spellcheck list-files -vvv $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH} -- :^bridges))
- time cargo spellcheck check -vvv --cfg=.gitlab/spellcheck.toml --checkers hunspell --code 1
$(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH} -- :^bridges))
allow_failure: true

# from substrate
# not sure if it's needed in monorepo
check-dependency-rules:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test-linux-stable:
--release \
--verbose \
--no-fail-fast \
--features runtime-benchmarks,try-runtime \
--features runtime-benchmarks,try-runtime,experimental \
--partition count:${CI_NODE_INDEX}/${CI_NODE_TOTAL}
# run runtime-api tests with `enable-staging-api` feature on the 1st node
- if [ ${CI_NODE_INDEX} == 1 ]; then time cargo nextest run -p sp-api-test --features enable-staging-api; fi
Expand Down
2 changes: 1 addition & 1 deletion docker/malus_injected.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN apt-get update && \


# add adder-collator binary to docker image
COPY ./artifacts/malus /usr/local/bin
COPY ./artifacts/malus ./artifacts/polkadot-execute-worker ./artifacts/polkadot-prepare-worker /usr/local/bin

USER nonroot

Expand Down
6 changes: 4 additions & 2 deletions docker/polkadot_injected_debug.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ RUN apt-get update && \
chown -R polkadot:polkadot /data && \
ln -s /data /polkadot/.local/share/polkadot

# add polkadot binary to docker image
COPY ./artifacts/polkadot /usr/local/bin
# add polkadot binaries to docker image
COPY ./artifacts/polkadot ./artifacts/polkadot-execute-worker ./artifacts/polkadot-prepare-worker /usr/local/bin

USER polkadot

# check if executable works in this container
RUN /usr/local/bin/polkadot --version
RUN /usr/local/bin/polkadot-execute-worker --version
RUN /usr/local/bin/polkadot-prepare-worker --version

EXPOSE 30333 9933 9944
VOLUME ["/polkadot"]
Expand Down
2 changes: 2 additions & 0 deletions docker/polkadot_injected_release.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ USER polkadot

# check if executable works in this container
RUN /usr/bin/polkadot --version
RUN /usr/local/bin/polkadot-execute-worker --version
RUN /usr/local/bin/polkadot-prepare-worker --version

EXPOSE 30333 9933 9944
VOLUME ["/polkadot"]
Expand Down
10 changes: 10 additions & 0 deletions polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,16 @@ assets = [
"/usr/bin/",
"755",
],
[
"target/release/polkadot-prepare-worker",
"/usr/lib/polkadot/",
"755"
],
[
"target/release/polkadot-execute-worker",
"/usr/lib/polkadot/",
"755"
],
[
"scripts/packaging/polkadot.service",
"/lib/systemd/system/",
Expand Down
4 changes: 3 additions & 1 deletion polkadot/node/service/chain-specs/kusama.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"/dns/kusama-bootnode.radiumblock.com/tcp/30333/p2p/12D3KooWGzKffWe7JSXeKMQeSQC5xfBafZtgBDCuBVxmwe2TJRuc",
"/dns/ksm-bootnode.stakeworld.io/tcp/30300/p2p/12D3KooWFRin7WWVS6RgUsSpkfUHSv4tfGKnr2zJPmf1pbMv118H",
"/dns/ksm-bootnode.stakeworld.io/tcp/30301/ws/p2p/12D3KooWFRin7WWVS6RgUsSpkfUHSv4tfGKnr2zJPmf1pbMv118H",
"/dns/ksm-bootnode.stakeworld.io/tcp/30302/wss/p2p/12D3KooWFRin7WWVS6RgUsSpkfUHSv4tfGKnr2zJPmf1pbMv118H"
"/dns/ksm-bootnode.stakeworld.io/tcp/30302/wss/p2p/12D3KooWFRin7WWVS6RgUsSpkfUHSv4tfGKnr2zJPmf1pbMv118H",
"/dns/ksm14.rotko.net/tcp/35224/wss/p2p/12D3KooWAa5THTw8HPfnhEei23HdL8P9McBXdozG2oTtMMksjZkK",
"/dns/ksm14.rotko.net/tcp/33224/p2p/12D3KooWAa5THTw8HPfnhEei23HdL8P9McBXdozG2oTtMMksjZkK"
],
"telemetryEndpoints": [
[
Expand Down
4 changes: 3 additions & 1 deletion polkadot/node/service/chain-specs/polkadot.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"/dns/polkadot-bootnode.radiumblock.com/tcp/30333/p2p/12D3KooWNwWNRrPrTk4qMah1YszudMjxNw2qag7Kunhw3Ghs9ea5",
"/dns/dot-bootnode.stakeworld.io/tcp/30310/p2p/12D3KooWAb5MyC1UJiEQJk4Hg4B2Vi3AJdqSUhTGYUqSnEqCFMFg",
"/dns/dot-bootnode.stakeworld.io/tcp/30311/ws/p2p/12D3KooWAb5MyC1UJiEQJk4Hg4B2Vi3AJdqSUhTGYUqSnEqCFMFg",
"/dns/dot-bootnode.stakeworld.io/tcp/30312/wss/p2p/12D3KooWAb5MyC1UJiEQJk4Hg4B2Vi3AJdqSUhTGYUqSnEqCFMFg"
"/dns/dot-bootnode.stakeworld.io/tcp/30312/wss/p2p/12D3KooWAb5MyC1UJiEQJk4Hg4B2Vi3AJdqSUhTGYUqSnEqCFMFg",
"/dns/dot14.rotko.net/tcp/35214/wss/p2p/12D3KooWPyEvPEXghnMC67Gff6PuZiSvfx3fmziKiPZcGStZ5xff",
"/dns/dot14.rotko.net/tcp/33214/p2p/12D3KooWPyEvPEXghnMC67Gff6PuZiSvfx3fmziKiPZcGStZ5xff"
],
"telemetryEndpoints": [
[
Expand Down
4 changes: 3 additions & 1 deletion polkadot/node/service/chain-specs/westend.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"/dns/westend-bootnode.radiumblock.com/tcp/30333/p2p/12D3KooWJBowJuX1TaWNWHt8Dz8z44BoCZunLCfFqxA2rLTn6TBD",
"/dns/wnd-bootnode.stakeworld.io/tcp/30320/p2p/12D3KooWBYdKipcNbrV5rCbgT5hco8HMLME7cE9hHC3ckqCKDuzP",
"/dns/wnd-bootnode.stakeworld.io/tcp/30321/ws/p2p/12D3KooWBYdKipcNbrV5rCbgT5hco8HMLME7cE9hHC3ckqCKDuzP",
"/dns/wnd-bootnode.stakeworld.io/tcp/30322/wss/p2p/12D3KooWBYdKipcNbrV5rCbgT5hco8HMLME7cE9hHC3ckqCKDuzP"
"/dns/wnd-bootnode.stakeworld.io/tcp/30322/wss/p2p/12D3KooWBYdKipcNbrV5rCbgT5hco8HMLME7cE9hHC3ckqCKDuzP",
"/dns/wnd14.rotko.net/tcp/35234/wss/p2p/12D3KooWLK8Zj1uZ46phU3vQwiDVda8tB76S8J26rXZQLHpwWkDJ",
"/dns/wnd14.rotko.net/tcp/33234/p2p/12D3KooWLK8Zj1uZ46phU3vQwiDVda8tB76S8J26rXZQLHpwWkDJ"
],
"telemetryEndpoints": [
[
Expand Down
2 changes: 1 addition & 1 deletion substrate/.github/workflows/auto-label-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 # 1.0.4
if: github.event.issue.author_association == 'NONE'
with:
add-labels: "J2-unconfirmed"
add-labels: "I10-unconfirmed"

0 comments on commit 2870e1e

Please sign in to comment.