1cb93a386Sopenharmony_ci# Building SKQP for Fuchsia
2cb93a386Sopenharmony_ciUsing an arm64 device as an example, to build skqp for Fuchsia:
3cb93a386Sopenharmony_ci```
4cb93a386Sopenharmony_cign gen out/fuchsia-arm64 --args="is_official_build=false is_debug=false skia_update_fuchsia_sdk=true target_cpu=\"arm64\" target_os=\"fuchsia\" using_fuchsia_sdk=true skia_tools_require_resources=true skia_skqp_global_error_tolerance=8"
5cb93a386Sopenharmony_ci```
6cb93a386Sopenharmony_ci
7cb93a386Sopenharmony_ciThe effect of `skia_update_fuchsia_sdk=true` is that it will download both the Fuchsia SDK and a compatible clang for building SKQP as part of the `gn gen ...` step above.
8cb93a386Sopenharmony_ci
9cb93a386Sopenharmony_ciNext step, compile skqp for Fuchsia:
10cb93a386Sopenharmony_ci```
11cb93a386Sopenharmony_ciautoninja -C out/fuchsia-arm64 ":skqp_repo"
12cb93a386Sopenharmony_ci```
13cb93a386Sopenharmony_ci
14cb93a386Sopenharmony_ciThe effect of this build will be to produce a Fuchsia package repository named `skqp_repo` in the `out` directory of the build.  `skqp_repo` can then be served to a Fuchsia device using `//fuchsia/sdk/tools/pm serve -repo skqp_repo` (where // is the skia build root).
15cb93a386Sopenharmony_ci
16cb93a386Sopenharmony_ciSee [install fuchsia packages](https://fuchsia.dev/fuchsia-src/development/sdk/documentation/packages#install-package) for more on serving packages to Fuchsia devices.
17cb93a386Sopenharmony_ci
18cb93a386Sopenharmony_ci# Fuchsia CIPD Package Creation and Upload Procedure
19cb93a386Sopenharmony_ciThese steps assume the creation of the arm64 CIPD package as an example.  Because the package requires a path from the output directory of the build, the `gn gen` arguments must match the prescribed path declared in `cipd_arm64.yaml` in order for this CIPD package creation and upload to succeed.
20cb93a386Sopenharmony_ci
21cb93a386Sopenharmony_ci## Create CIPD Package
22cb93a386Sopenharmony_ci```
23cb93a386Sopenharmony_cicipd create -pkg-def=cipd_arm64.yaml
24cb93a386Sopenharmony_ci```
25cb93a386Sopenharmony_ci
26cb93a386Sopenharmony_ci## Set CIPD Ref of `latest`
27cb93a386Sopenharmony_ciIf applicable, set `latest` ref to new CIPD package.
28cb93a386Sopenharmony_ci```
29cb93a386Sopenharmony_cicipd set-ref skia/fuchsia/skqp/arch/arm64 -ref latest -version mdhS7sryb2zxQuXT803Dv_XZ0r7B5j8jSbZmIi0JvOcC
30cb93a386Sopenharmony_ci```
31cb93a386Sopenharmony_ci
32cb93a386Sopenharmony_ci## Set the git-commit Tag
33cb93a386Sopenharmony_ci```
34cb93a386Sopenharmony_cicipd set-tag skia/fuchsia/skqp/arch/arm64 -tag=git-commit:9c2b7cfe9080c6c4692234667a671db216a2e229 -version mdhS7sryb2zxQuXT803Dv_XZ0r7B5j8jSbZmIi0JvOcC
35cb93a386Sopenharmony_ci```
36