Skip to content

Commit

Permalink
autogenerate_pipeline: Initial support for riscv64 pipeline
Browse files Browse the repository at this point in the history
Enable pipeline generation for riscv64.

Signed-off-by: Tan En De <[email protected]>
  • Loading branch information
endeneer committed Dec 19, 2023
1 parent 067e254 commit 4235274
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .buildkite/autogenerate_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
# This represents the version of the rust-vmm-container used
# for running the tests.
CONTAINER_VERSION = "v30"
CONTAINER_RISCV64_VERSION = "v1"
# This represents the version of the Buildkite Docker plugin.
DOCKER_PLUGIN_VERSION = "v5.3.0"

Expand Down Expand Up @@ -122,6 +123,9 @@ def _set_platform(self, platform):
# setting the tags on the host.
if platform == "aarch64":
platform = "arm"
elif platform == "riscv64":
# Currently riscv64 CI runs in QEMU running on x86_64
platform = "x86_64"
self.step_config["agents"]["platform"] = f"{platform}.metal"

def _set_hypervisor(self, hypervisor):
Expand All @@ -147,6 +151,12 @@ def _set_agent_queue(self, queue):
if queue:
self.step_config["agents"]["queue"] = queue

def _set_docker_image(self, platform):
"""Override docker image for riscv64 CI"""
if platform:
if platform == "riscv64":
self.step_config["plugins"][0][f"docker#{DOCKER_PLUGIN_VERSION}"]["image"] = f"rustvmm/dev_riscv64:{CONTAINER_RISCV64_VERSION}"

def _add_docker_config(self, cfg):
"""Add configuration for docker if given in the json input."""

Expand Down Expand Up @@ -246,6 +256,7 @@ def build(self, input):
self._add_docker_config(docker)
self._set_timeout_in_minutes(timeout)
self._set_agent_queue(queue)
self._set_docker_image(platform)

# Override/add configuration from environment variables.
self._env_override_agent_tags(test_name)
Expand Down

0 comments on commit 4235274

Please sign in to comment.