@@ -51,7 +51,9 @@ commands:
51
51
echo 'export LIBRA_DUMP_LOGS=1' >> $BASH_ENV
52
52
echo 'export CARGO_INCREMENTAL=0' >> $BASH_ENV
53
53
echo 'export CI_TIMEOUT="timeout 40m"' >> $BASH_ENV
54
- echo 'export RUST_NIGHTLY=nightly-2020-07-08' >> $BASH_ENV
54
+ export RUST_NIGHTLY=$(cat cargo-toolchain)
55
+ echo 'export RUST_NIGHTLY='${RUST_NIGHTLY} >> $BASH_ENV
56
+
55
57
install_deps :
56
58
steps :
57
59
- run :
@@ -65,11 +67,12 @@ commands:
65
67
- run :
66
68
name : Set cargo Environment
67
69
command : |
70
+ # https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#features
71
+ export CARGOFLAGS=$(cat cargo-flags)
72
+ echo 'export CARGOFLAGS='${CARGOFLAGS} >> $BASH_ENV
68
73
# Use nightly version of cargo to access the new feature resolver
69
74
echo 'export CARGO=$(rustup which --toolchain $RUST_NIGHTLY cargo)' >> $BASH_ENV
70
75
# Turn on the experimental feature resolver in cargo. See:
71
- # https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#features
72
- echo 'export CARGOFLAGS=-Zfeatures=all' >> $BASH_ENV
73
76
install_code_coverage_deps :
74
77
steps :
75
78
- run :
@@ -622,18 +625,20 @@ jobs:
622
625
- run :
623
626
name : should pre build docker images (targeting a release branch)?
624
627
command : |
625
- export RELEASE_BRANCH_PATTERN='^v[0-9]+-release$'
626
- export TEST_BRANCH_PATTERN="^testflow[0-9]+$"
627
628
export commit_message=$( git log -1 --pretty=%B )
628
629
export pr_num=`echo "$commit_message" | tail -2 | head -1 | sed 's/Closes: #//'`
629
630
if [ -z $pr_num ]; then
630
631
echo "Did not find pull request num in commit message. -\\_(O_o)_/-";
631
632
exit 1
632
633
fi
633
634
curl -o /tmp/pr https://api.github.com/repos/libra/libra/pulls/${pr_num}
634
- export TARGET_BRANCH=$( cat /tmp/pr | jq ".base .ref" | sed 's/"//g' )
635
- if [[ $TARGET_BRANCH =~ $RELEASE_BRANCH_PATTERN ]] || [[ $TARGET_BRANCH =~ $TEST_BRANCH_PATTERN ]]; then
636
- export BRANCH=$TARGET_BRANCH
635
+ export BRANCH=$( cat /tmp/pr | jq ".base .ref" | sed 's/"//g' )
636
+
637
+ export IS_RELEASE=$( if [[ "$BRANCH" =~ "^v[0-9|.]+-release$" ]]; then echo true; else echo false; fi )
638
+ export IS_TEST=$( if [[ "$BRANCH" =~ "^testflow[0-9|.]+$" ]]; then echo true; else echo false; fi )
639
+ export IS_PRE_RELEASE=$( if [[ "$BRANCH" =~ "^premainnet-[0-9|.]+$" ]]; then echo true; else echo false; fi )
640
+
641
+ if [[ $IS_RELEASE || $IS_TEST || $IS_PRE_RELEASE ]] ; then
637
642
echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
638
643
docker/update_or_build.sh -u -p -b ${BRANCH} -n client
639
644
docker/update_or_build.sh -u -p -b ${BRANCH} -n init
@@ -679,16 +684,18 @@ workflows:
679
684
ignore :
680
685
- gh-pages
681
686
- master
682
- - /^testflow[\d]+$/
683
- - /^v[\d]+-release$/
687
+ - /^testflow[\d|.]+$/
688
+ - /^premainnet-[\d|.]+$/
689
+ - /^v[\d|.]+-release$/
684
690
- terraform :
685
691
filters :
686
692
branches :
687
693
ignore :
688
694
- gh-pages
689
695
- master
690
- - /^testflow[\d]+$/
691
- - /^v[\d]+-release$/
696
+ - /^testflow[\d|.]+$/
697
+ - /^premainnet-[\d|.]+$/
698
+ - /^v[\d|.]+-release$/
692
699
- prefetch-crates
693
700
- lint :
694
701
requires :
@@ -697,8 +704,9 @@ workflows:
697
704
branches :
698
705
ignore :
699
706
- gh-pages
700
- - /^testflow[\d]+$/
701
- - /^v[\d]+-release$/
707
+ - /^testflow[\d|.]+$/
708
+ - /^premainnet-0.[\d|.]+$/
709
+ - /^v[\d|.]+-release$/
702
710
- build-dev :
703
711
requires :
704
712
- prefetch-crates
@@ -707,8 +715,9 @@ workflows:
707
715
ignore :
708
716
- gh-pages
709
717
- master
710
- - /^testflow[\d]+$/
711
- - /^v[\d]+-release$/
718
+ - /^testflow[\d|.]+$/
719
+ - /^premainnet-[\d|.]+$/
720
+ - /^v[\d|.]+-release$/
712
721
- build-release :
713
722
requires :
714
723
- prefetch-crates
@@ -717,8 +726,9 @@ workflows:
717
726
ignore :
718
727
- gh-pages
719
728
- master
720
- - /^testflow[\d]+$/
721
- - /^v[\d]+-release$/
729
+ - /^testflow[\d|.]+$/
730
+ - /^premainnet-[\d|.]+$/
731
+ - /^v[\d|.]+-release$/
722
732
- run-e2e-test :
723
733
requires :
724
734
- prefetch-crates
@@ -727,8 +737,9 @@ workflows:
727
737
ignore :
728
738
- gh-pages
729
739
- master
730
- - /^testflow[\d]+$/
731
- - /^v[\d]+-release$/
740
+ - /^testflow[\d|.]+$/
741
+ - /^premainnet-[\d|.]+$/
742
+ - /^v[\d|.]+-release$/
732
743
- run-unit-test :
733
744
requires :
734
745
- prefetch-crates
@@ -737,8 +748,9 @@ workflows:
737
748
ignore :
738
749
- gh-pages
739
750
- master
740
- - /^testflow[\d]+$/
741
- - /^v[\d]+-release$/
751
+ - /^testflow[\d|.]+$/
752
+ - /^premainnet-[\d|.]+$/
753
+ - /^v[\d|.]+-release$/
742
754
- run-crypto-unit-test :
743
755
requires :
744
756
- prefetch-crates
@@ -747,17 +759,19 @@ workflows:
747
759
ignore :
748
760
- gh-pages
749
761
- master
750
- - /^testflow[\d]+$/
751
- - /^v[\d]+-release$/
762
+ - /^testflow[\d|.]+$/
763
+ - /^premainnet-[\d|.]+$/
764
+ - /^v[\d|.]+-release$/
752
765
- build-docs :
753
766
requires :
754
767
- lint
755
768
filters :
756
769
branches :
757
770
ignore :
758
771
- gh-pages
759
- - /^testflow[\d]+$/
760
- - /^v[\d]+-release$/
772
+ - /^testflow[\d|.]+$/
773
+ - /^premainnet-[\d|.]+$/
774
+ - /^v[\d|.]+-release$/
761
775
- deploy-docs :
762
776
requires :
763
777
- build-docs
@@ -779,8 +793,9 @@ workflows:
779
793
filters :
780
794
branches :
781
795
only :
782
- - /^testflow[\d]+$/
783
- - /^v[\d]+-release$/
796
+ - /^testflow[\d|.]+$/
797
+ - /^premainnet-[\d|.]+$/
798
+ - /^v[\d|.]+-release$/
784
799
785
800
scheduled-workflow :
786
801
triggers :
0 commit comments