Skip to content

Create c-cpp.yml #1205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
269 changes: 269 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
name: C/C++ CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: configure
run: ./configure
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck
variables:
CONTAINER_TAG: "20250204-mesa-uprev"
DEBIAN_X86_64_BUILD_BASE_IMAGE: "debian/x86_64_build-base"
DEBIAN_BASE_TAG: "${CONTAINER_TAG}"

DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build"
DEBIAN_BUILD_TAG: "${CONTAINER_TAG}"

KERNEL_ROOTFS_TAG: "${CONTAINER_TAG}"
# default kernel for rootfs before injecting the current kernel tree
KERNEL_TAG: "v6.13-rc4-mesa-5e77"
KERNEL_REPO: "gfx-ci/linux"
PKG_REPO_REV: "bca9635d"

DEBIAN_X86_64_TEST_BASE_IMAGE: "debian/x86_64_test-base"
DEBIAN_X86_64_TEST_IMAGE_GL_PATH: "debian/x86_64_test-gl"
DEBIAN_TEST_GL_TAG: "${CONTAINER_TAG}"

DEBIAN_PYUTILS_IMAGE: "debian/x86_64_pyutils"
DEBIAN_PYUTILS_TAG: "${CONTAINER_TAG}"

ALPINE_X86_64_LAVA_SSH_TAG: "${CONTAINER_TAG}"
.build:
extends:
- .container+build-rules
stage: build-only
artifacts:
paths:
- artifacts
script:
- FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash drivers/gpu/drm/ci/build.sh

.build:arm32:
extends:
- .build
- .use-debian/arm64_build
tags:
- aarch64
variables:
DEFCONFIG: "arch/arm/configs/multi_v7_defconfig"
KERNEL_IMAGE_NAME: "zImage"
KERNEL_ARCH: "arm"

.build:arm64:
extends:
- .build
- .use-debian/arm64_build
tags:
- aarch64
variables:
DEFCONFIG: "arch/arm64/configs/defconfig"
KERNEL_IMAGE_NAME: "Image"
KERNEL_ARCH: "arm64"

.build:x86_64:
extends:
- .build
- .use-debian/x86_64_build
variables:
DEFCONFIG: "arch/x86/configs/x86_64_defconfig"
KERNEL_IMAGE_NAME: "bzImage"
KERNEL_ARCH: "x86_64"


# Build IGT for testing on devices

igt:arm32:
extends: .build:arm32
script:
- FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash drivers/gpu/drm/ci/build-igt.sh

igt:arm64:
extends: .build:arm64
script:
- FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash drivers/gpu/drm/ci/build-igt.sh

igt:x86_64:
extends: .build:x86_64
script:
- FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash drivers/gpu/drm/ci/build-igt.sh

# Build kernels for testing on devices

testing:arm32:
extends: .build:arm32
variables:
# Would be good to have DEBUG_KMEMLEAK, but it doesn't work well with any of
# PROVE_LOCKING and KASAN as of 5.17.
#
# db410c and db820c don't boot with KASAN_INLINE, probably due to the kernel
# becoming too big for their bootloaders.
ENABLE_KCONFIGS: "PROVE_LOCKING DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT"
UPLOAD_TO_MINIO: 1
MERGE_FRAGMENT: arm.config

testing:arm64:
extends: .build:arm64
variables:
# Would be good to have DEBUG_KMEMLEAK, but it doesn't work well with any of
# PROVE_LOCKING and KASAN as of 5.17.
#
# db410c and db820c don't boot with KASAN_INLINE, probably due to the kernel
# becoming too big for their bootloaders.
ENABLE_KCONFIGS: "PROVE_LOCKING DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT"
UPLOAD_TO_MINIO: 1
MERGE_FRAGMENT: arm64.config

testing:x86_64:
extends: .build:x86_64
variables:
# Would be good to have DEBUG_KMEMLEAK, but it doesn't work well with any of
# PROVE_LOCKING and KASAN as of 5.17.
#
# db410c and db820c don't boot with KASAN_INLINE, probably due to the kernel
# becoming too big for their bootloaders.
ENABLE_KCONFIGS: "PROVE_LOCKING DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT"
UPLOAD_TO_MINIO: 1
MERGE_FRAGMENT: x86_64.config


# Jobs for build-testing different configurations

build:arm32:
extends: .build:arm32

build-nodebugfs:arm64:
extends: .build:arm64
variables:
DISABLE_KCONFIGS: "DEBUG_FS"
ENABLE_KCONFIGS: "EXPERT DRM_MSM_VALIDATE_XML"

build:x86_64:
extends: .build:x86_64

# Disable build jobs that we won't use
alpine-build-testing:
rules:
- when: never

debian-android:
rules:
- when: never

debian-arm32:
rules:
- when: never

debian-arm32-asan:
rules:
- when: never

debian-arm64:
rules:
- when: never

debian-arm64-asan:
rules:
- when: never

debian-arm64-build-test:
rules:
- when: never

debian-arm64-release:
rules:
- when: never

debian-build-testing:
rules:
- when: never

debian-clang:
rules:
- when: never

debian-clang-release:
rules:
- when: never

debian-no-libdrm:
rules:
- when: never

debian-ppc64el:
rules:
- when: never

debian-release:
rules:
- when: never

debian-s390x:
rules:
- when: never

debian-testing:
rules:
- when: never

debian-testing-asan:
rules:
- when: never

debian-testing-msan:
rules:
- when: never

debian-vulkan:
rules:
- when: never

debian-x86_32:
rules:
- when: never

fedora-release:
rules:
- when: never

rustfmt:
rules:
- when: never

shader-db:
rules:
- when: never

windows-msvc:
rules:
- when: never

yaml-toml-shell-py-test:
rules:
- when: never
check-patch:
extends:
- .build
- .use-debian/x86_64_build
script:
- drivers/gpu/drm/ci/check-patch.py
variables:
CHECKPATCH_TYPES: "BAD_SIGN_OFF,BAD_STABLE_ADDRESS_STYLE,COMMIT_COMMENT_SYMBOL,COMMIT_MESSAGE,EMAIL_SUBJECT,FROM_SIGN_OFF_MISMATCH,MISSING_SIGN_OFF,NO_AUTHOR_SIGN_OFF,DIFF_IN_COMMIT_MSG,GERRIT_CHANGE_ID,GIT_COMMIT_ID,UNKNOWN_COMMIT_ID,CODE_INDENT,BIT_MACRO,DOS_LINE_ENDINGS"
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: on_success
# Other cases default to never
Loading