Skip to content

Commit

Permalink
wip OK skip flutter --version
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice committed Oct 3, 2023
1 parent f68854f commit 5f635c3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ jobs:
- name: Download Flutter SDK artifacts (flutter precache)
run: flutter precache --universal

# This step seems to typically take like 30 seconds. That's a bit
# puzzling, given that we've already run `flutter precache`.
# If this step is left off, though, then the `flutter --version`
# inside `tools/check --verbose` spends that time instead.
# So it seems that `flutter --version` computes something
# which is slow (on GitHub's slow worker VMs) but cacheable.
- name: Compute Flutter version
run: flutter --version

- name: Download our dependencies (flutter pub get)
run: flutter pub get

Expand Down
23 changes: 17 additions & 6 deletions tools/check
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,26 @@ EOF
shellcheck -x --shell=bash -- "${targets[@]}"
}

describe_git_head() {
local name="$1" repo_path="$2"
local commit_data
commit_data=$(
TZ=UTC \
git --git-dir "${repo_path}" \
log -1 --format="%h • %cd" \
--abbrev=9 --date=iso8601-local
)
echo "${name} ${commit_data}"
}

if [ -n "${opt_verbose}" ]; then
echo "Test command: ${orig_cmdline}"
echo "Time now: $(date --utc +'%F %T %z')"
echo
commit_id=$(git log -1 --format=%h --abbrev=9)
commit_time=$(TZ=UTC git log -1 --format=%cd --date=iso8601-local)
echo "zulip-flutter ${commit_id}${commit_time}"
echo
flutter --version
describe_git_head "zulip-flutter" .git/
flutter_executable=$(readlink -f "$(type -p flutter)")
flutter_tree=${flutter_executable%/bin/flutter}
describe_git_head "flutter/flutter" "${flutter_tree}"/.git
dart --version
fi

failed=()
Expand Down

0 comments on commit 5f635c3

Please sign in to comment.