Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
72926bdf
Unverified
Commit
72926bdf
authored
Nov 29, 2018
by
Dan Field
Committed by
GitHub
Nov 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Smoke test building IPA and APK on supported platforms (#24601)
* build tests - AOT on all, APK on Linux, IPA on Mac
parent
c80244d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
15 deletions
+85
-15
.cirrus.yml
.cirrus.yml
+21
-2
test.dart
dev/bots/test.dart
+64
-13
No files found.
.cirrus.yml
View file @
72926bdf
...
...
@@ -38,6 +38,7 @@ task:
-
analyze
-
tests-linux
-
tool_tests-linux
-
build_tests-linux
env
:
SHARD
:
deploy_gallery
GOOGLE_DEVELOPER_SERVICE_ACCOUNT_ACTOR_FASTLANE
:
ENCRYPTED[d9ac1462c3c556fc2f8165c9d5566a16497d8ebc38a50357f7f3abf136b7f83e1d1d76dde36fee356cb0f9ebf7a89346]
...
...
@@ -62,9 +63,9 @@ task:
container
:
cpu
:
4
memory
:
12G
-
name
:
aot_
build_tests-linux
-
name
:
build_tests-linux
env
:
SHARD
:
aot_
build_tests
SHARD
:
build_tests
test_script
:
-
dart ./dev/bots/test.dart
container
:
...
...
@@ -110,6 +111,12 @@ task:
-
name
:
tool_tests-windows
env
:
SHARD
:
tool_tests
-
name
:
build_tests-windows
env
:
SHARD
:
build_tests
container
:
cpu
:
4
memory
:
12G
task
:
use_compute_credits
:
$CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
...
...
@@ -121,6 +128,7 @@ task:
-
analyze
-
tests-macos
-
tool_tests-macos
-
build_tests-macos
env
:
# Name the SDK directory to include a space so that we constantly
# test path names with spaces in them.
...
...
@@ -153,6 +161,8 @@ task:
-
analyze
env
:
CIRRUS_WORKING_DIR
:
"
/tmp/flutter
sdk"
install_cocoapods_script
:
-
sudo gem install cocoapods
git_fetch_script
:
-
git fetch origin
-
git fetch origin master
# To set FETCH_HEAD for "git merge-base" to work
...
...
@@ -178,6 +188,14 @@ task:
-
name
:
tool_tests-macos
env
:
SHARD
:
tool_tests
-
name
:
build_tests-macos
env
:
SHARD
:
build_tests
COCOAPODS_DISABLE_STATS
:
true
FLUTTER_FRAMEWORK_DIR
:
"
/tmp/flutter
sdk/bin/cache/artifacts/engine/ios/"
container
:
cpu
:
4
memory
:
12G
docker_builder
:
...
...
@@ -190,6 +208,7 @@ docker_builder:
-
analyze
-
tests-linux
-
tool_tests-linux
-
build_tests-linux
build_script
:
"
$CIRRUS_WORKING_DIR/dev/ci/docker_linux/docker_build.sh"
login_script
:
"
$CIRRUS_WORKING_DIR/dev/ci/docker_linux/docker_login.sh"
push_script
:
"
$CIRRUS_WORKING_DIR/dev/ci/docker_linux/docker_push.sh"
...
...
dev/bots/test.dart
View file @
72926bdf
...
...
@@ -21,7 +21,7 @@ final List<String> flutterTestArgs = <String>[];
const
Map
<
String
,
ShardRunner
>
_kShards
=
<
String
,
ShardRunner
>{
'tests'
:
_runTests
,
'tool_tests'
:
_runToolTests
,
'
aot_build_tests'
:
_runAot
BuildTests
,
'
build_tests'
:
_run
BuildTests
,
'coverage'
:
_runCoverage
,
};
...
...
@@ -150,25 +150,76 @@ Future<void> _runToolTests() async {
print
(
'
${bold}
DONE: All tests successful.
$reset
'
);
}
/// Verifies that AOT builds of some examples apps finish
/// without crashing. It does not actually launch the AOT-built
/// apps. That happens later in the devicelab. This is just
/// a smoke-test.
Future
<
void
>
_runAotBuildTests
()
async
{
await
_flutterBuildAot
(
path
.
join
(
'examples'
,
'hello_world'
));
await
_flutterBuildAot
(
path
.
join
(
'examples'
,
'flutter_gallery'
));
await
_flutterBuildAot
(
path
.
join
(
'examples'
,
'flutter_view'
));
/// Verifies that AOT, APK, and IPA (if on macOS) builds of some
/// examples apps finish without crashing. It does not actually
/// launch the apps. That happens later in the devicelab. This is
/// just a smoke-test. In particular, this will verify we can build
/// when there are spaces in the path name for the Flutter SDK and
/// target app.
Future
<
void
>
_runBuildTests
()
async
{
final
List
<
String
>
paths
=
<
String
>[
path
.
join
(
'examples'
,
'hello_world'
),
path
.
join
(
'examples'
,
'flutter_gallery'
),
path
.
join
(
'examples'
,
'flutter_view'
),
];
for
(
String
path
in
paths
)
{
await
_flutterBuildAot
(
path
);
await
_flutterBuildApk
(
path
);
await
_flutterBuildIpa
(
path
);
}
print
(
'
${bold}
DONE: All build tests successful.
$reset
'
);
}
Future
<
void
>
_flutterBuildAot
(
String
relativePathToApplication
)
async
{
print
(
'Running AOT build tests...'
);
await
runCommand
(
flutter
,
<
String
>[
'build'
,
'aot'
,
'-v'
],
workingDirectory:
path
.
join
(
flutterRoot
,
relativePathToApplication
),
expectNonZeroExit:
false
,
timeout:
_kShortTimeout
,
);
print
(
'Done.'
);
}
print
(
'
${bold}
DONE: All AOT build tests successful.
$reset
'
);
Future
<
void
>
_flutterBuildApk
(
String
relativePathToApplication
)
async
{
// TODO(dnfield): See if we can get Android SDK on all Cirrus platforms.
if
(
Platform
.
environment
[
'ANDROID_HOME'
]?.
isEmpty
??
true
)
{
return
;
}
print
(
'Running APK build tests...'
);
await
runCommand
(
flutter
,
<
String
>[
'build'
,
'apk'
,
'--debug'
,
'-v'
],
workingDirectory:
path
.
join
(
flutterRoot
,
relativePathToApplication
),
expectNonZeroExit:
false
,
timeout:
_kShortTimeout
,
);
print
(
'Done.'
);
}
Future
<
void
>
_flutterBuildAot
(
String
relativePathToApplication
)
{
return
runCommand
(
flutter
,
<
String
>[
'build'
,
'aot'
],
Future
<
void
>
_flutterBuildIpa
(
String
relativePathToApplication
)
async
{
if
(!
Platform
.
isMacOS
)
{
return
;
}
print
(
'Running IPA build tests...'
);
// Install Cocoapods. We don't have these checked in for the examples,
// and build ios doesn't take care of it automatically.
final
File
podfile
=
File
(
path
.
join
(
flutterRoot
,
relativePathToApplication
,
'ios'
,
'Podfile'
));
if
(
podfile
.
existsSync
())
{
await
runCommand
(
'pod'
,
<
String
>[
'install'
],
workingDirectory:
podfile
.
parent
.
path
,
expectNonZeroExit:
false
,
timeout:
_kShortTimeout
,
);
}
await
runCommand
(
flutter
,
<
String
>[
'build'
,
'ios'
,
'--no-codesign'
,
'--debug'
,
'-v'
],
workingDirectory:
path
.
join
(
flutterRoot
,
relativePathToApplication
),
expectNonZeroExit:
false
,
timeout:
_kShortTimeout
,
);
print
(
'Done.'
);
}
Future
<
void
>
_runTests
()
async
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment