Skip to content

Commit 27f8a62

Browse files
committed
Merge branch 'master' into ao-try-fixing-zombienet-slashing
* master: (24 commits) GHW for building and publishing docker images (#1391) pallet asset-conversion additional quote tests (#1371) Remove deprecated `pallet_balances`'s `set_balance_deprecated` and `transfer` dispatchables (#1226) Fix PRdoc check (#1419) Fix the wasm runtime substitute caching bug (#1416) Bump enumn from 0.1.11 to 0.1.12 (#1412) RFC 14: Improve locking mechanism for parachains (#1290) Add PRdoc check (#1408) fmt fixes (#1413) Enforce a decoding limit in MultiAssets (#1395) Remove dynamic dispatch using `Ext` (#1399) Remove redundant calls to `borrow()` (#1393) Get rid of polling in `WarpSync` (#1265) Bump actions/checkout from 3 to 4 (#1398) Bump thiserror from 1.0.47 to 1.0.48 (#1396) Move Relay-Specific Shared Code to One Place (#1193) rust docs: add simple analytics (#1377) Contracts: Update read_sandbox (#1390) Extract block announce validation from `ChainSync` (#1170) [ci] Remove runtime-benchmarks from tests (#1335) ...
2 parents b9d3d27 + eeb368e commit 27f8a62

File tree

254 files changed

+3281
-3709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+3281
-3709
lines changed

.gitlab/common/lib.sh renamed to .github/scripts/common/lib.sh

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ structure_message() {
9696
# access_token: see https://matrix.org/docs/guides/client-server-api/
9797
# Usage: send_message $body (json formatted) $room_id $access_token
9898
send_message() {
99-
curl -XPOST -d "$1" "https://matrix.parity.io/_matrix/client/r0/rooms/$2/send/m.room.message?access_token=$3"
99+
curl -XPOST -d "$1" "https://m.parity.io/_matrix/client/r0/rooms/$2/send/m.room.message?access_token=$3"
100100
}
101101

102102
# Pretty-printing functions
@@ -193,3 +193,74 @@ check_bootnode(){
193193
echo " Bootnode appears unreachable"
194194
return 1
195195
}
196+
197+
# Assumes the ENV are set:
198+
# - RELEASE_ID
199+
# - GITHUB_TOKEN
200+
# - REPO in the form paritytech/polkadot
201+
fetch_release_artifacts() {
202+
echo "Release ID : $RELEASE_ID"
203+
echo "Repo : $REPO"
204+
echo "Binary : $BINARY"
205+
206+
curl -L -s \
207+
-H "Accept: application/vnd.github+json" \
208+
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
209+
-H "X-GitHub-Api-Version: 2022-11-28" \
210+
https://api.github.com/repos/${REPO}/releases/${RELEASE_ID} > release.json
211+
212+
# Get Asset ids
213+
ids=($(jq -r '.assets[].id' < release.json ))
214+
count=$(jq '.assets|length' < release.json )
215+
216+
# Fetch artifacts
217+
mkdir -p "./release-artifacts/${BINARY}"
218+
pushd "./release-artifacts/${BINARY}" > /dev/null
219+
220+
iter=1
221+
for id in "${ids[@]}"
222+
do
223+
echo " - $iter/$count: downloading asset id: $id..."
224+
curl -s -OJ -L -H "Accept: application/octet-stream" \
225+
-H "Authorization: Token ${GITHUB_TOKEN}" \
226+
"https://api.github.com/repos/${REPO}/releases/assets/$id"
227+
iter=$((iter + 1))
228+
done
229+
230+
pwd
231+
ls -al --color
232+
popd > /dev/null
233+
}
234+
235+
# Check the checksum for a given binary
236+
function check_sha256() {
237+
echo "Checking SHA256 for $1"
238+
shasum -qc $1.sha256
239+
}
240+
241+
# Import GPG keys of the release team members
242+
# This is done in parallel as it can take a while sometimes
243+
function import_gpg_keys() {
244+
GPG_KEYSERVER=${GPG_KEYSERVER:-"keyserver.ubuntu.com"}
245+
SEC="9D4B2B6EB8F97156D19669A9FF0812D491B96798"
246+
WILL="2835EAF92072BC01D188AF2C4A092B93E97CE1E2"
247+
EGOR="E6FC4D4782EB0FA64A4903CCDB7D3555DD3932D3"
248+
MARA="533C920F40E73A21EEB7E9EBF27AEA7E7594C9CF"
249+
MORGAN="2E92A9D8B15D7891363D1AE8AF9E6C43F7F8C4CF"
250+
251+
echo "Importing GPG keys from $GPG_KEYSERVER in parallel"
252+
for key in $SEC $WILL $EGOR $MARA $MORGAN; do
253+
(
254+
echo "Importing GPG key $key"
255+
gpg --no-tty --quiet --keyserver $GPG_KEYSERVER --recv-keys $key
256+
echo -e "5\ny\n" | gpg --no-tty --command-fd 0 --expert --edit-key $key trust;
257+
) &
258+
done
259+
wait
260+
}
261+
262+
# Check the GPG signature for a given binary
263+
function check_gpg() {
264+
echo "Checking GPG Signature for $1"
265+
gpg --no-tty --verify -q $1.asc $1
266+
}

.github/workflows/check-licenses.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1515
steps:
1616
- name: Checkout sources
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
1818
- uses: actions/[email protected]
1919
with:
2020
node-version: "18.x"

.github/workflows/check-markdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout sources
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
1717

1818
- uses: actions/[email protected]
1919
with:

.github/workflows/check-prdoc.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Check PRdoc
2+
3+
on:
4+
pull_request:
5+
types: [labeled, opened, synchronize, unlabeled]
6+
7+
env:
8+
# todo: switch to paritytech/prdoc once the container is built & published
9+
# see https://github.com/paritytech/scripts/pull/595
10+
IMAGE: chevdor/prdoc:v0.0.4
11+
API_BASE: https://api.github.com/repos
12+
REPO: ${{ github.repository }}
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
GITHUB_PR: ${{ github.event.pull_request.number }}
15+
MOUNT: /prdoc
16+
ENGINE: docker
17+
18+
jobs:
19+
check-prdoc:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Pull image
23+
run: |
24+
echo "Pulling $IMAGE"
25+
docker pull $IMAGE
26+
docker run --rm $IMAGE --version
27+
28+
- name: Check if PRdoc is required
29+
id: get-labels
30+
run: |
31+
# Fetch the labels for the PR under test
32+
echo "Fetch the labels for $API_BASE/${REPO}/pulls/${GITHUB_PR}"
33+
labels=$( curl -H "Authorization: token ${GITHUB_TOKEN}" -s "$API_BASE/${REPO}/pulls/${GITHUB_PR}" | jq '.labels | .[] | .name' | tr "\n" ",")
34+
echo "Labels: ${labels}"
35+
echo "labels=${labels}" >> "$GITHUB_OUTPUT"
36+
37+
- name: No PRdoc required
38+
if: ${{ contains(steps.get-labels.outputs.labels, 'R0') }}
39+
run: |
40+
echo "PR detected as silent, no PRdoc is required, exiting..."
41+
exit 0
42+
43+
- name: Checkout repo
44+
if: ${{ !contains(steps.get-labels.outputs.labels, 'R0') }}
45+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
46+
47+
- name: PRdoc check for PR#${{ github.event.pull_request.number }}
48+
if: ${{ !contains(steps.get-labels.outputs.labels, 'R0') }}
49+
run: |
50+
echo "Checking for PR#${GITHUB_PR} in $MOUNT"
51+
$ENGINE run --rm -v $PWD/prdoc:/doc $IMAGE check -n ${GITHUB_PR}

.github/workflows/fmt-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
container:
1717
image: paritytech/ci-unified:bullseye-1.70.0-2023-05-23-v20230706
1818
steps:
19-
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
19+
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
2020

2121
- name: Cargo fmt
2222
run: cargo +nightly fmt --all -- --check

0 commit comments

Comments
 (0)