Skip to content

Commit

Permalink
matrix: add 32bit and arm64, remove bionic
Browse files Browse the repository at this point in the history
Somehow bionic crept back in, and we don't have 32-bit or arm64 targets,
so adding those to sched here.
  • Loading branch information
trws committed Aug 22, 2023
1 parent dbf321a commit 79c5eca
Showing 1 changed file with 32 additions and 9 deletions.
41 changes: 32 additions & 9 deletions src/test/generate-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ def __init__(self):
if match:
self.tag = match.group(1)

def create_docker_tag(self, image, env, command):
def create_docker_tag(self, image, env, command, platform):
"""Create docker tag string if this is master branch or a tag"""
if self.branch == "master" or self.tag:
tag = f"{DOCKER_REPO}:{image}"
if self.tag:
tag += f"-{self.tag}"
if platform is not None:
tag += "-" + platform.split("/")[1]
env["DOCKER_TAG"] = tag
command += f" --tag={tag}"
return True, command
Expand All @@ -52,13 +54,19 @@ def add_build(
docker_tag=False,
coverage=False,
recheck=True,
platform=None,
command_args="",
):
"""Add a build to the matrix.include array"""

# Extra environment to add to this command:
env = env or {}

needs_buildx = False
if platform:
command_args += f"--platform={platform}"
needs_buildx = True

# The command to run:
command = f"{docker_run_checks} -j{jobs} --image={image} {command_args}"

Expand All @@ -68,7 +76,7 @@ def add_build(

if docker_tag:
# Only export docker_tag if this is main branch or a tag:
docker_tag, command = self.create_docker_tag(image, env, command)
docker_tag, command = self.create_docker_tag(image, env, command, platform)

if coverage:
env["COVERAGE"] = "t"
Expand All @@ -94,6 +102,7 @@ def add_build(
"branch": self.branch,
"coverage": coverage,
"docker_tag": docker_tag,
"needs_buildx": needs_buildx,
"create_release": create_release,
}
)
Expand All @@ -107,6 +116,27 @@ def __str__(self):

matrix = BuildMatrix()

# Debian: no args
matrix.add_build(name="bookworm")

# Debian: 32b
matrix.add_build(
name="bookworm - 32 bit",
image="bookworm",
platform="linux/386",
docker_tag=True,
)

# Debian: arm64, expensive, only on master and tags, only install
if matrix.branch == 'master' or matrix.tag:
matrix.add_build(
name="bookworm - arm64",
image="bookworm",
platform="linux/arm64",
docker_tag=True,
command_args="--install-only ",
)

# Debian: gcc-12, distcheck
matrix.add_build(
name="bookworm - gcc-12,distcheck",
Expand Down Expand Up @@ -149,13 +179,6 @@ def __str__(self):
docker_tag=True,
)

# Ubuntu 18.04: py3.8
matrix.add_build(
name="bionic",
image="bionic",
docker_tag=True,
)

# Ubuntu 20.04: py3.8
matrix.add_build(
name="focal",
Expand Down

0 comments on commit 79c5eca

Please sign in to comment.