diff --git a/.ci.yaml b/.ci.yaml index e69a06d1bd..64b0626fb6 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -36,6 +36,7 @@ targets: add_recipes_cq: "true" target_file: windows_local_tests.yaml channel: master + version_file: flutter_master.version scheduler: luci - name: Windows win32-platform_tests master - packages @@ -45,6 +46,7 @@ targets: add_recipes_cq: "true" target_file: windows_build_and_platform_tests.yaml channel: master + version_file: flutter_master.version dependencies: > [ {"dependency": "vs_build"} diff --git a/.cirrus.yml b/.cirrus.yml index 8d78bb9c4f..f77c9f7fd2 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -9,15 +9,25 @@ tool_setup_template: &TOOL_SETUP_TEMPLATE flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE upgrade_flutter_script: + # Master uses a pinned, auto-rolled version to prevent out-of-band CI + # failures due to changes in Flutter. + # TODO(stuartmorgan): Investigate an autoroller for stable as well. + - TARGET_TREEISH=$CHANNEL + - if [[ "$CHANNEL" == "master" ]]; then + - TARGET_TREEISH=$(< .ci/flutter_$CHANNEL.version) + - fi # Ensure that the repository has all the branches. - cd $FLUTTER_HOME - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - git fetch origin - # Switch to the requested branch. - - git checkout $CHANNEL - # Reset to upstream branch, rather than using pull, since the base image - # can sometimes be in a state where it has diverged from upstream (!). - - git reset --hard @{u} + # Switch to the requested channel. + - git checkout $TARGET_TREEISH + # When using a branch rather than a hash, reset to the upstream branch + # rather than using pull, since the base image can sometimes be in a state + # where it has diverged from upstream (!). + - if [[ "$TARGET_TREEISH" == "$CHANNEL" ]]; then + - git reset --hard @{u} + - fi # Run doctor to allow auditing of what version of Flutter the run is using. - flutter doctor -v << : *TOOL_SETUP_TEMPLATE