Skip to content
Snippets Groups Projects
Commit c67da7aa authored by Vignesh Raman's avatar Vignesh Raman
Browse files

Support native and cross builds

parent 8abe911a
No related branches found
No related tags found
No related merge requests found
Pipeline #123948 waiting for manual action
.use-debian/arm64_build:
extends:
- .use-debian/x86_64_build
needs:
- job: debian/x86_64_build
debian/arm64_build:
extends:
- .debian-arm64
- .fdo.container-build@debian
tags:
- aarch64
stage: container
.use-debian/arm64_build:
tags:
- aarch64
extends:
- .debian-arm64
- .fdo.suffixed-image@debian
needs:
- job: debian/arm64_build
...@@ -16,16 +16,19 @@ build:x86_64: ...@@ -16,16 +16,19 @@ build:x86_64:
extends: extends:
- .use-debian/x86_64_build - .use-debian/x86_64_build
- .build-common - .build-common
- .x86_64-config
build:arm64: build:arm64:
extends: extends:
- .use-debian/arm64_build - .use-debian/arm64_build
- .build-common - .build-common
- .arm64-config
build:arm32: build:arm32:
extends: extends:
- .use-debian/arm32_build - .use-debian/arm64_build
- .build-common - .build-common
- .arm32-config
build-docs: build-docs:
extends: extends:
......
...@@ -37,8 +37,10 @@ ici_prepare_build() { ...@@ -37,8 +37,10 @@ ici_prepare_build() {
GCC_ARCH="x86_64-linux-gnu" GCC_ARCH="x86_64-linux-gnu"
fi fi
# do not set ARCH and CROSS_COMPILE if KCI_KERNEL_ARCH is not set, useful for local run # Set ARCH and CROSS_COMPILE if:
if [ -n "$KCI_KERNEL_ARCH" ]; then # - The kernel architecture is "arm" (default cross-compilation case), or
# - The CI server host is not "gitlab.freedesktop.org"
if [[ "$KCI_KERNEL_ARCH" = "arm" ]] || [[ "$CI_SERVER_HOST" != "gitlab.freedesktop.org" ]]; then
export ARCH=${KCI_KERNEL_ARCH} export ARCH=${KCI_KERNEL_ARCH}
export CROSS_COMPILE="${GCC_ARCH}-" export CROSS_COMPILE="${GCC_ARCH}-"
fi fi
......
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
# #
# Copyright (C) 2024 Collabora, Helen Koike <helen.koike@collabora.com> # Copyright (C) 2024 Collabora, Helen Koike <helen.koike@collabora.com>
include:
- local: 'tools/ci/gitlab-ci/arm_native_compile.yml'
rules:
- if: '$CI_SERVER_HOST == "gitlab.freedesktop.org"'
- local: 'tools/ci/gitlab-ci/arm_cross_compile.yml'
rules:
- if: '$CI_SERVER_HOST != "gitlab.freedesktop.org"'
variables: variables:
FDO_REPO_SUFFIX: "$BUILD_OS/$KCI_BUILD_ARCH" FDO_REPO_SUFFIX: "$BUILD_OS/$KCI_BUILD_ARCH"
FDO_DISTRIBUTION_TAG: "2024-12-24-debian" FDO_DISTRIBUTION_TAG: "2024-12-24-debian"
...@@ -25,45 +33,40 @@ variables: ...@@ -25,45 +33,40 @@ variables:
latexmk librsvg2-bin texlive-lang-chinese texlive-xetex meson libdrm-dev latexmk librsvg2-bin texlive-lang-chinese texlive-xetex meson libdrm-dev
curl virtme-ng udev curl virtme-ng udev
.debian-x86_64: .x86_64-config:
extends:
- .debian
variables: variables:
KCI_BUILD_ARCH: "x86-64"
KCI_KERNEL_ARCH: "x86_64" KCI_KERNEL_ARCH: "x86_64"
KCI_DEFCONFIG: "x86_64_defconfig" KCI_DEFCONFIG: "x86_64_defconfig"
KCI_KERNEL_IMAGE_NAME: "bzImage" KCI_KERNEL_IMAGE_NAME: "bzImage"
.debian-arm64: .arm64-config:
extends:
- .debian
variables: variables:
KCI_BUILD_ARCH: "arm64"
KCI_KERNEL_ARCH: "arm64" KCI_KERNEL_ARCH: "arm64"
KCI_DEFCONFIG: "defconfig" KCI_DEFCONFIG: "defconfig"
KCI_KERNEL_IMAGE_NAME: "Image" KCI_KERNEL_IMAGE_NAME: "Image"
.debian-arm32: .arm32-config:
extends:
- .debian
variables: variables:
KCI_BUILD_ARCH: "arm64"
KCI_KERNEL_ARCH: "arm" KCI_KERNEL_ARCH: "arm"
KCI_DEFCONFIG: "multi_v7_defconfig" KCI_DEFCONFIG: "multi_v7_defconfig"
KCI_KERNEL_IMAGE_NAME: "zImage" KCI_KERNEL_IMAGE_NAME: "zImage"
debian/x86_64_build: .debian-x86_64:
extends: extends:
- .debian-x86_64 - .debian
- .fdo.container-build@debian variables:
stage: container KCI_BUILD_ARCH: "x86-64"
debian/arm64_build: .debian-arm64:
extends:
- .debian
variables:
KCI_BUILD_ARCH: "arm64"
debian/x86_64_build:
extends: extends:
- .debian-arm64 - .debian-x86_64
- .fdo.container-build@debian - .fdo.container-build@debian
tags:
- aarch64
stage: container stage: container
.use-debian/x86_64_build: .use-debian/x86_64_build:
...@@ -72,21 +75,3 @@ debian/arm64_build: ...@@ -72,21 +75,3 @@ debian/arm64_build:
- .fdo.suffixed-image@debian - .fdo.suffixed-image@debian
needs: needs:
- job: debian/x86_64_build - job: debian/x86_64_build
.use-debian/arm64_build:
tags:
- aarch64
extends:
- .debian-arm64
- .fdo.suffixed-image@debian
needs:
- job: debian/arm64_build
.use-debian/arm32_build:
tags:
- aarch64
extends:
- .debian-arm32
- .fdo.suffixed-image@debian
needs:
- job: debian/arm64_build
...@@ -36,6 +36,9 @@ variables: ...@@ -36,6 +36,9 @@ variables:
SMATCH_DB_DIR: /smatch/smatch_data SMATCH_DB_DIR: /smatch/smatch_data
# exit code of bash script on `script` will be the exit code of the job # exit code of bash script on `script` will be the exit code of the job
FF_USE_NEW_BASH_EVAL_STRATEGY: "true" FF_USE_NEW_BASH_EVAL_STRATEGY: "true"
KCI_SCENARIO:
description: Set to any non-empty value to disable scenarios
value: ""
default: default:
artifacts: artifacts:
......
...@@ -12,40 +12,31 @@ build:x86_64: ...@@ -12,40 +12,31 @@ build:x86_64:
variables: variables:
KCI_KCONFIGS_ENABLE: "DRM_VKMS DRM_BOCHS" KCI_KCONFIGS_ENABLE: "DRM_VKMS DRM_BOCHS"
# Build IGT for testing on devices .igt:
# TODO: Fix cross compilation issue stage: build
.igt:arm32:
extends:
- .use-debian/arm64_build
- build:arm32
script: script:
- FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash ./tools/ci/gitlab-ci/scenarios/drm/build-igt.sh - FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash ./tools/ci/gitlab-ci/scenarios/drm/build-igt.sh
stage: build
artifacts: artifacts:
when: always when: always
paths: paths:
- artifacts/ - artifacts/
# Build IGT for testing on devices
# TODO: Fix cross compilation issue
.igt:arm32:
extends:
- .arm32-config
- .use-debian/arm64_build
- .igt
igt:arm64: igt:arm64:
extends: extends:
- .arm64-config
- .use-debian/arm64_build - .use-debian/arm64_build
- build:arm64 - .igt
script:
- FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash ./tools/ci/gitlab-ci/scenarios/drm/build-igt.sh
stage: build
artifacts:
when: always
paths:
- artifacts/
igt:x86_64: igt:x86_64:
extends: extends:
- .x86_64-config
- .use-debian/x86_64_build - .use-debian/x86_64_build
- build:x86_64 - .igt
script:
- FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash ./tools/ci/gitlab-ci/scenarios/drm/build-igt.sh
stage: build
artifacts:
when: always
paths:
- artifacts/
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
stage: static-checks stage: static-checks
extends: extends:
- .use-debian/x86_64_build - .use-debian/x86_64_build
- .x86_64-config
checkpatch: checkpatch:
extends: .static-checks extends: .static-checks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment