Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit ac95267

Browse files
nturgutchristopherfujino
andauthored
fixing cirrus flag issue (#20068)
Co-authored-by: Christopher Fujino <[email protected]>
1 parent c88d6b2 commit ac95267

File tree

3 files changed

+12
-40
lines changed

3 files changed

+12
-40
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
gcp_credentials: ENCRYPTED[987a78af29b91ce8489594c9ab3fec21845bbe5ba68294b8f6def3cf0d380830f06687a89ea69c87344c5ade369700fe]
22

33
web_shard_template: &WEB_SHARD_TEMPLATE
4-
only_if: "changesInclude('.cirrus.yml', 'DEPS', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''"
4+
only_if: "changesInclude('tools/clone_flutter.sh', '.cirrus.yml', 'DEPS', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''"
55
environment:
66
# As of March 2020, the Web shards needed 16G of RAM and 4 CPUs to run all framework tests with goldens without flaking.
77
CPU: 4

ci/format.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ else
4040
fi;
4141

4242

43-
BASE_SHA="$(git fetch $UPSTREAM master > /dev/null 2>&1 && \
43+
BASE_SHA="$(git fetch $UPSTREAM flutter-1.20-candidate.7 > /dev/null 2>&1 && \
4444
(git merge-base --fork-point FETCH_HEAD HEAD || git merge-base FETCH_HEAD HEAD))"
4545
# Disable glob matching otherwise a file in the current directory that matches
4646
# $CLANG_FILETYPES will cause git to query for that exact file instead of doing

tools/clone_flutter.sh

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,16 @@ fi
1616
# Go to the engine git repo to get the date of the latest commit.
1717
cd $ENGINE_PATH/src/flutter
1818

19-
# Special handling of release branches.
20-
ENGINE_BRANCH_NAME=$CIRRUS_BASE_BRANCH
21-
versionregex="^v[[:digit:]]+\."
22-
releasecandidateregex="^flutter-[[:digit:]]+\.[[:digit:]]+-candidate\.[[:digit:]]+$"
23-
ON_RELEASE_BRANCH=false
19+
# Special handling of release branches. We would like to run the tests against
20+
# the release branch of flutter.
21+
#
22+
# This is a shortcut for the release branch, since we didn't address this part
23+
# in LUCI yet.
24+
ENGINE_BRANCH_NAME="flutter-1.20-candidate.7"
25+
26+
ON_RELEASE_BRANCH=true
27+
echo "release branch $ENGINE_BRANCH_NAME"
2428
echo "Engine on branch $ENGINE_BRANCH_NAME"
25-
if [[ $ENGINE_BRANCH_NAME =~ $versionregex || $ENGINE_BRANCH_NAME =~ $releasecandidateregex ]]
26-
then
27-
echo "release branch $ENGINE_BRANCH_NAME"
28-
ON_RELEASE_BRANCH=true
29-
fi
30-
31-
# Get latest commit's time for the engine repo.
32-
# Use date based on local time otherwise timezones might get mixed.
33-
LATEST_COMMIT_TIME_ENGINE=`git log -1 --date=local --format="%cd"`
34-
echo "Latest commit time on engine found as $LATEST_COMMIT_TIME_ENGINE"
3529

3630
# Check if there is an argument added for repo location.
3731
# If not use the location that should be set by Cirrus/LUCI.
@@ -53,27 +47,5 @@ else
5347
fi
5448

5549
# Clone the Flutter Framework.
56-
git clone https://github.com/flutter/flutter.git
50+
git clone https://github.com/flutter/flutter.git -b "$ENGINE_BRANCH_NAME"
5751
cd flutter
58-
59-
FRAMEWORK_BRANCH_NAME=`git branch | grep '*' | cut -d ' ' -f2`
60-
if [[ "$ON_RELEASE_BRANCH" = true && ENGINE_BRANCH_NAME != FRAMEWORK_BRANCH_NAME ]]
61-
then
62-
echo "For a release framework and engine should be on the same version."
63-
echo "Switching branches on Framework to from $FRAMEWORK_BRANCH_NAME to $ENGINE_BRANCH_NAME"
64-
# Switch to the same version branch with the engine.
65-
# If same version branch does not exits, fail.
66-
SWITCH_RESULT=`git checkout $ENGINE_BRANCH_NAME` || true
67-
if [[ -z "$SWITCH_RESULT" ]]
68-
then
69-
echo "$ENGINE_BRANCH_NAME Branch not found on framework. Quit."
70-
exit 1
71-
fi
72-
fi
73-
74-
# Get the time of the youngest commit older than engine commit.
75-
# Git log uses commit date not the author date.
76-
# Before makes the comparison considering the timezone as well.
77-
COMMIT_NO=`git log --before="$LATEST_COMMIT_TIME_ENGINE" -n 1 | grep commit | cut -d ' ' -f2`
78-
echo "Using the flutter/flutter commit $COMMIT_NO";
79-
git reset --hard $COMMIT_NO

0 commit comments

Comments
 (0)