73
73
bash --version
74
74
ink-node --version; cargo contract --version; git --version
75
75
echo -e '[registry]\nprotocol = \"sparse\"' > /usr/local/cargo/config.toml
76
- echo \"cargo-contract-version=$(cargo +nightly contract --version)\" >> $GITHUB_OUTPUT
76
+ echo \"cargo-contract-version=$(cargo contract --version)\" >> $GITHUB_OUTPUT
77
77
78
78
spellcheck :
79
79
runs-on : ubuntu-latest
@@ -328,11 +328,13 @@ jobs:
328
328
- name : Build for RISC-V
329
329
uses : ./.github/run-container-command
330
330
if : ${{ matrix.type == 'RISCV' }}
331
+ env :
332
+ RUSTC_BOOTSTRAP : 1
331
333
with :
332
334
command : |
333
335
for crate in ${ALSO_RISCV_CRATES}; do
334
336
echo ${crate};
335
- RUSTFLAGS=\"--cfg substrate_runtime\" cargo +nightly build \
337
+ RUSTFLAGS=\"--cfg substrate_runtime\" cargo build \
336
338
--no-default-features --release \
337
339
--target ${CLIPPY_TARGET} \
338
340
--manifest-path ./crates/${crate}/Cargo.toml \
@@ -367,7 +369,7 @@ jobs:
367
369
QUICKCHECK_TESTS : 0
368
370
with :
369
371
command : |
370
- cargo +nightly nextest run --all-features --no-fail-fast --workspace --locked
372
+ cargo nextest run --all-features --no-fail-fast --workspace --locked
371
373
372
374
test-docs :
373
375
runs-on : ubuntu-latest
@@ -386,7 +388,7 @@ jobs:
386
388
uses : ./.github/init
387
389
with :
388
390
cache : true
389
- cache-directories : ${{ github.workspace}}/${{ env.CARGO_TARGET_DIR }}
391
+ cache-directories : ${{ github.workspace }}/${{ env.CARGO_TARGET_DIR }}
390
392
cache-key : ${{ matrix.type }}
391
393
392
394
- name : Test
@@ -403,7 +405,7 @@ jobs:
403
405
QUICKCHECK_TESTS : 0
404
406
with :
405
407
command : |
406
- cargo +nightly test --all-features --no-fail-fast --workspace --doc --locked
408
+ cargo test --all-features --no-fail-fast --workspace --doc --locked
407
409
408
410
test-linting :
409
411
runs-on : ubuntu-latest
@@ -422,7 +424,7 @@ jobs:
422
424
uses : ./.github/init
423
425
with :
424
426
cache : true
425
- cache-directories : ${{ github.workspace}}/${{ env.CARGO_TARGET_DIR }}
427
+ cache-directories : ${{ github.workspace }}/${{ env.CARGO_TARGET_DIR }}
426
428
cache-key : ${{ matrix.type }}
427
429
428
430
- name : Test Linting
@@ -453,7 +455,7 @@ jobs:
453
455
uses : ./.github/init
454
456
with :
455
457
cache : true
456
- cache-directories : ${{ github.workspace}}/${{ env.CARGO_TARGET_DIR }}
458
+ cache-directories : ${{ github.workspace }}/${{ env.CARGO_TARGET_DIR }}
457
459
458
460
- name : Create docs
459
461
uses : ./.github/run-container-command
@@ -463,7 +465,7 @@ jobs:
463
465
command : |
464
466
for package in $(cargo metadata --format-version 1 | jq -r '.workspace_members[]' | awk '{print $1}'); do
465
467
# Run cargo doc for each workspace member
466
- cargo +nightly doc --no-deps --all-features -p ${package}
468
+ cargo doc --no-deps --all-features -p ${package}
467
469
done
468
470
mv ${CARGO_TARGET_DIR}/doc ./crate-docs
469
471
# FIXME: remove me after CI image gets nonroot
@@ -523,6 +525,10 @@ jobs:
523
525
examples-test :
524
526
runs-on : ubuntu-latest
525
527
needs : [fmt]
528
+ strategy :
529
+ fail-fast : false
530
+ matrix :
531
+ partition : [1, 2, 3, 4]
526
532
steps :
527
533
- name : Checkout
528
534
uses : actions/checkout@v4
@@ -532,9 +538,13 @@ jobs:
532
538
- name : Initialize runner
533
539
uses : ./.github/init
534
540
with :
535
- cache : true
536
- cache-directories : ${{ github.workspace}}/${{ env.CARGO_TARGET_DIR }}
537
- cache-on-failure : true
541
+ # TODO: (@davidsemakula) Re-enable cache if we can improve its ROI,
542
+ # currently it eats up more than 65% of disk space, causing this job to run out of disk space,
543
+ # or require a very large number of partitions, and generally makes this job too flaky.
544
+ cache : false
545
+ # cache-directories: ${{ github.workspace }}/${{ env.CARGO_TARGET_DIR }}
546
+ # cache-on-failure: true
547
+ # cache-key: ${{ matrix.partition }}
538
548
539
549
- name : Test Examples
540
550
uses : ./.github/run-container-command
@@ -544,8 +554,9 @@ jobs:
544
554
with :
545
555
# Run all tests with --all-features, which will run the `e2e-tests` feature if present.
546
556
command : |
547
- scripts/for_all_contracts_exec.sh --path integration-tests --ignore internal/static-buffer --ignore internal/mapping -- \
548
- cargo +nightly test --all-features --all --manifest-path {}
557
+ scripts/for_all_contracts_exec.sh --path integration-tests --ignore internal/static-buffer --ignore internal/mapping \
558
+ --ignore public/debugging-strategies --ignore public/wildcard-selector --partition ${{ matrix.partition }}/4 -- \
559
+ cargo test --all-features --manifest-path {}
549
560
550
561
examples-test-mapping :
551
562
runs-on : ubuntu-latest
@@ -560,7 +571,7 @@ jobs:
560
571
uses : ./.github/init
561
572
with :
562
573
cache : true
563
- cache-directories : ${{ github.workspace}}/${{ env.CARGO_TARGET_DIR }}
574
+ cache-directories : ${{ github.workspace }}/${{ env.CARGO_TARGET_DIR }}
564
575
cache-on-failure : true
565
576
566
577
- name : Test Mapping Example
@@ -572,7 +583,54 @@ jobs:
572
583
INK_STATIC_BUFFER_SIZE : 256
573
584
with :
574
585
command : |
575
- cargo +nightly test --all --all-features --manifest-path integration-tests/internal/mapping/Cargo.toml
586
+ cargo test --all-features --manifest-path integration-tests/internal/mapping/Cargo.toml
587
+
588
+ # TODO: (@davidsemakula) Add back to `examples-test` job when flakiness is fixed.
589
+ examples-test-debugging-strategies :
590
+ runs-on : ubuntu-latest
591
+ needs : ci-image
592
+ steps :
593
+ - name : Checkout
594
+ uses : actions/checkout@v4
595
+ with :
596
+ fetch-depth : 1
597
+
598
+ - name : Initialize runner
599
+ uses : ./.github/init
600
+ with :
601
+ cache : true
602
+ cache-directories : ${{ github.workspace }}/${{ env.CARGO_TARGET_DIR }}
603
+ cache-on-failure : true
604
+
605
+ - name : Test Wildcard Selector Example
606
+ uses : ./.github/run-container-command
607
+ with :
608
+ command : |
609
+ cargo test --all-features --manifest-path integration-tests/public/debugging-strategies/Cargo.toml
610
+
611
+
612
+ # TODO: (@davidsemakula) Add back to `examples-test` job when flakiness is fixed.
613
+ examples-test-wildcard-selector :
614
+ runs-on : ubuntu-latest
615
+ needs : ci-image
616
+ steps :
617
+ - name : Checkout
618
+ uses : actions/checkout@v4
619
+ with :
620
+ fetch-depth : 1
621
+
622
+ - name : Initialize runner
623
+ uses : ./.github/init
624
+ with :
625
+ cache : true
626
+ cache-directories : ${{ github.workspace }}/${{ env.CARGO_TARGET_DIR }}
627
+ cache-on-failure : true
628
+
629
+ - name : Test Wildcard Selector Example
630
+ uses : ./.github/run-container-command
631
+ with :
632
+ command : |
633
+ cargo test --all-features --manifest-path integration-tests/public/wildcard-selector/Cargo.toml
576
634
577
635
examples-custom-test :
578
636
runs-on : ubuntu-latest
@@ -587,7 +645,7 @@ jobs:
587
645
uses : ./.github/init
588
646
with :
589
647
cache : true
590
- cache-directories : ${{ github.workspace}}/${{ env.CARGO_TARGET_DIR }}
648
+ cache-directories : ${{ github.workspace }}/${{ env.CARGO_TARGET_DIR }}
591
649
cache-on-failure : true
592
650
593
651
- name : Run E2E test with on-chain contract
@@ -601,12 +659,12 @@ jobs:
601
659
command : |
602
660
# run flipper E2E test with on-chain contract
603
661
ink-node -lruntime::revive=debug 2>&1 &
604
- cargo +nightly contract build --release --manifest-path integration-tests/public/flipper/Cargo.toml
605
- export CONTRACT_ADDR_HEX=$(cargo +nightly contract instantiate \
662
+ cargo contract build --release --manifest-path integration-tests/public/flipper/Cargo.toml
663
+ export CONTRACT_ADDR_HEX=$(cargo contract instantiate \
606
664
--manifest-path integration-tests/public/flipper/Cargo.toml \
607
665
--suri //Alice --args true -x -y --output-json | \
608
666
jq -r .contract | xargs subkey inspect | grep -o "0x.*" | head -n1)
609
- CONTRACTS_NODE_URL=ws://127.0.0.1:9944 cargo +nightly test \
667
+ CONTRACTS_NODE_URL=ws://127.0.0.1:9944 cargo test \
610
668
--features e2e-tests \
611
669
--manifest-path integration-tests/public/flipper/Cargo.toml \
612
670
e2e_test_deployed_contract \
@@ -624,7 +682,7 @@ jobs:
624
682
# the readme + test comments explain why `32`, in short because the tests write
625
683
# content into the buffer and want to provoke an exhaustion of the buffer.
626
684
cargo clean --manifest-path integration-tests/internal/static-buffer/Cargo.toml
627
- INK_STATIC_BUFFER_SIZE=32 cargo +nightly test --manifest-path integration-tests/internal/static-buffer/Cargo.toml --all-features
685
+ INK_STATIC_BUFFER_SIZE=32 cargo test --manifest-path integration-tests/internal/static-buffer/Cargo.toml --all-features
628
686
629
687
examples-contract-build-riscv :
630
688
runs-on : ubuntu-latest
@@ -639,7 +697,7 @@ jobs:
639
697
uses : ./.github/init
640
698
with :
641
699
cache : true
642
- cache-directories : ${{ github.workspace}}/${{ env.CARGO_TARGET_DIR }}
700
+ cache-directories : ${{ github.workspace }}/${{ env.CARGO_TARGET_DIR }}
643
701
cache-on-failure : true
644
702
645
703
- name : Extract branch name
@@ -710,7 +768,7 @@ jobs:
710
768
uses : ./.github/init
711
769
with :
712
770
cache : true
713
- cache-directories : ${{ github.workspace}}/${{ env.CARGO_TARGET_DIR }}
771
+ cache-directories : ${{ github.workspace }}/${{ env.CARGO_TARGET_DIR }}
714
772
715
773
- name : Create Examples Docs
716
774
uses : ./.github/run-container-command
@@ -751,7 +809,7 @@ jobs:
751
809
uses : ./.github/init
752
810
with :
753
811
cache : true
754
- cache-directories : ${{ github.workspace}}/${{ env.CARGO_TARGET_DIR }}
812
+ cache-directories : ${{ github.workspace }}/${{ env.CARGO_TARGET_DIR }}
755
813
756
814
- name : Fuzz
757
815
uses : ./.github/run-container-command
@@ -766,7 +824,7 @@ jobs:
766
824
for crate in ${ALL_CRATES}; do
767
825
if grep "ink-fuzz-tests =" ./crates/${crate}/Cargo.toml;
768
826
then
769
- cargo +nightly test --features ink-fuzz-tests --manifest-path ./crates/${crate}/Cargo.toml --no-fail-fast -- fuzz_ || exit_code=$?;
827
+ cargo test --features ink-fuzz-tests --manifest-path ./crates/${crate}/Cargo.toml --no-fail-fast -- fuzz_ || exit_code=$?;
770
828
all_tests_passed=$(( all_tests_passed | exit_code ));
771
829
fi
772
830
done
0 commit comments