28
28
env :
29
29
# Image can be edited at https://github.com/use-ink/docker-images
30
30
IMAGE : useink/ci
31
- CARGO_TARGET_DIR : /ci-cache/${{ github.repository }}/targets/${{ github.ref_name }}/
31
+ CARGO_TARGET_DIR : /ci-cache/${{ github.repository }}/targets/
32
32
PURELY_STD_CRATES : ink/codegen metadata engine e2e e2e/macro ink/ir
33
33
ALSO_RISCV_CRATES : env storage storage/traits allocator prelude primitives ink ink/macro
34
34
# TODO `cargo clippy --all-targets --all-features` for this crate
@@ -352,7 +352,7 @@ jobs:
352
352
353
353
# ## workspace
354
354
355
- build :
355
+ build-std :
356
356
runs-on : ubuntu-latest
357
357
needs : [set-image, check]
358
358
defaults :
@@ -362,8 +362,6 @@ jobs:
362
362
image : ${{ needs.set-image.outputs.IMAGE }}
363
363
strategy :
364
364
fail-fast : false
365
- matrix :
366
- type : [STD, RISCV]
367
365
steps :
368
366
- name : Checkout
369
367
uses : actions/checkout@v4
@@ -380,24 +378,47 @@ jobs:
380
378
uses : ./.github/rust-info
381
379
382
380
- name : Build for STD
383
- if : ${{ matrix.type == 'STD' }}
384
381
run : |
385
382
ALL_CRATES="${PURELY_STD_CRATES} ${ALSO_RISCV_CRATES}"
386
383
for crate in ${ALL_CRATES}; do
387
384
cargo build --all-features --release --manifest-path ./crates/${crate}/Cargo.toml;
388
385
done
389
386
390
- - name : Build for RISC-V
391
- if : ${{ matrix.type == 'RISCV' }}
392
- run : |
393
- for crate in ${ALSO_RISCV_CRATES}; do
394
- echo ${crate};
395
- RUSTFLAGS="--cfg substrate_runtime" cargo +nightly build \
396
- --no-default-features --release \
397
- --target $CLIPPY_TARGET \
398
- --manifest-path ./crates/${crate}/Cargo.toml \
399
- -Zbuild-std="core,alloc";
400
- done
387
+ build-riscv :
388
+ runs-on : ubuntu-latest
389
+ needs : [set-image, check]
390
+ defaults :
391
+ run :
392
+ shell : bash
393
+ container :
394
+ image : ${{ needs.set-image.outputs.IMAGE }}
395
+ strategy :
396
+ fail-fast : false
397
+ steps :
398
+ - name : Checkout
399
+ uses : actions/checkout@v4
400
+ with :
401
+ fetch-depth : 1
402
+
403
+ - name : Cache
404
+ uses : Swatinem/rust-cache@v2
405
+ with :
406
+ cache-directories : ${{ env.CARGO_TARGET_DIR }}
407
+ cache-all-crates : true
408
+
409
+ - name : Rust Info
410
+ uses : ./.github/rust-info
411
+
412
+ - name : Build for RISC-V
413
+ run : |
414
+ for crate in ${ALSO_RISCV_CRATES}; do
415
+ echo ${crate};
416
+ RUSTFLAGS="--cfg substrate_runtime" cargo +nightly build \
417
+ --no-default-features --release \
418
+ --target $CLIPPY_TARGET \
419
+ --manifest-path ./crates/${crate}/Cargo.toml \
420
+ -Zbuild-std="core,alloc";
421
+ done
401
422
402
423
test :
403
424
runs-on : ubuntu-latest
@@ -413,7 +434,7 @@ jobs:
413
434
strategy :
414
435
fail-fast : false
415
436
matrix :
416
- partition : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]
437
+ partition : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 ]
417
438
steps :
418
439
- name : Checkout
419
440
uses : actions/checkout@v4
@@ -425,6 +446,7 @@ jobs:
425
446
with :
426
447
cache-directories : ${{ env.CARGO_TARGET_DIR }}
427
448
cache-all-crates : true
449
+ cache-on-failure : true
428
450
429
451
- name : Test
430
452
env :
@@ -437,8 +459,9 @@ jobs:
437
459
QUICKCHECK_TESTS : 0
438
460
run : |
439
461
rustup toolchain remove nightly-2025-02-20
462
+ rustup toolchain remove 1.85.0
440
463
rustup toolchain remove stable
441
- cargo +nightly nextest run --all-features --no-fail-fast --workspace --locked --jobs 1 --partition count:${{ matrix.partition }}/30
464
+ cargo +nightly nextest run --all-features --no-fail-fast --workspace --locked --jobs 1 --partition count:${{ matrix.partition }}/35
442
465
443
466
test-docs :
444
467
runs-on : ubuntu-latest
@@ -635,6 +658,7 @@ jobs:
635
658
with :
636
659
cache-directories : ${{ env.CARGO_TARGET_DIR }}
637
660
cache-all-crates : true
661
+ cache-on-failure : true
638
662
639
663
- name : Test Examples
640
664
uses : docker://useink/ci
@@ -666,6 +690,7 @@ jobs:
666
690
with :
667
691
cache-directories : ${{ env.CARGO_TARGET_DIR }}
668
692
cache-all-crates : true
693
+ cache-on-failure : true
669
694
670
695
- name : Rust Info
671
696
uses : ./.github/rust-info
@@ -703,6 +728,7 @@ jobs:
703
728
with :
704
729
cache-directories : ${{ env.CARGO_TARGET_DIR }}
705
730
cache-all-crates : true
731
+ cache-on-failure : true
706
732
707
733
- name : Rust Info
708
734
uses : ./.github/rust-info
@@ -740,7 +766,8 @@ jobs:
740
766
741
767
examples-contract-build-riscv :
742
768
runs-on : ubuntu-latest
743
- needs : [set-image, build]
769
+ needs : [set-image]
770
+ # needs: [set-image, build-std, build-riscv]
744
771
defaults :
745
772
run :
746
773
shell : bash
@@ -749,7 +776,7 @@ jobs:
749
776
strategy :
750
777
fail-fast : false
751
778
matrix :
752
- partition : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
779
+ partition : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 ]
753
780
steps :
754
781
- name : Checkout
755
782
uses : actions/checkout@v4
@@ -761,6 +788,7 @@ jobs:
761
788
with :
762
789
cache-directories : ${{ env.CARGO_TARGET_DIR }}
763
790
cache-all-crates : true
791
+ cache-on-failure : true
764
792
765
793
- name : Rust Info
766
794
uses : ./.github/rust-info
@@ -775,9 +803,10 @@ jobs:
775
803
RUSTC_BOOTSTRAP : 1
776
804
MANIFEST_PATH : " "
777
805
CONTRACT_SIZE_FILE : " measurements-${{ steps.extract_branch.outputs.branch }}/contract_size_"
806
+ CARGO_INCREMENTAL : 0
778
807
run : |
779
808
mkdir -p measurements-${{ steps.extract_branch.outputs.branch }}/
780
- scripts/for_all_contracts_exec2.sh --path integration-tests --partition ${{ matrix.partition }}/20 --ignore integration-tests/public/multi-contract-caller -- \
809
+ scripts/for_all_contracts_exec2.sh --path integration-tests --partition ${{ matrix.partition }}/30 -- \
781
810
scripts/build_and_determine_contract_size.sh {}
782
811
783
812
#bash -c "scripts/build_and_determine_contract_size.sh {} >> ${CONTRACT_SIZE_FILE} && \
@@ -823,7 +852,7 @@ jobs:
823
852
824
853
examples-docs :
825
854
runs-on : ubuntu-latest
826
- needs : [set-image, build]
855
+ needs : [set-image, build-std, build-riscv ]
827
856
defaults :
828
857
run :
829
858
shell : bash
0 commit comments