Skip to content

Commit 58c24bb

Browse files
authored
Release/v0.30.0 (#501)
2 parents 6702f43 + 6091570 commit 58c24bb

File tree

119 files changed

+13383
-8082
lines changed

Some content is hidden

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

119 files changed

+13383
-8082
lines changed

.github/workflows/branch-develop.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,35 @@ jobs:
8383
env: fungible
8484
version: ${{ needs.init.outputs.GLOBAL_VERSION }}
8585

86-
performance-tests:
87-
name: performance tests
88-
needs: [init, deploy-fungible]
86+
run-perf-tests-branch:
87+
runs-on: ubuntu-latest
88+
needs: [deploy-fungible]
8989
if: |
9090
(github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == ':rocket: deploy' && contains(github.event.pull_request.labels.*.name, 'full-benchmarks')) ||
9191
(github.event_name == 'pull_request' && github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, ':rocket: deploy') && contains(github.event.pull_request.labels.*.name, 'full-benchmarks'))
92+
steps:
93+
- run: echo "Running perf tests in branch"
94+
run-perf-tests-dev:
95+
runs-on: ubuntu-latest
96+
needs: [deploy-dev]
97+
steps:
98+
- run: echo "Running perf tests in dev"
99+
100+
performance-tests:
101+
name: performance tests in branch
102+
needs: [run-perf-tests-branch]
92103
uses: ./.github/workflows/reusable-perfomance-tests.yml
93104
secrets: inherit
105+
with:
106+
e2eBranch: ${{ github.event.inputs.e2eBranch }}
107+
performance-tests-dev:
108+
name: performance tests in dev
109+
needs: [run-perf-tests-dev]
110+
uses: ./.github/workflows/reusable-perfomance-tests.yml
111+
secrets: inherit
112+
with:
113+
e2eBranch: ${{ github.event.inputs.e2eBranch }}
114+
targetEnv: "dev"
94115

95116
clean-up-fungible:
96117
name: Delete fungible environment

.github/workflows/docs.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,37 @@ jobs:
99
permissions:
1010
contents: write
1111
id-token: write
12-
runs-on: ubuntu-latest
12+
runs-on: [self-hosted, compile]
13+
container:
14+
image: mangatasolutions/node-builder:multi-nightly-2022-11-21
1315
steps:
1416
- uses: actions/checkout@v3
1517
- uses: google-github-actions/auth@v1
1618
with:
1719
workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}'
1820
service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
1921

20-
- name: Pull builder image
21-
run: docker pull mangatasolutions/node-builder:0.2
22+
- name: Cache the Cargo dependencies
23+
uses: mansagroup/gcs-cache-action@v1.0.3
24+
with:
25+
bucket: mangata-node-ci-cache
26+
path: |
27+
${{ github.workspace }}/target
28+
/usr/local/cargo/git
29+
/usr/local/cargo/registry
30+
~/.cache/sccache
31+
key: node-docs-cache-0-${{ hashFiles('Cargo.lock') }}
32+
2233
- name: Build docs
23-
run: |
24-
./docker-cargo.sh fetch || ./docker-cargo.sh fetch || ./docker-cargo.sh fetch || ./docker-cargo.sh fetch || ./docker-cargo.sh fetch
25-
./docker-cargo.sh doc
26-
env:
27-
DISABLE_TTY: 1
34+
run: cargo doc
2835

2936
- name: Deploy to GCP
30-
uses: google-github-actions/upload-cloud-storage@v0.10.4
37+
uses: google-github-actions/upload-cloud-storage@v1.0.3
3138
with:
32-
path: ./docker-cargo/doc/
39+
path: ./target/doc/
3340
destination: mangata-docs-node
3441
parent: false
42+
43+
- name: Fix permissions on self-hosted runner
44+
if: always()
45+
run: chown -R 1100:1100 $GITHUB_WORKSPACE

.github/workflows/reusable-build-and-test.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
key: node-cache-${{ inputs.cache_version }}-${{ hashFiles('Cargo.lock') }}
5454

5555
- name: Compile mangata-node code
56-
run: cargo build --release --no-default-features --features=mangata-rococo,mangata-kusama
56+
run: cargo build --locked --release --no-default-features --features=mangata-rococo,mangata-kusama
5757

5858
- name: Rename wasms
5959
run: |
@@ -105,7 +105,7 @@ jobs:
105105
106106
- name: Fix permissions on self-hosted runner
107107
if: always()
108-
run: chown -R 1004:1005 $GITHUB_WORKSPACE
108+
run: chown -R 1100:1100 $GITHUB_WORKSPACE
109109

110110
rustfmt-check:
111111
name: Formatting check
@@ -166,7 +166,7 @@ jobs:
166166
run: cargo test -j2
167167
- name: Fix permissions on self-hosted runner
168168
if: always()
169-
run: chown -R 1004:1005 $GITHUB_WORKSPACE
169+
run: chown -R 1100:1100 $GITHUB_WORKSPACE
170170

