Skip to content

Commit 4f2f8f0

Browse files
authored
Fix/srtool ci (#1907)
* Update srtool.yml * Update srtool.yml * Update srtool.yml * add LP-DOT/sDOT
1 parent 25b24d0 commit 4f2f8f0

File tree

4 files changed

+40
-96
lines changed

4 files changed

+40
-96
lines changed

.github/workflows/srtool.yml

Lines changed: 5 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -8,53 +8,20 @@ on:
88
- "v*"
99

1010
jobs:
11-
start-runner:
12-
name: start self-hosted EC2 runner
13-
runs-on: ubuntu-latest
14-
outputs:
15-
label: ${{ steps.start-ec2-runner.outputs.label }}
16-
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
17-
steps:
18-
- name: Configure AWS credentials
19-
uses: aws-actions/configure-aws-credentials@v1
20-
with:
21-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
22-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
23-
aws-region: ${{ secrets.AWS_REGION }}
24-
25-
- name: Start EC2 runner
26-
id: start-ec2-runner
27-
uses: machulav/ec2-github-runner@v2
28-
with:
29-
mode: start
30-
github-token: ${{ secrets.PAT_RUNNER }}
31-
ec2-image-id: ${{ secrets.EC2_IMAGE_ID }}
32-
ec2-instance-type: ${{ secrets.EC2_INSTANCE_TYPE }}
33-
subnet-id: ${{ secrets.SUBNET_ID }}
34-
security-group-id: ${{ secrets.SECURITY_GROUP_ID }}
35-
aws-resource-tags: >
36-
[
37-
{"Key": "Name", "Value": "${{ github.workflow }}"},
38-
{"Key": "GitHubRepository", "Value": "${{ github.repository }}"}
39-
]
40-
4111
srtool:
4212
if: github.repository == 'parallel-finance/parallel'
43-
needs: start-runner
44-
runs-on: ${{ needs.start-runner.outputs.label }}
13+
runs-on: ubuntu-latest
4514
strategy:
4615
matrix:
4716
chain: ["heiko", "parallel", "vanilla", "kerria"]
4817
steps:
49-
- name: cleaning up
50-
run: |
51-
echo '${{ secrets.RUNNER_PASSWORD }}' | sudo -S chown -R $USER:$USER $GITHUB_WORKSPACE
52-
echo "HOME=/home/ubuntu" >> ${GITHUB_ENV}
5318
- uses: actions/checkout@v3
5419
- name: Srtool build
5520
id: srtool_build
56-
run: |
57-
make RUNTIME=${{ matrix.chain }}-runtime wasm
21+
uses: chevdor/[email protected]
22+
with:
23+
chain: ${{ matrix.chain }}
24+
runtime_dir: runtime/${{ matrix.chain }}
5825
- name: Summary
5926
run: |
6027
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.chain }}-srtool-digest.json
@@ -149,27 +116,3 @@ jobs:
149116
uses: Ilshidur/action-discord@master
150117
with:
151118
args: "Parallel ${{ steps.git_tag.outputs.tag }} has just been released! Go check it out: https://github.com/${{ github.repository }}/releases/tag/${{ steps.git_tag.outputs.tag }}"
152-
153-
stop-runner:
154-
name: stop self-hosted EC2 runner
155-
needs:
156-
- start-runner
157-
- srtool
158-
- postrelease
159-
runs-on: ubuntu-latest
160-
if: ${{ always() }}
161-
steps:
162-
- name: Configure AWS credentials
163-
uses: aws-actions/configure-aws-credentials@v1
164-
with:
165-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
166-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
167-
aws-region: ${{ secrets.AWS_REGION }}
168-
169-
- name: Stop EC2 runner
170-
uses: machulav/ec2-github-runner@v2
171-
with:
172-
mode: stop
173-
github-token: ${{ secrets.PAT_RUNNER }}
174-
label: ${{ needs.start-runner.outputs.label }}
175-
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

