| OLD | NEW |
| 1 <!--- | 1 <!--- |
| 2 Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 2 Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
| 3 for details. All rights reserved. Use of this source code is governed by a | 3 for details. All rights reserved. Use of this source code is governed by a |
| 4 BSD-style license that can be found in the LICENSE.md file. | 4 BSD-style license that can be found in the LICENSE.md file. |
| 5 --> | 5 --> |
| 6 | 6 |
| 7 We use a patched version of the Dart VM at the moment, because | 7 We use the DartVM for running the persistent dartino process and the testing |
| 8 * Testing is much faster using vfork() | 8 scripts. The DartVM binaries we use are declared in sha1 files which |
| 9 * The persistent process / daemon uses Unix Domain Sockets | 9 `gclient runhooks` updates. |
| 10 | |
| 11 These patches are tracked in a [branch of the Dart | |
| 12 SDK](https://github.com/dart-lang/sdk/tree/_temporary_dartino_patches). This | |
| 13 branch is the source of truth. | |
| 14 | 10 |
| 15 In order to have a single binary per OS-Arch combination, we use the | 11 In order to have a single binary per OS-Arch combination, we use the |
| 16 same Dart VM executable for driving the testing scripts and for driving | 12 same Dart VM executable for driving the testing scripts and for driving |
| 17 the persistent process. | 13 the persistent process. |
| 18 | 14 |
| 19 Please note that this changes our normally used 32-bit binary for driving the | 15 Please note that this changes our normally used 32-bit binary for driving the |
| 20 testing scripts in tools/testing/bin/... to be a 64-bit binary. | 16 testing scripts in tools/testing/bin/... to be a 64-bit binary. |
| 21 | 17 |
| 22 We built the Dart VM for the following configurations | 18 We don't build these locally, but rely on 4 builders from the client.dart |
| 23 * macos-release-x64 | 19 buildbot for building them in a controlled environment. |
| 24 * linux-release-x64 | |
| 25 * linux-release-arm | |
| 26 | 20 |
| 27 We don't build these locally, but rely on 3 buildbots for building them in | 21 Temporarily we also archive unstripped versions of the DartVM binaries in order |
| 28 a controlled environment. | 22 to help the DartVM team to debug issues. Since the unstripped binaries are not |
| 23 archived anywere they need to be fetched from these builders directly ATM: |
| 29 | 24 |
| 30 There are download links on the 3 sdk patched bots, to update the checked in | 25 * cross-arm-vm-linux-release-be |
| 31 versions download the 3 binaries and put them in the platform specific binaries | 26 * dart-sdk-linux-be |
| 32 under third_party/bin/linux/{dart,dart-arm} and third_party/bin/mac/dart. | 27 * dart-sdk-mac-be |
| 28 * dart-sdk-windows-be |
| 29 |
| 30 => Ask ricow@ or kustermann@ to do this. |
| 33 | 31 |
| 34 The binaries then need to be uploaded to GoogleCloudStorage and | 32 The binaries then need to be uploaded to GoogleCloudStorage and |
| 35 their sha1 file needs to be checked into the repository. | 33 their sha1 file needs to be checked into the repository. |
| 36 | 34 |
| 37 Before uploading one needs to ensure one has setup the correct | 35 Before uploading one needs to ensure one has setup the correct |
| 38 `BOTO_CONFIG` environment variable pointing to a valid boto file which | 36 `BOTO_CONFIG` environment variable pointing to a valid boto file which |
| 39 has permission to write to the GCS bucket. To ensure that you have | 37 has permission to write to the GCS bucket. To ensure that you have |
| 40 the right permissions you should run '`gsutil.py config` (with the | 38 the right permissions you should run '`gsutil.py config` (with the |
| 41 `gsutil.py` from `depot_tools`) and neither | 39 `gsutil.py` from `depot_tools`) and neither |
| 42 `gcloud auth login` nor `gsutil config` to make authentication work with | 40 `gcloud auth login` nor `gsutil config` to make authentication work with |
| 43 `upload_to_google_storage.py`. If you don't have access to upload ask ricow@ | 41 `upload_to_google_storage.py`. If you don't have access to upload ask ricow@ |
| 44 to change the acl. | 42 to change the acl. |
| 45 | 43 |
| 46 Then one needs to mark the binaries as executable (this executable bit will be | 44 Then one needs to mark the binaries as executable (this executable bit will be |
| 47 preserved when downloading the binaries again -- it is stored via metadata on | 45 preserved when downloading the binaries again -- it is stored via metadata on |
| 48 the GCS objects). 'chmod +x' on the files before uploading. | 46 the GCS objects). 'chmod +x' on the files before uploading. |
| 49 | 47 |
| 50 Afterwards the binaries can be uploaded. | 48 Afterwards the binaries can be uploaded. |
| 51 | 49 |
| 52 ``` | 50 ``` |
| 53 cd third_party/bin/linux | 51 cd third_party/bin/linux |
| 54 upload_to_google_storage.py -b dartino-dependencies dart | 52 upload_to_google_storage.py -b dartino-dependencies dart |
| 55 cp dart.sha1 ../../../tools/testing/bin/linux/dart.sha1 | 53 cp dart.sha1 ../../../tools/testing/bin/linux/dart.sha1 |
| 56 upload_to_google_storage.py -b dartino-dependencies dart-arm | 54 upload_to_google_storage.py -b dartino-dependencies dart-arm |
| 57 cp dart-arm.sha1 ../../../tools/testing/bin/linux/dart-arm.sha1 | 55 cp dart-arm.sha1 ../../../tools/testing/bin/linux/dart-arm.sha1 |
| 58 cd ../mac | 56 cd ../mac |
| 59 upload_to_google_storage.py -b dartino-dependencies dart | 57 upload_to_google_storage.py -b dartino-dependencies dart |
| 60 cp dart.sha1 ../../../tools/testing/bin/mac/dart.sha1 | 58 cp dart.sha1 ../../../tools/testing/bin/mac/dart.sha1 |
| 59 cd ../win |
| 60 upload_to_google_storage.py -b dartino-dependencies dart.exe |
| 61 cp dart.sha1 ../../../tools/testing/bin/win/dart.exe.sha1 |
| 61 ``` | 62 ``` |
| 62 | 63 |
| 63 The sha1 files need to be checked into the repository at | 64 The sha1 files need to be checked into the repository at |
| 64 * `third_party/bin/linux/dart.sha1` | 65 * `third_party/bin/linux/dart.sha1` |
| 65 * `third_party/bin/linux/dart-arm.sha1` | 66 * `third_party/bin/linux/dart-arm.sha1` |
| 66 * `third_party/bin/mac/dart.sha1` | 67 * `third_party/bin/mac/dart.sha1` |
| 68 * `third_party/bin/win/dart.exe.sha1` |
| 67 * `tools/testing/bin/linux/dart.sha1` | 69 * `tools/testing/bin/linux/dart.sha1` |
| 68 * `tools/testing/bin/linux/dart-arm.sha1` | 70 * `tools/testing/bin/linux/dart-arm.sha1` |
| 69 * `tools/testing/bin/mac/dart.sha1` | 71 * `tools/testing/bin/mac/dart.sha1` |
| 72 * `tools/testing/bin/win/dart.exe.sha1` |
| 70 | 73 |
| 71 It is highly recommended to test that everything worked, by | 74 It is highly recommended to test that everything worked, by |
| 72 * ensuring only sha1 files have been changed | 75 * ensuring only sha1 files have been changed |
| 73 * deleting the binaries | 76 * deleting the binaries |
| 74 * re-running `gclient runhooks` to download new binaries | 77 * re-running `gclient runhooks` to download new binaries |
| 75 * building & running ./tools/test.py | 78 * building & running ./tools/test.py |
| OLD | NEW |