171171
run-benchmarks-tests:
172172
name: Run benchmark tests
@@ -190,7 +190,9 @@ jobs:
190190
/usr/local/cargo/registry
191191
key: cargo-benchmark-cache-${{ inputs.cache_version }}-${{ hashFiles('Cargo.lock') }}
192192
- name: Run benchmarks tests
193-
run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-bootstrap -p pallet-fee-lock
193+
run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock -p pallet-proof-of-stake -p pallet-proof-of-stake
194+
- name: Run benchmarks tests
195+
run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-bootstrap
194196

195197
build-and-run-try-runtime:
196198
name: Run try-runtime checks
@@ -216,14 +218,14 @@ jobs:
216218
key: cargo-try-runtime-${{ inputs.cache_version }}-${{ hashFiles('Cargo.lock') }}
217219

218220
- name: Run try-runtime Rococo testnet
219-
run: cargo run --release --features=try-runtime,mangata-rococo try-runtime --chain=rococo --runtime=target/release/wbuild/mangata-rococo-runtime/mangata_rococo_runtime.wasm on-runtime-upgrade live --uri wss://roccoco-testnet-collator-01.mangatafinance.cloud:443
221+
run: cargo run --release --features=try-runtime,mangata-rococo try-runtime --chain=rococo --runtime=target/release/wbuild/mangata-rococo-runtime/mangata_rococo_runtime.wasm on-runtime-upgrade live --uri wss://collator-01-ws-rococo.mangata.online:443
220222

221223
- name: Run try-runtime Kusama Mainnet
222224
run: cargo run --release --features=try-runtime try-runtime --chain=kusama --runtime=target/release/wbuild/mangata-kusama-runtime/mangata_kusama_runtime.wasm on-runtime-upgrade live --uri wss://prod-kusama-collator-01.mangatafinance.cloud:443
223225

224226
- name: Fix permissions on self-hosted runner
225227
if: always()
226-
run: chown -R 1004:1005 $GITHUB_WORKSPACE
228+
run: chown -R 1100:1100 $GITHUB_WORKSPACE
227229

228230
run-benchmarks:
229231
name: Run runtime benchmarks
@@ -279,14 +281,14 @@ jobs:
279281
run: |
280282
target/release/mangata-node benchmark overhead --execution native --chain kusama-local -lblock_builder=debug --max-ext-per-block 50000 --base-path .
281283
cp block_weights.rs extrinsic_weights.rs ./benchmarks
282-
283-
- name: Fix permissions on self-hosted runner
284-
if: always()
285-
run: chown -R 1004:1005 $GITHUB_WORKSPACE
286284
287285
- name: Upload logs and docker images to GitHub
288286
if: ${{ contains(github.event.pull_request.labels.*.name, 'full-benchmarks') }}
289287
uses: actions/upload-artifact@v3.1.1
290288
with:
291289
name: benchmarks
292-
path: ./benchmarks
290+
path: ./benchmarks
291+
292+
- name: Fix permissions on self-hosted runner
293+
if: always()
294+
run: chown -R 1100:1100 $GITHUB_WORKSPACE

.github/workflows/reusable-e2e-tests.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,21 @@ jobs:
6161
fast: false
6262
- command: "yarn test-seqgasless"
6363
fast: false
64+
- command: "yarn test-maintenance"
65+
fast: true
6466
- command: "yarn test-bootstrap"
6567
fast: false
6668
- command: "yarn test-rewards-bootstrap"
6769
fast: false
70+
- command: "yarn test-parallel-autocompound"
71+
fast: true
6872
- command: "yarn test-sequential-autocompound"
6973
fast: true
74+
- command: "yarn test-poolliquidity"
75+
fast: true
76+
- command: "yarn test-governance"
77+
fast: true
78+
7079
runs-on: [self-hosted, compile]
7180
timeout-minutes: 180
7281
env:
@@ -80,6 +89,7 @@ jobs:
8089
E2EBRANCHNAME: "main"
8190
PARACHAIN_DOCKER_IMAGE: ${{ inputs.parachainDocker || format('mangatasolutions/mangata-node:{0}', inputs.globalVersion) }}
8291
steps:
92+
8393
- uses: actions/checkout@v3 ####IDK, but this is neccesary for reports
8494
- name: Adapt if fast runtime
8595
if: ${{ !contains(env.PARACHAIN_DOCKER_IMAGE, 'fast') && matrix.fast == true }}
@@ -122,7 +132,7 @@ jobs:
122132
repository: mangata-finance/mangata-e2e
123133
ref: "${{ env.E2EBRANCHNAME }}"
124134
path: e2eTests
125-
135+
126136
- uses: actions/setup-node@v3
127137
with:
128138
node-version: '16'
@@ -169,6 +179,7 @@ jobs:
169179

170180
- name: Test Report
171181
uses: dorny/test-reporter@v1.6.0
182+
continue-on-error: true
172183
if: success() || failure() # run this step even if previous step failed
173184
with:
174185
name: E2E report ${{ matrix.command }} # Name of the check run which will be created
@@ -207,3 +218,7 @@ jobs:
207218
if: always()
208219
working-directory: launch
209220
run: yarn down
221+
222+
- name: Fix permissions on self-hosted runner
223+
if: always()
224+
run: chown -R 1100:1100 $GITHUB_WORKSPACE
Lines changed: 64 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
name: Performance tests workflow
22
on:
33
workflow_call:
4+
inputs:
5+
e2eBranch:
6+
description: "Name of the e2e target branch"
7+
type: string
8+
required: false
9+
default: "main"
10+
targetEnv:
11+
description: "env name"
12+
type: string
13+
required: false
414

515
permissions:
616
contents: write
@@ -13,37 +23,72 @@ jobs:
1323
runs-on: [self-hosted, compile]
1424
timeout-minutes: 180
1525
env:
16-
ENV_REF: ${{ format('pr-{0}', github.event.number) }}
26+
ENV_REF: ${{ inputs.targetEnv || format('pr-{0}', github.event.number) }}
27+
E2EBRANCHNAME: "main"
1728
steps:
1829
####IDK, but this is neccesary for reports
1930
- uses: actions/checkout@v3
2031

32+
- name: E2E- Get branch name
33+
id: branch-name
34+
uses: tj-actions/branch-names@v4.9
35+
36+
- name: Set Configuration - Develop
37+
if: "${{ inputs.targetEnv == 'dev' }}"
38+
run: |
39+
echo 'TEST_SUDO_NAME=${{ secrets.DEV_SUDO_NAME }}' >> $GITHUB_ENV
40+
41+
- name: E2E- Calculate if run e2e feature branch or main.
42+
run: |
43+
echo DEFAULT: E2E test will run with: $E2EBRANCHNAME
44+
echo "Running on: ${{ steps.branch-name.outputs.current_branch }}"
45+
if [ -n "$(git ls-remote --heads https://github.com/mangata-finance/mangata-e2e.git ${{ steps.branch-name.outputs.current_branch }} --force --quiet)" ]; then echo "E2EBRANCHNAME=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV; echo "MATCH - OK" ; elif [ -n "$(git ls-remote --heads https://github.com/mangata-finance/mangata-e2e.git ${{ github.base_ref }} --force --quiet)" ]; then echo "E2EBRANCHNAME=${{ github.base_ref }}" >> $GITHUB_ENV; echo "MATCH - OK" ; fi
46+
47+
- name: Decide if main - branch or parameter
48+
# if we have something in e2eBranch - override E2EBranchName, else -> E2EBRANCHNAME , that
49+
# by default will be main.
50+
run: echo "E2EBRANCHNAME=${{ inputs.e2eBranch || env.E2EBRANCHNAME }}" >> $GITHUB_ENV
51+
2152
- name: Checkout performance-tests
2253
uses: actions/checkout@v3
2354
with:
24-
token: ${{ secrets.DEV_TOOLS_REPO_ACCESS_TOKEN }}
25-
repository: mangata-finance/dev-tools
26-
path: dev-tools
55+
repository: mangata-finance/mangata-e2e
56+
ref: "${{ env.E2EBRANCHNAME }}"
57+
path: e2e
58+
59+
- uses: actions/setup-node@v3
60+
with:
61+
node-version: "16"
62+
cache: "yarn"
63+
cache-dependency-path: "**/yarn.lock"
2764

28-
- name: Install parachain launch
29-
working-directory: dev-tools/fill-block-with-txs
30-
run: npm install
65+
- name: Install e2e tests dependencies
66+
working-directory: e2e
67+
run: yarn
3168

3269
- name: Run performance tests
33-
working-directory: dev-tools/fill-block-with-txs
70+
working-directory: e2e/performance
3471
run: |
35-
./index.js --url "wss://node-01-ws-${{ env.ENV_REF }}.mangata.online" \
36-
--url "wss://node-02-ws-${{ env.ENV_REF }}.mangata.online" \
37-
--mnemonic ${{ secrets.E2E_TEST_SUDO_NAME }} \
38-
--txs_count 800 \
39-
--workers_count 8 \
40-
--timeout 300 \
41-
--output ../../performance-benchmark.png \
42-
--expected_throughput 300 \
43-
--number_of_blocks 50
72+
npx ts-node index.ts \
73+
transfer \
74+
nodes="wss://node-01-ws-${{ env.ENV_REF }}.mangata.online" \
75+
testCaseName=ConcurrentTest \
76+
pending=2000 \
77+
threadNumber=12 \
78+
duration=50 \
79+
throughput=200
4480
4581
- name: Upload reports
82+
if: always()
4683
uses: actions/upload-artifact@v3.1.1
4784
with:
48-
name: performance-benchmark
49-
path: ./performance-benchmark.png
85+
name: performance-benchmarks-report
86+
path: |
87+
./e2e/performance/report.html
88+
./e2e/performance/enqueued.txt
89+
./e2e/performance/executed.txt
90+
./e2e/performance/pending.txt
91+
92+
- name: Fix permissions on self-hosted runner
93+
if: always()
94+
run: chown -R 1100:1100 $GITHUB_WORKSPACE

0 commit comments

Comments
 (0)