scripts/helper/src/config/heiko.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"symbol": "sKSM",
7373
"assetId": 1000,
7474
"decimal": 12,
75-
"balances": []
75+
"balances": [["5HHMY7e8UAqR5ZaHGaQnRW5EDR8dP7QpAyjeBu6V7vdXxxbf", "11000000000"]]
7676
},
7777
{
7878
"name": "Parallel Crowdloans Kusama - (0 ~ 7)",
@@ -102,6 +102,13 @@
102102
"decimal": 12,
103103
"balances": []
104104
},
105+
{
106+
"name": "Parallel LP-KSM/sKSM",
107+
"symbol": "LP-KSM/sKSM",
108+
"assetId": 5003,
109+
"decimal": 12,
110+
"balances": []
111+
},
105112
{
106113
"name": "Shiden",
107114
"symbol": "SDN",
@@ -257,6 +264,12 @@
257264
"liquidityAmounts": ["10000000000000000", "30000000000000000000"],
258265
"lptokenReceiver": "5HHMY7e8UAqR5ZaHGaQnRW5EDR8dP7QpAyjeBu6V7vdXxxbf",
259266
"liquidityProviderToken": 5002
267+
},
268+
{
269+
"pool": [1000, 100],
270+
"liquidityAmounts": ["10000000000", "10000000000"],
271+
"lptokenReceiver": "5HHMY7e8UAqR5ZaHGaQnRW5EDR8dP7QpAyjeBu6V7vdXxxbf",
272+
"liquidityProviderToken": 6003
260273
}
261274
],
262275
"crowdloans": [

scripts/helper/src/config/parallel.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"symbol": "sDOT",
7373
"assetId": 1001,
7474
"decimal": 10,
75-
"balances": []
75+
"balances": [["5HHMY7e8UAqR5ZaHGaQnRW5EDR8dP7QpAyjeBu6V7vdXxxbf", "1100000000"]]
7676
},
7777
{
7878
"name": "Parallel Crowdloans Polkadot - (0 ~ 7)",
@@ -112,6 +112,13 @@
112112
"decimal": 12,
113113
"balances": []
114114
},
115+
{
116+
"name": "Parallel LP-DOT/sDOT",
117+
"symbol": "LP-DOT/sDOT",
118+
"assetId": 6003,
119+
"decimal": 12,
120+
"balances": []
121+
},
115122
{
116123
"name": "Parallel LP-DOT/CDOT-7-14",
117124
"symbol": "LP-DOT/CDOT-7-14",
@@ -298,6 +305,12 @@
298305
"liquidityAmounts": ["10000000000000000", "10000000000000000"],
299306
"lptokenReceiver": "5HHMY7e8UAqR5ZaHGaQnRW5EDR8dP7QpAyjeBu6V7vdXxxbf",
300307
"liquidityProviderToken": 6005
308+
},
309+
{
310+
"pool": [1001, 101],
311+
"liquidityAmounts": ["1000000000", "1000000000"],
312+
"lptokenReceiver": "5HHMY7e8UAqR5ZaHGaQnRW5EDR8dP7QpAyjeBu6V7vdXxxbf",
313+
"liquidityProviderToken": 6003
301314
}
302315
],
303316
"crowdloans": [

scripts/srtool-build.sh

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,15 @@ cd $DIR/../
66

77
set -xe
88

9-
RUSTC_VERSION=1.62.0;
9+
RUSTC_VERSION=1.64.0;
1010
PACKAGE=${PACKAGE:-vanilla-runtime};
1111
BUILD_OPTS=$BUILD_OPTS;
1212

13-
CMD="docker run \
14-
-i \
15-
--rm \
16-
-e PACKAGE=${PACKAGE} \
17-
-e BUILD_OPTS="${BUILD_OPTS}" \
18-
-v ${PWD}:/build \
19-
-v ${TMPDIR}/cargo:/cargo-home \
13+
docker run --rm -it \
14+
-e PACKAGE=$PACKAGE \
15+
-e BUILD_OPTS="$BUILD_OPTS" \
16+
-v $PWD:/build \
17+
-v $TMPDIR/cargo:/cargo-home \
2018
--user root \
2119
--network=host \
22-
paritytech/srtool:${RUSTC_VERSION} \
23-
build --app --json -cM"
24-
25-
stdbuf -oL $CMD | {
26-
while IFS= read -r line
27-
do
28-
echo$line
29-
JSON="$line"
30-
done
31-
32-
echo ::set-output name=json::$JSON
33-
34-
PROP=`echo $JSON | jq -r .runtimes.compact.prop`
35-
echo ::set-output name=proposal_hash::$PROP
36-
37-
WASM=`echo $JSON | jq -r .runtimes.compact.wasm`
38-
echo ::set-output name=wasm::$WASM
39-
40-
Z_WASM=`echo $JSON | jq -r .runtimes.compressed.wasm`
41-
echo ::set-output name=wasm_compressed::$Z_WASM
42-
43-
IPFS=`echo $JSON | jq -r .runtimes.compact.ipfs`
44-
echo ::set-output name=ipfs::$IPFS
45-
}
20+
paritytech/srtool:$RUSTC_VERSION

0 commit comments

Comments
 (0)