52
52
- name : Check Out Repo
53
53
uses : actions/checkout@v3
54
54
with :
55
+ token : ${{secrets.GHA_GIT_COMMIT || github.token}}
55
56
fetch-depth : 0
56
57
- name : Create Release Branch?
57
58
id : create-release-branch
@@ -120,6 +121,7 @@ jobs:
120
121
uses : actions/checkout@v3
121
122
with :
122
123
ref : ${{env.RELEASE_BRANCH_NAME}}
124
+ fetch-depth : 0
123
125
- name : Version Code
124
126
shell : bash
125
127
run : |
@@ -153,7 +155,8 @@ jobs:
153
155
matrix :
154
156
# This job intermittently fails on EKS runners and must be run on standalone until
155
157
# https://www.pivotaltracker.com/story/show/185045683 is resolved.
156
- os : [[self-hosted, Linux, X64, build]]
158
+ # os: [[self-hosted, Linux, X64, testing, v2], [self-hosted, Linux, ARM64, testing, v2]]
159
+ os : [[self-hosted, Linux, X64, testing, v2]]
157
160
network : [dev, local, rococo, mainnet]
158
161
include :
159
162
- network : dev
@@ -172,7 +175,7 @@ jobs:
172
175
spec : frequency
173
176
build-profile : release
174
177
release-file-name-prefix : frequency
175
- - os : [self-hosted, Linux, X64, build ]
178
+ - os : [self-hosted, Linux, X64, testing, v2 ]
176
179
arch : amd64
177
180
# - os: [self-hosted, Linux, ARM64]
178
181
# arch: arm64
@@ -239,6 +242,8 @@ jobs:
239
242
runtime_filename_dev : ${{steps.set-env-vars.outputs.runtime_filename_dev}}
240
243
runtime_filename_rococo : ${{steps.set-env-vars.outputs.runtime_filename_rococo}}
241
244
runtime_filename_mainnet : ${{steps.set-env-vars.outputs.runtime_filename_mainnet}}
245
+ # env:
246
+ # HOME: /root
242
247
strategy :
243
248
fail-fast : true
244
249
matrix :
@@ -334,7 +339,7 @@ jobs:
334
339
build-rust-developer-docs :
335
340
needs : version-code
336
341
name : Build Rust Developer Docs
337
- runs-on : [self-hosted, Linux, X64, build ]
342
+ runs-on : [self-hosted, Linux, X64, testing, v2 ]
338
343
container : ghcr.io/libertydsnp/frequency/ci-base-image
339
344
steps :
340
345
- name : Check Out Repo
@@ -343,9 +348,13 @@ jobs:
343
348
ref : ${{env.RELEASE_BRANCH_NAME}}
344
349
- name : Setup Pages
345
350
uses : actions/configure-pages@v3
351
+ # cargo doc requires a toolchain version ^nightly-2022-11-15 because of a bug that causes a panic
352
+ # When the toolchain is updated to ^nightly-2023-06-01, this can be removed
346
353
- name : Build Docs
347
354
run : |
348
- RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo doc --no-deps --features frequency
355
+ rustup install nightly-2023-06-01
356
+ rustup target add wasm32-unknown-unknown --toolchain nightly-2023-06-01
357
+ RUSTDOCFLAGS="--enable-index-page --check -Zunstable-options" cargo +nightly-2023-06-01 doc --no-deps --features frequency
349
358
- name : Upload Docs
350
359
uses : actions/upload-pages-artifact@v1
351
360
with :
@@ -517,40 +526,48 @@ jobs:
517
526
run : |
518
527
chmod 755 $TEST_BIN_FILENAME
519
528
chmod 755 $REF_BIN_FILENAME
529
+ - name : Docker network
530
+ run : docker network create net-${{env.RELEASE_BRANCH_NAME}}
520
531
- name : Start Test Node
521
532
working-directory : ${{env.BIN_DIR}}
522
533
run : |
523
- ./${{env.TEST_BIN_FILENAME}} \
524
- --chain=frequency-bench \
525
- --rpc-external \
526
- --rpc-cors=all \
527
- --ws-external \
528
- --rpc-methods=Unsafe \
529
- --no-telemetry \
530
- --no-prometheus \
531
- --ws-port $((9944)) \
532
- --reserved-only \
533
- --tmp \
534
- -- \
535
- --reserved-only \
536
- &
534
+ docker run -d --rm --net=net-${{env.RELEASE_BRANCH_NAME}} \
535
+ -v `pwd`:/app \
536
+ --name test-node \
537
+ ubuntu:22.04 \
538
+ /bin/sh -c "chmod +x /app/${{env.TEST_BIN_FILENAME}} && /app/${{env.TEST_BIN_FILENAME}} \
539
+ --chain=frequency-bench \
540
+ --rpc-external \
541
+ --rpc-cors=all \
542
+ --ws-external \
543
+ --rpc-methods=Unsafe \
544
+ --no-telemetry \
545
+ --no-prometheus \
546
+ --reserved-only \
547
+ --no-hardware-benchmarks \
548
+ --tmp \
549
+ -- \
550
+ --reserved-only"
537
551
- name : Start Reference Node
538
552
working-directory : ${{env.BIN_DIR}}
539
553
run : |
540
- ./${{env.REF_BIN_FILENAME}} \
541
- --chain=frequency-bench \
542
- --rpc-external \
543
- --rpc-cors=all \
544
- --ws-external \
545
- --rpc-methods=Unsafe \
546
- --no-telemetry \
547
- --no-prometheus \
548
- --ws-port $((9946)) \
549
- --reserved-only \
550
- --tmp \
551
- -- \
552
- --reserved-only \
553
- &
554
+ docker run -d --rm --net=net-${{env.RELEASE_BRANCH_NAME}} \
555
+ -v `pwd`:/app \
556
+ --name ref-node \
557
+ ubuntu:22.04 \
558
+ /bin/sh -c "chmod +x /app/${{env.REF_BIN_FILENAME}} && /app/${{env.REF_BIN_FILENAME}} \
559
+ --chain=frequency-bench \
560
+ --rpc-external \
561
+ --rpc-cors=all \
562
+ --ws-external \
563
+ --rpc-methods=Unsafe \
564
+ --no-telemetry \
565
+ --no-prometheus \
566
+ --reserved-only \
567
+ --no-hardware-benchmarks \
568
+ --tmp \
569
+ -- \
570
+ --reserved-only"
554
571
- name : Prepare Output
555
572
working-directory : ${{env.OUTPUT_DIR}}
556
573
run : |
@@ -562,8 +579,9 @@ jobs:
562
579
echo "Test version: $BIN_VERSION" >> ${{env.OUTPUT_FILENAME}}
563
580
echo "----------------------------------------------------------------------" >> ${{env.OUTPUT_FILENAME}}
564
581
- name : Compare Metadata
582
+ timeout-minutes : 10
565
583
run : |
566
- CMD="docker run --pull always --network host frequencychain /polkadot-js-tools:v0.52.29 metadata ws://localhost:9946 ws://localhost :9944"
584
+ CMD="docker run --pull always --net=net-${{env.RELEASE_BRANCH_NAME}} jacogr /polkadot-js-tools:0.55.3 metadata ws://ref-node:9944 ws://test-node :9944"
567
585
echo -e "Running:\n$CMD"
568
586
$CMD >> ${{env.OUTPUT_DIR}}/${{env.OUTPUT_FILENAME}}
569
587
sed -z -i 's/\n\n/\n/g' ${{env.OUTPUT_DIR}}/${{env.OUTPUT_FILENAME}}
@@ -585,7 +603,9 @@ jobs:
585
603
if : always()
586
604
run : |
587
605
echo "Attempting to kill all frequency processes..."
588
- pkill -9 ${{env.FREQUENCY_PROCESS_NAME}}
606
+ docker stop ref-node || true
607
+ docker stop test-node || true
608
+ docker network rm net-${{env.RELEASE_BRANCH_NAME}}
589
609
590
610
wait-for-all-builds :
591
611
needs :
0 commit comments