Turn back on macOS shard Cirrus caching (#50496)
This commit is contained in:
parent
fa44a1cf37
commit
e002698c35
23
.cirrus.yml
23
.cirrus.yml
@ -438,8 +438,6 @@ task:
|
|||||||
- dart --enable-asserts dev\customer_testing\run_tests.dart --skip-on-fetch-failure --skip-template bin/cache/pkg/tests/registry/*.test
|
- dart --enable-asserts dev\customer_testing\run_tests.dart --skip-on-fetch-failure --skip-template bin/cache/pkg/tests/registry/*.test
|
||||||
|
|
||||||
# MACOS SHARDS
|
# MACOS SHARDS
|
||||||
# Mac doesn't use caches because they apparently take longer to populate and save
|
|
||||||
# than just fetching the data in the first place.
|
|
||||||
task:
|
task:
|
||||||
osx_instance:
|
osx_instance:
|
||||||
image: catalina-flutter # see https://cirrus-ci.org/guide/macOS/ for list of images (we should update regularly)
|
image: catalina-flutter # see https://cirrus-ci.org/guide/macOS/ for list of images (we should update regularly)
|
||||||
@ -452,6 +450,21 @@ task:
|
|||||||
COCOAPODS_DISABLE_STATS: true
|
COCOAPODS_DISABLE_STATS: true
|
||||||
CPU: 2
|
CPU: 2
|
||||||
MEMORY: 8G
|
MEMORY: 8G
|
||||||
|
all_flutter_cache:
|
||||||
|
folder: bin/cache/
|
||||||
|
fingerprint_script: echo $OS; cat bin/internal/*.version
|
||||||
|
populate_script:
|
||||||
|
- git fetch origin
|
||||||
|
- git fetch origin master # To set FETCH_HEAD, so that "git merge-base" works.
|
||||||
|
- flutter precache
|
||||||
|
- flutter doctor -v
|
||||||
|
pub_cache:
|
||||||
|
folder: $HOME/.pub-cache
|
||||||
|
fingerprint_script: echo $OS; grep -r --include=pubspec.yaml 'PUBSPEC CHECKSUM' "$CIRRUS_WORKING_DIR"
|
||||||
|
populate_script:
|
||||||
|
- git fetch origin
|
||||||
|
- git fetch origin master # To set FETCH_HEAD, so that "git merge-base" works.
|
||||||
|
- flutter update-packages
|
||||||
setup_script:
|
setup_script:
|
||||||
- date
|
- date
|
||||||
- which flutter
|
- which flutter
|
||||||
@ -463,7 +476,7 @@ task:
|
|||||||
- git fetch origin master # To set FETCH_HEAD, so that "git merge-base" works.
|
- git fetch origin master # To set FETCH_HEAD, so that "git merge-base" works.
|
||||||
- flutter config --no-analytics
|
- flutter config --no-analytics
|
||||||
- flutter doctor -v
|
- flutter doctor -v
|
||||||
- flutter update-packages
|
- flutter update-packages --offline
|
||||||
- date
|
- date
|
||||||
- which flutter
|
- which flutter
|
||||||
on_failure:
|
on_failure:
|
||||||
@ -575,7 +588,9 @@ task:
|
|||||||
script:
|
script:
|
||||||
- ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
|
- ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
|
||||||
- dart --enable-asserts ./dev/bots/codesign.dart
|
- dart --enable-asserts ./dev/bots/codesign.dart
|
||||||
|
cleanup_before_cache_upload_script:
|
||||||
|
# Remove volatile file to avoid unnecessary Cirrus cache invalidation.
|
||||||
|
- rm -f bin/cache/flutter_version_check.stamp
|
||||||
docker_builder:
|
docker_builder:
|
||||||
# Only build a new docker image when we tag a release (for dev, beta, or
|
# Only build a new docker image when we tag a release (for dev, beta, or
|
||||||
# stable). Note: tagging a commit and pushing to a release branch are
|
# stable). Note: tagging a commit and pushing to a release branch are
|
||||||
|
@ -75,6 +75,12 @@ class UpdatePackagesCommand extends FlutterCommand {
|
|||||||
help: 'verifies the package checksum without changing or updating deps',
|
help: 'verifies the package checksum without changing or updating deps',
|
||||||
defaultsTo: false,
|
defaultsTo: false,
|
||||||
negatable: false,
|
negatable: false,
|
||||||
|
)
|
||||||
|
..addFlag(
|
||||||
|
'offline',
|
||||||
|
help: 'Use cached packages instead of accessing the network',
|
||||||
|
defaultsTo: false,
|
||||||
|
negatable: false,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,6 +135,13 @@ class UpdatePackagesCommand extends FlutterCommand {
|
|||||||
final bool isPrintTransitiveClosure = boolArg('transitive-closure');
|
final bool isPrintTransitiveClosure = boolArg('transitive-closure');
|
||||||
final bool isVerifyOnly = boolArg('verify-only');
|
final bool isVerifyOnly = boolArg('verify-only');
|
||||||
final bool isConsumerOnly = boolArg('consumer-only');
|
final bool isConsumerOnly = boolArg('consumer-only');
|
||||||
|
final bool offline = boolArg('offline');
|
||||||
|
|
||||||
|
if (upgrade && offline) {
|
||||||
|
throwToolExit(
|
||||||
|
'--force-upgrade cannot be used with the --offline flag'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// "consumer" packages are those that constitute our public API (e.g. flutter, flutter_test, flutter_driver, flutter_localizations).
|
// "consumer" packages are those that constitute our public API (e.g. flutter, flutter_test, flutter_driver, flutter_localizations).
|
||||||
if (isConsumerOnly) {
|
if (isConsumerOnly) {
|
||||||
@ -268,6 +281,7 @@ class UpdatePackagesCommand extends FlutterCommand {
|
|||||||
directory: tempDir.path,
|
directory: tempDir.path,
|
||||||
upgrade: true,
|
upgrade: true,
|
||||||
checkLastModified: false,
|
checkLastModified: false,
|
||||||
|
offline: offline,
|
||||||
);
|
);
|
||||||
// Then we run "pub deps --style=compact" on the result. We pipe all the
|
// Then we run "pub deps --style=compact" on the result. We pipe all the
|
||||||
// output to tree.fill(), which parses it so that it can create a graph
|
// output to tree.fill(), which parses it so that it can create a graph
|
||||||
@ -335,7 +349,12 @@ class UpdatePackagesCommand extends FlutterCommand {
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
for (final Directory dir in packages) {
|
for (final Directory dir in packages) {
|
||||||
await pub.get(context: PubContext.updatePackages, directory: dir.path, checkLastModified: false);
|
await pub.get(
|
||||||
|
context: PubContext.updatePackages,
|
||||||
|
directory: dir.path,
|
||||||
|
checkLastModified: false,
|
||||||
|
offline: offline,
|
||||||
|
);
|
||||||
count += 1;
|
count += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user