commit | be2df367bac8b09e1835b4f32ba8755938099ea1 | [log] [tgz] |
---|---|---|
author | Jiaming Li <lijiaming@google.com> | Wed May 25 18:11:16 2022 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed May 25 18:11:16 2022 +0000 |
tree | 59fddd129215107cf401e0bb9b08ed71bd7cb180 | |
parent | 4bf57a1f11d4e3a8770331936fbab1fd5fb1432c [diff] |
[mvp] Populate .build_id after cipd_manifest.json creation Change-Id: I92961c793a9561f0a7ba277831632986357a8ef5 Reviewed-on: https://fuchsia-review.googlesource.com/c/sdk-samples/fortune-teller/+/683583 Reviewed-by: Darren Chan <chandarren@google.com> Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com> Fuchsia-Auto-Submit: Jiaming Li <lijiaming@google.com>
This repository contains instructions and source code to build, package and run Fuchsia samples using only the Fuchsia SDK.
Install a Bazel version no older than the one defined in the WORKSPACE.bazel file, by following the instructions at https://bazel.build/install. In some Linux distributions, sudo apt-get install bazel
should be enough.
Make sure this repository has the required submodules:
git submodule update --recursive --init
Ensure that there are Fuchsia SSH keys in your host machine. You will need them for running the Fuchsia emulator.
[[ -f "${HOME}/.ssh/fuchsia_ed25519" ]] || ssh-keygen -P "" -t ed25519 -f "${HOME}/.ssh/fuchsia_ed25519" -C "${USER}@$(hostname -f) Shared SSH Key for Fuchsia" [[ -f "${HOME}/.ssh/fuchsia_authorized_keys" ]] || ssh-keygen -y -f "${HOME}/.ssh/fuchsia_ed25519" > "${HOME}/.ssh/fuchsia_authorized_keys"
Now the repository is ready to build the sample.
Fetch an emulator image and start an emulator
tools/ffx product-bundle get workstation.qemu-x64 tools/ffx emu start -H workstation.qemu-x64
(optional) watch the device log in a separate window
tools/ffx log
Run the fortune-teller component
bazel run --config=fuchsia_x64 //src/fortune_teller:pkg.component
Watch that your fortune is printed in the log.