| Build both objects under buck2, against the BuildBuddy cache 600f207 nandi 19d ago | 1 | load("@prelude//platforms:defs.bzl", "host_configuration") |
| 2 | load(":defs.bzl", "execution_platform") |
| 3 | |
| 4 | # Where every action runs: locally, against the BuildBuddy cache. Registered by |
| 5 | # `[build] execution_platforms` in .buckconfig — and, because a toolchain is |
| 6 | # itself a target in the prelude cell, by `[parser] target_platform_detector_spec` |
| 7 | # there too. Setting only the first leaves every rustc action on the prelude's |
| 8 | # uncached default. |
| 9 | execution_platform( |
| 10 | name = "cache", |
| 11 | cpu_configuration = host_configuration.cpu, |
| 12 | os_configuration = host_configuration.os, |
| 13 | use_windows_path_separators = host_info().os.is_windows, |
| 14 | visibility = ["PUBLIC"], |
| 15 | ) |
| Let actions run on a worker, now that there is something to send 5a37b4b nandi 19d ago | 16 | |
| 17 | # The same platform, allowed to dispatch. The properties name the worker to run |
| 18 | # on; BuildBuddy matches an action against its executor pool by these. |
| 19 | execution_platform( |
| 20 | name = "remote", |
| 21 | cpu_configuration = host_configuration.cpu, |
| 22 | os_configuration = host_configuration.os, |
| 23 | remote_enabled = True, |
| 24 | remote_execution_properties = { |
| 25 | "OSFamily": "Linux", |
| Carry the worker's own image, rather than borrow one that had the parts 089e6f7 nandi 18d ago | 26 | # This project's own image, built by .gitlab-ci.yml from ci/rbe.Dockerfile |
| 27 | # and published to its container registry. The public |
| 28 | # gcr.io/flame-public/rbe-ubuntu24-04 carries neither pkg-config nor |
| 29 | # libasound2-dev, and alsa-sys's build script needs the first to find the |
| 30 | # second — so with that image the graph could not be built remotely at |
| 31 | # all, whatever the executor was asked to do. |
| 32 | # |
| 33 | # Still 24.04, and for the reason that image was pinned to it: a build |
| 34 | # script is compiled on the host and *run* on the worker, and 22.04's |
| 35 | # glibc 2.35 is old enough that thiserror's died with "GLIBC_2.39 not |
| 36 | # found" before a single crate was compiled. frq hit the same floor from |
| 37 | # the other side (jolt itself needs 2.38) and moved for the same reason. |
| 38 | # |
| 39 | # By digest, not by tag. An execution platform ought to name bytes, and |
| 40 | # here it has to: the executor caches an image under the reference it |
| 41 | # was given, so a rebuilt `:latest` kept serving the old layers and the |
| 42 | # build went on failing for a package the image already had. The |
| 43 | # pipeline prints this line on every publish. |
| 44 | "container-image": "docker://registry.gitlab.com/nandithebull/jolt-native/rbe@sha256:3de0e1c922b35f40023db8d50bbf606a3cb8168b5b8b4a27aac08f06cf7e0328", |
| Let actions run on a worker, now that there is something to send 5a37b4b nandi 19d ago | 45 | }, |
| 46 | use_windows_path_separators = host_info().os.is_windows, |
| 47 | visibility = ["PUBLIC"], |
| 48 | ) |
| Cross-compile for Android, with an NDK nobody has to install 14a30c0 nandi 19d ago | 49 | |
| 50 | # A *target* platform, unlike the two above: this is what a graph is built |
| 51 | # for, not where the building runs. Naming it on a configured_alias moves the |
| 52 | # target configuration and leaves the execution platform alone, so build |
| 53 | # scripts and proc macros still compile and run on the host. |
| 54 | platform( |
| 55 | name = "android-arm64", |
| 56 | constraint_values = [ |
| 57 | "prelude//os/constraints:os[android]", |
| 58 | "prelude//cpu/constraints:cpu[arm64]", |
| 59 | ], |
| 60 | visibility = ["PUBLIC"], |
| 61 | ) |