File tree Expand file tree Collapse file tree 4 files changed +38
-6
lines changed
Expand file tree Collapse file tree 4 files changed +38
-6
lines changed Original file line number Diff line number Diff line change 7777 rustup toolchain remove 1.63 1.64 1.65
7878 cargo hack check --rust-version --workspace --locked
7979 cargo uninstall cargo-hack
80- - uses : taiki-e/install-action@cargo-hack
81- - uses : taiki-e/install-action@cargo-minimal-versions
80+ - uses : taiki-e/install-action@v2
81+ with :
82+ tool : cargo-hack,cargo-minimal-versions
83+ fallback : none
8284 - run : cargo hack build --workspace --no-private --feature-powerset --no-dev-deps
8385 - run : cargo minimal-versions build --workspace --no-private --detach-path-deps=skip-exact --all-features
8486 - run : cargo minimal-versions build --workspace --no-private --detach-path-deps=skip-exact --all-features --direct
Original file line number Diff line number Diff line change @@ -84,11 +84,21 @@ jobs:
8484 - run : |
8585 IFS=$'\n\t'
8686 trap -- 's=$?; printf >&2 "%s\n" "${0##*/}:${LINENO}: \`${BASH_COMMAND}\` exit with ${s}"; exit ${s}' ERR
87+ retry() {
88+ for i in {1..10}; do
89+ if "$@"; then
90+ return 0
91+ else
92+ sleep "${i}"
93+ fi
94+ done
95+ "$@"
96+ }
8797 bail() {
8898 printf '::error::%s\n' "$*"
8999 exit 1
90100 }
91- git fetch origin --tags &>/dev/null
101+ retry git fetch origin --tags &>/dev/null
92102 git checkout "${REF}"
93103 # Make sure the current revision is same as release step.
94104 rev=$(git rev-parse HEAD)
Original file line number Diff line number Diff line change 22# There is binary in the workspace, but intentionally not committing lockfile.
33# See https://github.com/taiki-e/cargo-llvm-cov/pull/152#issuecomment-1107055622 for more.
44Cargo.lock
5+ mutants.out *
56
67# For platform and editor specific settings, it is recommended to add to
78# a global .gitignore file.
Original file line number Diff line number Diff line change 909909 JOB_DEFAULT_SHELL=" ${default_shell} "
910910 fi
911911 for step in $( jq -c ' .steps[]' <<< " ${job}" ) ; do
912+ uses=' '
913+ # https://github.com/vmactions: prepare, run
914+ # https://github.com/cross-platform-actions/action: run, shell
915+ # https://github.com/uraimo/run-on-arch-action: setup, install, run, shell
912916 prepare=' '
913- eval " $( jq -r ' if .run then @sh "RUN=\(.run) shell=\(.shell)" else @sh "RUN=\(.with.run) prepare=\(.with.prepare) shell=\(.with.shell)" end' <<< " ${step}" ) "
917+ setup=' '
918+ install=' '
919+ eval " $( jq -r ' if .run then @sh "RUN=\(.run) shell=\(.shell)" else @sh "uses=\(.uses) FALLBACK=\(.with.fallback) RUN=\(.with.run) prepare=\(.with.prepare) setup=\(.with.setup) install=\(.with.install) shell=\(.with.shell)" end' <<< " ${step}" ) "
920+ if [[ " ${uses} " == * /install-action@* ]]; then
921+ if [[ " ${FALLBACK} " != ' none' ]]; then
922+ error " 'fallback: none' must be set for install-action (${name} .steps[${n} ])"
923+ fi
924+ _=$(( n++ ))
925+ continue
926+ fi
914927 if [[ " ${RUN} " == ' null' ]]; then
915928 _=$(( n++ ))
916929 continue
924937 shell=' sh'
925938 fi
926939 fi
927- shellcheck_for_gha " ${RUN} " " ${shell} " " ${workflow_path} ${name} .steps[${n} ].run"
928- shellcheck_for_gha " ${prepare:- null} " ' sh' " ${workflow_path} ${name} .steps[${n} ].run"
940+ if [[ -z " ${uses} " ]]; then
941+ shellcheck_for_gha " ${RUN} " " ${shell} " " ${workflow_path} ${name} .steps[${n} ].run"
942+ else
943+ shellcheck_for_gha " ${RUN} " " ${shell} " " ${workflow_path} ${name} .steps[${n} ].with.run"
944+ fi
945+ shellcheck_for_gha " ${prepare:- null} " ' sh' " ${workflow_path} ${name} .steps[${n} ].with.prepare"
946+ shellcheck_for_gha " ${setup:- null} " " ${shell} " " ${workflow_path} ${name} .steps[${n} ].with.setup"
947+ shellcheck_for_gha " ${install:- null} " " ${shell} " " ${workflow_path} ${name} .steps[${n} ].with.install"
929948 _=$(( n++ ))
930949 done
931950 done
You can’t perform that action at this time.
0 commit comments