Compare commits
54 Commits
mesa-25.1.
...
mesa-23.3.
Author | SHA1 | Date | |
---|---|---|---|
|
c97af690c9 | ||
|
2b66b23045 | ||
|
18397e51ad | ||
|
4ac0a87868 | ||
|
3cb8275141 | ||
|
14fac5200d | ||
|
4e4cd7065b | ||
|
69e6b0307b | ||
|
a33f38d2bf | ||
|
62ea10c0e0 | ||
|
49aa21e327 | ||
|
0bf24452f3 | ||
|
aab94295ea | ||
|
d282666f96 | ||
|
7b81db9f37 | ||
|
21798650de | ||
|
c03932b6e6 | ||
|
8a50c841cf | ||
|
8986b7f9ae | ||
|
5e690f4097 | ||
|
62c4a2273e | ||
|
39f9dc50f5 | ||
|
ede1cdbcaf | ||
|
2ee4ef998a | ||
|
e8e6ad5692 | ||
|
423202cae4 | ||
|
77eb71a612 | ||
|
f9337e1c78 | ||
|
65bd87bd35 | ||
|
bcfdd7476f | ||
|
336e6df3ef | ||
|
7b731ab6e8 | ||
|
199f9783a0 | ||
|
08ad7e3e0f | ||
|
1e7a25df6b | ||
|
c7822e2b6f | ||
|
dea50199a1 | ||
|
da8fcbaef5 | ||
|
8a7498e13f | ||
|
0144e4d0b3 | ||
|
a5bcd8b84f | ||
|
048a358bf5 | ||
|
b42d824822 | ||
|
eb6e3a2a89 | ||
|
4a30434a0c | ||
|
c23ba4e83a | ||
|
c9040f482e | ||
|
e3bef4dfa3 | ||
|
e0b436252f | ||
|
aac2d7f100 | ||
|
e886ef760c | ||
|
a0690566bd | ||
|
30a1ebe034 | ||
|
c8c90eb456 |
@@ -1,10 +1,9 @@
|
||||
# The following files are opted into `ninja clang-format` and
|
||||
# enforcement in the CI.
|
||||
|
||||
src/**/asahi/**/*
|
||||
src/**/panfrost/**/*
|
||||
src/gallium/drivers/i915
|
||||
src/gallium/drivers/r300/compiler/*
|
||||
src/gallium/targets/teflon/**/*
|
||||
src/amd/vulkan/**/*
|
||||
src/amd/compiler/**/*
|
||||
src/egl/**/*
|
||||
src/etnaviv/isa/**/*
|
||||
|
@@ -31,7 +31,7 @@ indent_size = 3
|
||||
[*.patch]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[{meson.build,meson.options}]
|
||||
[{meson.build,meson_options.txt}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
|
@@ -65,12 +65,3 @@ c7bf3b69ebc8f2252dbf724a4de638e6bb2ac402
|
||||
|
||||
# ir3: Reformat source with clang-format
|
||||
177138d8cb0b4f6a42ef0a1f8593e14d79f17c54
|
||||
|
||||
# ir3: reformat after refactoring in previous commit
|
||||
8ae5b27ee0331a739d14b42e67586784d6840388
|
||||
|
||||
# ir3: don't use deprecated NIR_PASS_V anymore
|
||||
2fedc82c0cc9d3fb2e54707b57941b79553b640c
|
||||
|
||||
# ir3: reformat after previous commit
|
||||
7210054db8cfb445a8ccdeacfdcfecccf44fa266
|
||||
|
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -4,4 +4,3 @@
|
||||
*.png binary
|
||||
*.gif binary
|
||||
*.ico binary
|
||||
*.cl gitlab-language=c
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,7 +1,5 @@
|
||||
.cache
|
||||
.vscode*
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.out
|
||||
/build
|
||||
.venv/
|
||||
|
344
.gitlab-ci.yml
344
.gitlab-ci.yml
@@ -1,148 +1,68 @@
|
||||
# Types of CI pipelines:
|
||||
# | pipeline name | context | description |
|
||||
# |----------------------|-----------|-------------------------------------------------------------|
|
||||
# | merge pipeline | mesa/mesa | pipeline running for an MR; if it passes the MR gets merged |
|
||||
# | pre-merge pipeline | mesa/mesa | same as above, except its status doesn't affect the MR |
|
||||
# | post-merge pipeline | mesa/mesa | pipeline immediately after merging |
|
||||
# | fork pipeline | fork | pipeline running in a user fork |
|
||||
# | scheduled pipeline | mesa/mesa | nightly pipelines, running every morning at 4am UTC |
|
||||
# | direct-push pipeline | mesa/mesa | when commits are pushed directly to mesa/mesa, bypassing Marge and its gating pipeline |
|
||||
#
|
||||
# Note that the release branches maintained by the release manager fall under
|
||||
# the "direct push" category.
|
||||
#
|
||||
# "context" indicates the permissions that the jobs get; notably, any
|
||||
# container created in mesa/mesa gets pushed immediately for everyone to use
|
||||
# as soon as the image tag change is merged.
|
||||
#
|
||||
# Merge pipelines contain all jobs that must pass before the MR can be merged.
|
||||
# Pre-merge pipelines contain the exact same jobs as merge pipelines.
|
||||
# Post-merge pipelines contain *only* the `pages` job that deploys the new
|
||||
# version of the website.
|
||||
# Fork pipelines contain everything.
|
||||
# Scheduled pipelines only contain the container+build jobs, and some extra
|
||||
# test jobs (typically "full" variants of pre-merge jobs that only run 1/X
|
||||
# test cases), but not a repeat of the merge pipeline jobs.
|
||||
# Direct-push pipelines contain the same jobs as merge pipelines.
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
# do not duplicate pipelines on merge pipelines
|
||||
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
|
||||
when: never
|
||||
# tag pipelines are disabled as it's too late to run all the tests by
|
||||
# then, the release has been made based on the staging pipelines results
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: never
|
||||
# merge pipeline
|
||||
- if: &is-merge-attempt $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
- if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH == null
|
||||
variables:
|
||||
MESA_CI_PERFORMANCE_ENABLED: 1
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:high
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:high-kvm
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:high-aarch64
|
||||
CI_TRON_JOB_PRIORITY_TAG: "" # Empty tags are ignored by gitlab
|
||||
JOB_PRIORITY: 75
|
||||
# fast-fail in merge pipelines: stop early if we get this many unexpected fails/crashes
|
||||
DEQP_RUNNER_MAX_FAILS: 40
|
||||
VALVE_INFRA_VANGOGH_JOB_PRIORITY: "" # Empty tags are ignored by gitlab
|
||||
# post-merge pipeline
|
||||
- if: &is-post-merge $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "push"
|
||||
# Pre-merge pipeline
|
||||
- if: &is-pre-merge $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
# Push to a branch on a fork
|
||||
- if: &is-fork-push $CI_PROJECT_NAMESPACE != "mesa" && $CI_PIPELINE_SOURCE == "push"
|
||||
# nightly pipeline
|
||||
- if: &is-scheduled-pipeline $CI_PIPELINE_SOURCE == "schedule"
|
||||
- if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH
|
||||
variables:
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:low
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:low-kvm
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:low-aarch64
|
||||
JOB_PRIORITY: 45
|
||||
# (some) nightly builds perform LTO, so they take much longer than the
|
||||
# short timeout allowed in other pipelines.
|
||||
# Note: 0 = infinity = gitlab's job `timeout:` applies, which is 1h
|
||||
BUILD_JOB_TIMEOUT_OVERRIDE: 0
|
||||
# pipeline for direct pushes that bypassed the CI
|
||||
- if: &is-direct-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||
JOB_PRIORITY: 40
|
||||
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
|
||||
# any other pipeline
|
||||
- if: $GITLAB_USER_LOGIN != "marge-bot"
|
||||
variables:
|
||||
JOB_PRIORITY: 70
|
||||
# pipeline for direct pushes from release maintainer
|
||||
- if: &is-staging-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME =~ /^staging\//
|
||||
variables:
|
||||
JOB_PRIORITY: 70
|
||||
|
||||
JOB_PRIORITY: 50
|
||||
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
|
||||
- when: always
|
||||
|
||||
variables:
|
||||
FDO_UPSTREAM_REPO: mesa/mesa
|
||||
MESA_TEMPLATES_COMMIT: &ci-templates-commit 48e4b6c9a2015f969fbe648999d16d5fb3eef6c4
|
||||
MESA_TEMPLATES_COMMIT: &ci-templates-commit d5aa3941aa03c2f716595116354fb81eb8012acb
|
||||
CI_PRE_CLONE_SCRIPT: |-
|
||||
set -o xtrace
|
||||
wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh
|
||||
bash download-git-cache.sh
|
||||
rm download-git-cache.sh
|
||||
set +o xtrace
|
||||
S3_JWT_FILE: /s3_jwt
|
||||
S3_JWT_FILE_SCRIPT: |-
|
||||
echo -n '${S3_JWT}' > '${S3_JWT_FILE}' &&
|
||||
unset CI_JOB_JWT S3_JWT # Unsetting vulnerable env variables
|
||||
CI_JOB_JWT_FILE: /minio_jwt
|
||||
S3_HOST: s3.freedesktop.org
|
||||
# This bucket is used to fetch ANDROID prebuilts and images
|
||||
S3_ANDROID_BUCKET: mesa-rootfs
|
||||
# This bucket is used to fetch the kernel image
|
||||
S3_KERNEL_BUCKET: mesa-rootfs
|
||||
# Bucket for git cache
|
||||
S3_GITCACHE_BUCKET: git-cache
|
||||
# Bucket for the pipeline artifacts pushed to S3
|
||||
S3_ARTIFACTS_BUCKET: artifacts
|
||||
# Buckets for traces
|
||||
S3_TRACIE_RESULTS_BUCKET: mesa-tracie-results
|
||||
S3_TRACIE_PUBLIC_BUCKET: mesa-tracie-public
|
||||
S3_TRACIE_PRIVATE_BUCKET: mesa-tracie-private
|
||||
# per-pipeline artifact storage on MinIO
|
||||
PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/${S3_ARTIFACTS_BUCKET}/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
|
||||
PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
|
||||
# per-job artifact storage on MinIO
|
||||
JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
|
||||
KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/gfx-ci/linux/${KERNEL_TAG}
|
||||
# reference images stored for traces
|
||||
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${S3_HOST}/${S3_TRACIE_RESULTS_BUCKET}/$FDO_UPSTREAM_REPO"
|
||||
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${S3_HOST}/mesa-tracie-results/$FDO_UPSTREAM_REPO"
|
||||
# For individual CI farm status see .ci-farms folder
|
||||
# Disable farm with `git mv .ci-farms{,-disabled}/$farm_name`
|
||||
# Re-enable farm with `git mv .ci-farms{-disabled,}/$farm_name`
|
||||
# NEVER MIX FARM MAINTENANCE WITH ANY OTHER CHANGE IN THE SAME MERGE REQUEST!
|
||||
ARTIFACTS_BASE_URL: https://${CI_PROJECT_ROOT_NAMESPACE}.${CI_PAGES_DOMAIN}/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts
|
||||
# Python scripts for structured logger
|
||||
PYTHONPATH: "$PYTHONPATH:$CI_PROJECT_DIR/install"
|
||||
# No point in continuing once the device is lost
|
||||
MESA_VK_ABORT_ON_DEVICE_LOSS: 1
|
||||
# Avoid the wall of "Unsupported SPIR-V capability" warnings in CI job log, hiding away useful output
|
||||
MESA_SPIRV_LOG_LEVEL: error
|
||||
# Default priority for non-merge pipelines
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: "" # Empty tags are ignored by gitlab
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: kvm
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: aarch64
|
||||
CI_TRON_JOB_PRIORITY_TAG: ci-tron:priority:low
|
||||
JOB_PRIORITY: 50
|
||||
DATA_STORAGE_PATH: data_storage
|
||||
|
||||
default:
|
||||
timeout: 1m # catch any jobs which don't specify a timeout
|
||||
id_tokens:
|
||||
S3_JWT:
|
||||
aud: https://s3.freedesktop.org
|
||||
before_script:
|
||||
- |
|
||||
if [ -z "${KERNEL_IMAGE_BASE:-}" ]; then
|
||||
export KERNEL_IMAGE_BASE="https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${EXTERNAL_KERNEL_TAG:-$KERNEL_TAG}"
|
||||
fi
|
||||
- >
|
||||
export SCRIPTS_DIR=$(mktemp -d) &&
|
||||
curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 -O --output-dir "${SCRIPTS_DIR}" "${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/setup-test-env.sh" &&
|
||||
. ${SCRIPTS_DIR}/setup-test-env.sh
|
||||
- eval "$S3_JWT_FILE_SCRIPT"
|
||||
. ${SCRIPTS_DIR}/setup-test-env.sh &&
|
||||
echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}" &&
|
||||
unset CI_JOB_JWT # Unsetting vulnerable env variables
|
||||
|
||||
after_script:
|
||||
# Work around https://gitlab.com/gitlab-org/gitlab/-/issues/20338
|
||||
- find -name '*.log' -exec mv {} {}.txt \;
|
||||
|
||||
- >
|
||||
set +x
|
||||
|
||||
test -e "${CI_JOB_JWT_FILE}" &&
|
||||
export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
|
||||
rm "${CI_JOB_JWT_FILE}"
|
||||
|
||||
# Retry when job fails. Failed jobs can be found in the Mesa CI Daily Reports:
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/?sort=created_date&state=opened&label_name%5B%5D=CI%20daily
|
||||
retry:
|
||||
@@ -162,28 +82,18 @@ stages:
|
||||
- sanity
|
||||
- container
|
||||
- git-archive
|
||||
- build-for-tests
|
||||
- build-only
|
||||
- code-validation
|
||||
- build-x86_64
|
||||
- build-misc
|
||||
- lint
|
||||
- amd
|
||||
- amd-postmerge
|
||||
- intel
|
||||
- intel-postmerge
|
||||
- nouveau
|
||||
- nouveau-postmerge
|
||||
- arm
|
||||
- arm-postmerge
|
||||
- broadcom
|
||||
- broadcom-postmerge
|
||||
- freedreno
|
||||
- freedreno-postmerge
|
||||
- etnaviv
|
||||
- etnaviv-postmerge
|
||||
- software-renderer
|
||||
- software-renderer-postmerge
|
||||
- layered-backends
|
||||
- layered-backends-postmerge
|
||||
- performance
|
||||
- deploy
|
||||
|
||||
include:
|
||||
@@ -205,126 +115,92 @@ include:
|
||||
- local: '.gitlab-ci/farm-rules.yml'
|
||||
- local: '.gitlab-ci/test-source-dep.yml'
|
||||
- local: 'docs/gitlab-ci.yml'
|
||||
- local: 'src/**/ci/gitlab-ci.yml'
|
||||
- local: 'src/amd/ci/gitlab-ci.yml'
|
||||
- local: 'src/broadcom/ci/gitlab-ci.yml'
|
||||
- local: 'src/etnaviv/ci/gitlab-ci.yml'
|
||||
- local: 'src/freedreno/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/crocus/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/d3d12/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/nouveau/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/frontends/lavapipe/ci/gitlab-ci.yml'
|
||||
- local: 'src/intel/ci/gitlab-ci.yml'
|
||||
- local: 'src/microsoft/ci/gitlab-ci.yml'
|
||||
- local: 'src/panfrost/ci/gitlab-ci.yml'
|
||||
- local: 'src/virtio/ci/gitlab-ci.yml'
|
||||
|
||||
|
||||
# Rules applied to every job in the pipeline
|
||||
.common-rules:
|
||||
# YAML anchors for rule conditions
|
||||
# --------------------------------
|
||||
.rules-anchors:
|
||||
rules:
|
||||
- if: *is-fork-push
|
||||
when: manual
|
||||
|
||||
.never-post-merge-rules:
|
||||
rules:
|
||||
- if: *is-post-merge
|
||||
when: never
|
||||
# Post-merge pipeline
|
||||
- if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
|
||||
when: on_success
|
||||
# Post-merge pipeline, not for Marge Bot
|
||||
- if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
|
||||
when: on_success
|
||||
# Pre-merge pipeline
|
||||
- if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
when: on_success
|
||||
# Pre-merge pipeline for Marge Bot
|
||||
- if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
when: on_success
|
||||
|
||||
|
||||
# Note: make sure the branches in this list are the same as in
|
||||
# `.build-only-delayed-rules` below.
|
||||
.container+build-rules:
|
||||
rules:
|
||||
- !reference [.common-rules, rules]
|
||||
# Run when re-enabling a disabled farm, but not when disabling it
|
||||
- !reference [.disable-farm-mr-rules, rules]
|
||||
# Never run immediately after merging, as we just ran everything
|
||||
- !reference [.never-post-merge-rules, rules]
|
||||
# Build everything in merge pipelines, if any files affecting the pipeline
|
||||
# were changed
|
||||
- if: *is-merge-attempt
|
||||
# Run pipeline by default in the main project if any CI pipeline
|
||||
# configuration files were changed, to ensure docker images are up to date
|
||||
- if: *is-post-merge
|
||||
changes: &all_paths
|
||||
- VERSION
|
||||
- bin/git_sha1_gen.py
|
||||
- bin/install_megadrivers.py
|
||||
- bin/symbols-check.py
|
||||
- bin/ci/**/*
|
||||
# GitLab CI
|
||||
- .gitlab-ci.yml
|
||||
- .gitlab-ci/**/*
|
||||
- .ci-farms/*
|
||||
# Meson
|
||||
- meson*
|
||||
- build-support/**/*
|
||||
- subprojects/**/*
|
||||
# clang format
|
||||
- .clang-format
|
||||
- .clang-format-include
|
||||
- .clang-format-ignore
|
||||
# Source code
|
||||
- include/**/*
|
||||
- src/**/*
|
||||
when: on_success
|
||||
# Same as above, but for pre-merge pipelines
|
||||
- if: *is-pre-merge
|
||||
# Run pipeline by default if it was triggered by Marge Bot, is for a
|
||||
# merge request, and any files affecting the pipeline were changed
|
||||
- if: *is-pre-merge-for-marge
|
||||
changes:
|
||||
*all_paths
|
||||
when: manual
|
||||
# Skip everything for pre-merge and merge pipelines which don't change
|
||||
# anything in the build
|
||||
- if: *is-merge-attempt
|
||||
when: never
|
||||
- if: *is-pre-merge
|
||||
when: never
|
||||
# Build everything after someone bypassed the CI
|
||||
- if: *is-direct-push
|
||||
when: on_success
|
||||
# Build everything when pushing to staging branches
|
||||
- if: *is-staging-push
|
||||
# Run pipeline by default in the main project if it was not triggered by
|
||||
# Marge Bot, and any files affecting the pipeline were changed
|
||||
- if: *is-post-merge-not-for-marge
|
||||
changes:
|
||||
*all_paths
|
||||
when: on_success
|
||||
# Build everything in scheduled pipelines
|
||||
- if: *is-scheduled-pipeline
|
||||
when: on_success
|
||||
# Allow building everything in fork pipelines, but build nothing unless
|
||||
# manually triggered
|
||||
- when: manual
|
||||
|
||||
# Repeat of the above but with `when: on_success` replaced with
|
||||
# `when: delayed` + `start_in:`, for build-only jobs.
|
||||
# Note: make sure the branches in this list are the same as in
|
||||
# `.container+build-rules` above.
|
||||
.build-only-delayed-rules:
|
||||
rules:
|
||||
- !reference [.common-rules, rules]
|
||||
# Run when re-enabling a disabled farm, but not when disabling it
|
||||
- !reference [.disable-farm-mr-rules, rules]
|
||||
# Never run immediately after merging, as we just ran everything
|
||||
- !reference [.never-post-merge-rules, rules]
|
||||
# Build everything in merge pipelines, if any files affecting the pipeline
|
||||
# were changed
|
||||
- if: *is-merge-attempt
|
||||
changes: *all_paths
|
||||
when: delayed
|
||||
start_in: &build-delay 5 minutes
|
||||
# Same as above, but for pre-merge pipelines
|
||||
- if: *is-pre-merge
|
||||
changes: *all_paths
|
||||
when: manual
|
||||
# Skip everything for pre-merge and merge pipelines which don't change
|
||||
# anything in the build
|
||||
- if: *is-merge-attempt
|
||||
# Just skip everything for MRs which don't actually change anything in the
|
||||
# build - the same rules as above, but without the file-change rules
|
||||
- if: *is-pre-merge-for-marge
|
||||
when: never
|
||||
- if: *is-pre-merge
|
||||
- if: *is-post-merge
|
||||
when: never
|
||||
# Build everything after someone bypassed the CI
|
||||
- if: *is-direct-push
|
||||
when: delayed
|
||||
start_in: *build-delay
|
||||
# Build everything when pushing to staging branches
|
||||
- if: *is-staging-push
|
||||
when: delayed
|
||||
start_in: *build-delay
|
||||
# Build everything in scheduled pipelines
|
||||
- if: *is-scheduled-pipeline
|
||||
when: delayed
|
||||
start_in: *build-delay
|
||||
# Allow building everything in fork pipelines, but build nothing unless
|
||||
# manually triggered
|
||||
# Always allow user branches etc to trigger jobs manually
|
||||
- when: manual
|
||||
|
||||
|
||||
.ci-deqp-artifacts:
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
|
||||
name: "mesa_${CI_JOB_NAME}"
|
||||
when: always
|
||||
untracked: false
|
||||
paths:
|
||||
@@ -333,7 +209,6 @@ include:
|
||||
- artifacts
|
||||
- _build/meson-logs/*.txt
|
||||
- _build/meson-logs/strace
|
||||
- _build/.ninja_log
|
||||
|
||||
# Git archive
|
||||
|
||||
@@ -343,89 +218,44 @@ make git archive:
|
||||
stage: git-archive
|
||||
rules:
|
||||
- !reference [.scheduled_pipeline-rules, rules]
|
||||
# ensure we are running on packet
|
||||
tags:
|
||||
- packet.net
|
||||
script:
|
||||
# Compactify the .git directory
|
||||
- git gc --aggressive
|
||||
# Download & cache the perfetto subproject as well.
|
||||
- rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl --fail https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
|
||||
- rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
|
||||
# compress the current folder
|
||||
- tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
|
||||
|
||||
- s3_upload ../$CI_PROJECT_NAME.tar.gz "https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/"
|
||||
- ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
|
||||
|
||||
|
||||
# Sanity checks of MR settings and commit logs
|
||||
sanity:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: sanity
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
rules:
|
||||
- if: *is-pre-merge
|
||||
when: on_success
|
||||
- when: never
|
||||
# Other cases default to never
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
script:
|
||||
# ci-fairy check-commits --junit-xml=check-commits.xml
|
||||
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
|
||||
- |
|
||||
set -eu
|
||||
image_tags=(
|
||||
ALPINE_X86_64_BUILD_TAG
|
||||
ALPINE_X86_64_LAVA_SSH_TAG
|
||||
DEBIAN_BASE_TAG
|
||||
DEBIAN_BUILD_TAG
|
||||
DEBIAN_PYUTILS_TAG
|
||||
DEBIAN_TEST_ANDROID_TAG
|
||||
DEBIAN_TEST_GL_TAG
|
||||
DEBIAN_TEST_VK_TAG
|
||||
FEDORA_X86_64_BUILD_TAG
|
||||
KERNEL_ROOTFS_TAG
|
||||
KERNEL_TAG
|
||||
PKG_REPO_REV
|
||||
WINDOWS_X64_BUILD_TAG
|
||||
WINDOWS_X64_MSVC_TAG
|
||||
WINDOWS_X64_TEST_TAG
|
||||
)
|
||||
for var in "${image_tags[@]}"
|
||||
do
|
||||
if [ "$(echo -n "${!var}" | wc -c)" -gt 20 ]
|
||||
then
|
||||
echo "$var is too long; please make sure it is at most 20 chars."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
artifacts:
|
||||
when: on_failure
|
||||
reports:
|
||||
junit: check-*.xml
|
||||
|
||||
|
||||
mr-label-maker-test:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: sanity
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
rules:
|
||||
- !reference [.mr-label-maker-rules, rules]
|
||||
variables:
|
||||
GIT_STRATEGY: fetch
|
||||
timeout: 10m
|
||||
script:
|
||||
- set -eu
|
||||
- python3 -m venv .venv
|
||||
- source .venv/bin/activate
|
||||
- pip install git+https://gitlab.freedesktop.org/freedesktop/mr-label-maker
|
||||
- mr-label-maker --dry-run --mr $CI_MERGE_REQUEST_IID
|
||||
|
||||
# Jobs that need to pass before spending hardware resources on further testing
|
||||
.required-for-hardware-jobs:
|
||||
needs:
|
||||
- job: clang-format
|
||||
optional: true
|
||||
- job: rustfmt
|
||||
optional: true
|
||||
artifacts: false
|
||||
- job: yaml-toml-shell-py-test
|
||||
optional: true
|
||||
artifacts: false
|
||||
|
@@ -1,33 +0,0 @@
|
||||
[flake8]
|
||||
exclude = .venv*,
|
||||
|
||||
# PEP 8 Style Guide limits line length to 79 characters
|
||||
max-line-length = 159
|
||||
|
||||
ignore =
|
||||
# continuation line under-indented for hanging indent
|
||||
E121
|
||||
# continuation line over-indented for hanging indent
|
||||
E126,
|
||||
# continuation line under-indented for visual indent
|
||||
E128,
|
||||
# whitespace before ':'
|
||||
E203,
|
||||
# missing whitespace around arithmetic operator
|
||||
E226,
|
||||
# missing whitespace after ','
|
||||
E231,
|
||||
# expected 2 blank lines, found 1
|
||||
E302,
|
||||
# too many blank lines
|
||||
E303,
|
||||
# imported but unused
|
||||
F401,
|
||||
# f-string is missing placeholders
|
||||
F541,
|
||||
# local variable assigned to but never used
|
||||
F841,
|
||||
# line break before binary operator
|
||||
W503,
|
||||
# line break after binary operator
|
||||
W504,
|
@@ -9,9 +9,6 @@
|
||||
# submission, so skip it in the regular CI.
|
||||
dEQP-VK.api.driver_properties.conformance_version
|
||||
|
||||
# Exclude this test which might fail when a new extension is implemented.
|
||||
dEQP-VK.info.device_extensions
|
||||
|
||||
# These are tremendously slow (pushing toward a minute), and aren't
|
||||
# reliable to be run in parallel with other tests due to CPU-side timing.
|
||||
dEQP-GLES[0-9]*.functional.flush_finish.*
|
||||
@@ -39,77 +36,3 @@ spec@!opengl 1.1@windowoverlap
|
||||
# Note that "glx-" tests don't appear in x11-skips.txt because they can be
|
||||
# run even if PIGLIT_PLATFORM=gbm (for example)
|
||||
glx@glx-copy-sub-buffer.*
|
||||
|
||||
# A majority of the tests introduced in CTS 1.3.7.0 are experiencing failures and flakes.
|
||||
# Disable these tests until someone with a more deeper understanding of EGL examines them.
|
||||
#
|
||||
# Note: on sc8280xp/a690 I get identical results (same passes and fails)
|
||||
# between freedreno, zink, and llvmpipe, so I believe this is either a
|
||||
# deqp bug or egl/wayland bug, rather than driver issue.
|
||||
#
|
||||
# With llvmpipe, the failing tests have the error message:
|
||||
#
|
||||
# "Illegal sampler view creation without bind flag"
|
||||
#
|
||||
# which might be a hint. (But some passing tests also have the same
|
||||
# error message.)
|
||||
#
|
||||
# more context from David Heidelberg on IRC: the deqp commit where these
|
||||
# started failing is: https://github.com/KhronosGroup/VK-GL-CTS/commit/79b25659bcbced0cfc2c3fe318951c585f682abe
|
||||
# prior to that they were skipping.
|
||||
wayland-dEQP-EGL.functional.color_clears.single_context.gles1.other
|
||||
wayland-dEQP-EGL.functional.color_clears.single_context.gles2.other
|
||||
wayland-dEQP-EGL.functional.color_clears.single_context.gles3.other
|
||||
wayland-dEQP-EGL.functional.color_clears.multi_context.gles1.other
|
||||
wayland-dEQP-EGL.functional.color_clears.multi_context.gles2.other
|
||||
wayland-dEQP-EGL.functional.color_clears.multi_context.gles3.other
|
||||
wayland-dEQP-EGL.functional.color_clears.multi_context.gles1_gles2.other
|
||||
wayland-dEQP-EGL.functional.color_clears.multi_context.gles1_gles2_gles3.other
|
||||
wayland-dEQP-EGL.functional.color_clears.multi_thread.gles1.other
|
||||
wayland-dEQP-EGL.functional.color_clears.multi_thread.gles2.other
|
||||
wayland-dEQP-EGL.functional.color_clears.multi_thread.gles3.other
|
||||
wayland-dEQP-EGL.functional.color_clears.multi_thread.gles1_gles2.other
|
||||
wayland-dEQP-EGL.functional.color_clears.multi_thread.gles1_gles2_gles3.other
|
||||
|
||||
# Seems to be the same is as wayland-dEQP-EGL.functional.color_clears.*
|
||||
wayland-dEQP-EGL.functional.render.single_context.gles2.other
|
||||
wayland-dEQP-EGL.functional.render.single_context.gles3.other
|
||||
wayland-dEQP-EGL.functional.render.multi_context.gles2.other
|
||||
wayland-dEQP-EGL.functional.render.multi_context.gles3.other
|
||||
wayland-dEQP-EGL.functional.render.multi_context.gles2_gles3.other
|
||||
wayland-dEQP-EGL.functional.render.multi_thread.gles2.other
|
||||
wayland-dEQP-EGL.functional.render.multi_thread.gles3.other
|
||||
wayland-dEQP-EGL.functional.render.multi_thread.gles2_gles3.other
|
||||
|
||||
# These test the loader more than the implementation and are broken because the
|
||||
# Vulkan loader in Debian is too old
|
||||
dEQP-VK.api.get_device_proc_addr.non_enabled
|
||||
dEQP-VK.api.version_check.unavailable_entry_points
|
||||
|
||||
# These tests are flaking too much recently on almost all drivers, so better skip them until the cause is identified
|
||||
spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex
|
||||
spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex@'vs_input2[1][0]' on GL_PROGRAM_INPUT
|
||||
|
||||
# These tests attempt to read from the front buffer after a swap. They are skipped
|
||||
# on both X11 and gbm, but for different reasons:
|
||||
#
|
||||
# On X11: Given that we run piglit tests in parallel in Mesa CI, and don't have a
|
||||
# compositor running, the frontbuffer reads may end up with undefined results from
|
||||
# windows overlapping us.
|
||||
# Piglit does mark these tests as not to be run in parallel, but deqp-runner
|
||||
# doesn't respect that. We need to extend deqp-runner to allow some tests to be
|
||||
# marked as single-threaded and run after the rayon loop if we want to support
|
||||
# them.
|
||||
# Other front-buffer access tests like fbo-sys-blit, fbo-sys-sub-blit, or
|
||||
# fcc-front-buffer-distraction don't appear here, because the DRI3 fake-front
|
||||
# handling should be holding the pixels drawn by the test even if we happen to fail
|
||||
# GL's window system pixel occlusion test.
|
||||
# Note that glx skips don't appear here, they're in all-skips.txt (in case someone
|
||||
# sets PIGLIT_PLATFORM=gbm to mostly use gbm, but still has an X server running).
|
||||
#
|
||||
# On gbm: gbm does not support reading the front buffer after a swapbuffers, and
|
||||
# that's intentional. Don't bother running these tests when PIGLIT_PLATFORM=gbm.
|
||||
# Note that this doesn't include tests like fbo-sys-blit, which draw/read front
|
||||
# but don't swap.
|
||||
spec@!opengl 1.0@gl-1.0-swapbuffers-behavior
|
||||
spec@!opengl 1.1@read-front
|
||||
|
@@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
# shellcheck disable=SC1091 # paths only become valid at runtime
|
||||
|
||||
. "${SCRIPTS_DIR}/setup-test-env.sh"
|
||||
|
||||
export PATH=/android-tools/android-cts/jdk/bin/:/android-tools/build-tools:$PATH
|
||||
export JAVA_HOME=/android-tools/android-cts/jdk
|
||||
|
||||
# Wait for the appops service to show up
|
||||
while [ "$($ADB shell dumpsys -l | grep appops)" = "" ] ; do sleep 1; done
|
||||
|
||||
SKIP_FILE="$INSTALL/${GPU_VERSION}-android-cts-skips.txt"
|
||||
|
||||
EXCLUDE_FILTERS=""
|
||||
if [ -e "$SKIP_FILE" ]; then
|
||||
EXCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$SKIP_FILE" | sed -s 's/.*/--exclude-filter "\0" /g')"
|
||||
fi
|
||||
|
||||
INCLUDE_FILE="$INSTALL/${GPU_VERSION}-android-cts-include.txt"
|
||||
|
||||
if [ -e "$INCLUDE_FILE" ]; then
|
||||
INCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$INCLUDE_FILE" | sed -s 's/.*/--include-filter "\0" /g')"
|
||||
else
|
||||
INCLUDE_FILTERS=$(printf -- "--include-filter %s " $ANDROID_CTS_MODULES | sed -e 's/ $//g')
|
||||
fi
|
||||
|
||||
set +e
|
||||
eval "/android-tools/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \
|
||||
$EXCLUDE_FILTERS \
|
||||
$INCLUDE_FILTERS
|
||||
|
||||
[ "$(grep "^FAILED" /android-tools/android-cts/results/latest/invocation_summary.txt | tr -d ' ' | cut -d ':' -f 2)" = "0" ]
|
||||
|
||||
# shellcheck disable=SC2034 # EXIT_CODE is used by the script that sources this one
|
||||
EXIT_CODE=$?
|
||||
set -e
|
||||
|
||||
section_switch cuttlefish_results "cuttlefish: gathering the results"
|
||||
|
||||
cp -r "/android-tools/android-cts/results/latest"/* $RESULTS_DIR
|
||||
cp -r "/android-tools/android-cts/logs/latest"/* $RESULTS_DIR
|
||||
|
||||
section_end cuttlefish_results
|
@@ -1,96 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
# shellcheck disable=SC1091 # paths only become valid at runtime
|
||||
|
||||
. "${SCRIPTS_DIR}/setup-test-env.sh"
|
||||
|
||||
# deqp
|
||||
|
||||
$ADB shell mkdir -p /data/deqp
|
||||
$ADB push /deqp-gles/modules/egl/deqp-egl-android /data/deqp
|
||||
$ADB push /deqp-gles/mustpass/egl-main.txt.zst /data/deqp
|
||||
$ADB push /deqp-vk/external/vulkancts/modules/vulkan/* /data/deqp
|
||||
$ADB push /deqp-vk/mustpass/vk-main.txt.zst /data/deqp
|
||||
$ADB push /deqp-tools/* /data/deqp
|
||||
$ADB push /deqp-runner/deqp-runner /data/deqp
|
||||
|
||||
$ADB push "$INSTALL/all-skips.txt" /data/deqp
|
||||
$ADB push "$INSTALL/angle-skips.txt" /data/deqp
|
||||
if [ -e "$INSTALL/$GPU_VERSION-flakes.txt" ]; then
|
||||
$ADB push "$INSTALL/$GPU_VERSION-flakes.txt" /data/deqp
|
||||
fi
|
||||
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
|
||||
$ADB push "$INSTALL/$GPU_VERSION-fails.txt" /data/deqp
|
||||
fi
|
||||
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
|
||||
$ADB push "$INSTALL/$GPU_VERSION-skips.txt" /data/deqp
|
||||
fi
|
||||
$ADB push "$INSTALL/deqp-$DEQP_SUITE.toml" /data/deqp
|
||||
|
||||
BASELINE=""
|
||||
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
|
||||
BASELINE="--baseline /data/deqp/$GPU_VERSION-fails.txt"
|
||||
fi
|
||||
|
||||
# Default to an empty known flakes file if it doesn't exist.
|
||||
$ADB shell "touch /data/deqp/$GPU_VERSION-flakes.txt"
|
||||
|
||||
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
|
||||
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/$GPU_VERSION-skips.txt"
|
||||
fi
|
||||
|
||||
if [ -n "$ANGLE_TAG" ]; then
|
||||
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/angle-skips.txt"
|
||||
fi
|
||||
|
||||
AOSP_RESULTS=/data/deqp/results
|
||||
uncollapsed_section_switch cuttlefish_test "cuttlefish: testing"
|
||||
|
||||
set +e
|
||||
$ADB shell "mkdir ${AOSP_RESULTS}; cd ${AOSP_RESULTS}/..; \
|
||||
XDG_CACHE_HOME=/data/local/tmp \
|
||||
./deqp-runner \
|
||||
suite \
|
||||
--suite /data/deqp/deqp-$DEQP_SUITE.toml \
|
||||
--output $AOSP_RESULTS \
|
||||
--skips /data/deqp/all-skips.txt $DEQP_SKIPS \
|
||||
--flakes /data/deqp/$GPU_VERSION-flakes.txt \
|
||||
--testlog-to-xml /data/deqp/testlog-to-xml \
|
||||
--shader-cache-dir /data/local/tmp \
|
||||
--fraction-start ${CI_NODE_INDEX:-1} \
|
||||
--fraction $(( CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
|
||||
--jobs ${FDO_CI_CONCURRENT:-4} \
|
||||
$BASELINE \
|
||||
${DEQP_RUNNER_MAX_FAILS:+--max-fails \"$DEQP_RUNNER_MAX_FAILS\"} \
|
||||
"
|
||||
|
||||
# shellcheck disable=SC2034 # EXIT_CODE is used by the script that sources this one
|
||||
EXIT_CODE=$?
|
||||
set -e
|
||||
section_switch cuttlefish_results "cuttlefish: gathering the results"
|
||||
|
||||
$ADB pull "$AOSP_RESULTS/." "$RESULTS_DIR"
|
||||
|
||||
# Remove all but the first 50 individual XML files uploaded as artifacts, to
|
||||
# save fd.o space when you break everything.
|
||||
find $RESULTS_DIR -name \*.xml | \
|
||||
sort -n |
|
||||
sed -n '1,+49!p' | \
|
||||
xargs rm -f
|
||||
|
||||
# If any QPA XMLs are there, then include the XSL/CSS in our artifacts.
|
||||
find $RESULTS_DIR -name \*.xml \
|
||||
-exec cp /deqp-tools/testlog.css /deqp-tools/testlog.xsl "$RESULTS_DIR/" ";" \
|
||||
-quit
|
||||
|
||||
$ADB shell "cd ${AOSP_RESULTS}/..; \
|
||||
./deqp-runner junit \
|
||||
--testsuite dEQP \
|
||||
--results $AOSP_RESULTS/failures.csv \
|
||||
--output $AOSP_RESULTS/junit.xml \
|
||||
--limit 50 \
|
||||
--template \"See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml\""
|
||||
|
||||
$ADB pull "$AOSP_RESULTS/junit.xml" "$RESULTS_DIR"
|
||||
|
||||
section_end cuttlefish_results
|
@@ -1,118 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
# shellcheck disable=SC1091 # paths only become valid at runtime
|
||||
|
||||
# Set default ADB command if not set already
|
||||
|
||||
: "${ADB:=adb}"
|
||||
|
||||
$ADB wait-for-device root
|
||||
sleep 1
|
||||
|
||||
# overlay
|
||||
|
||||
REMOUNT_PATHS="/vendor"
|
||||
if [ "$ANDROID_VERSION" -ge 15 ]; then
|
||||
REMOUNT_PATHS="$REMOUNT_PATHS /system"
|
||||
fi
|
||||
|
||||
OV_TMPFS="/data/overlay-remount"
|
||||
$ADB shell mkdir -p "$OV_TMPFS"
|
||||
$ADB shell mount -t tmpfs none "$OV_TMPFS"
|
||||
|
||||
for path in $REMOUNT_PATHS; do
|
||||
$ADB shell mkdir -p "${OV_TMPFS}${path}-upper"
|
||||
$ADB shell mkdir -p "${OV_TMPFS}${path}-work"
|
||||
|
||||
opts="lowerdir=${path},upperdir=${OV_TMPFS}${path}-upper,workdir=${OV_TMPFS}${path}-work"
|
||||
$ADB shell mount -t overlay -o "$opts" none ${path}
|
||||
done
|
||||
|
||||
$ADB shell setenforce 0
|
||||
|
||||
# download Android Mesa from S3
|
||||
MESA_ANDROID_ARTIFACT_URL=https://${PIPELINE_ARTIFACTS_BASE}/${S3_ANDROID_ARTIFACT_NAME}.tar.zst
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -o ${S3_ANDROID_ARTIFACT_NAME}.tar.zst ${MESA_ANDROID_ARTIFACT_URL}
|
||||
mkdir /mesa-android
|
||||
tar -C /mesa-android -xvf ${S3_ANDROID_ARTIFACT_NAME}.tar.zst
|
||||
rm "${S3_ANDROID_ARTIFACT_NAME}.tar.zst" &
|
||||
|
||||
INSTALL="/mesa-android/install"
|
||||
|
||||
# replace libraries
|
||||
|
||||
$ADB shell rm -f /vendor/lib64/libgallium_dri.so*
|
||||
$ADB shell rm -f /vendor/lib64/egl/libEGL_mesa.so*
|
||||
$ADB shell rm -f /vendor/lib64/egl/libGLESv1_CM_mesa.so*
|
||||
$ADB shell rm -f /vendor/lib64/egl/libGLESv2_mesa.so*
|
||||
|
||||
$ADB push "$INSTALL/lib/libgallium_dri.so" /vendor/lib64/libgallium_dri.so
|
||||
$ADB push "$INSTALL/lib/libEGL.so" /vendor/lib64/egl/libEGL_mesa.so
|
||||
$ADB push "$INSTALL/lib/libGLESv1_CM.so" /vendor/lib64/egl/libGLESv1_CM_mesa.so
|
||||
$ADB push "$INSTALL/lib/libGLESv2.so" /vendor/lib64/egl/libGLESv2_mesa.so
|
||||
|
||||
$ADB shell rm -f /vendor/lib64/hw/vulkan.lvp.so*
|
||||
$ADB shell rm -f /vendor/lib64/hw/vulkan.virtio.so*
|
||||
$ADB shell rm -f /vendor/lib64/hw/vulkan.intel.so*
|
||||
|
||||
$ADB push "$INSTALL/lib/libvulkan_lvp.so" /vendor/lib64/hw/vulkan.lvp.so
|
||||
$ADB push "$INSTALL/lib/libvulkan_virtio.so" /vendor/lib64/hw/vulkan.virtio.so
|
||||
$ADB push "$INSTALL/lib/libvulkan_intel.so" /vendor/lib64/hw/vulkan.intel.so
|
||||
|
||||
$ADB shell rm -f /vendor/lib64/egl/libEGL_emulation.so*
|
||||
$ADB shell rm -f /vendor/lib64/egl/libGLESv1_CM_emulation.so*
|
||||
$ADB shell rm -f /vendor/lib64/egl/libGLESv2_emulation.so*
|
||||
|
||||
ANGLE_DEST_PATH=/vendor/lib64/egl
|
||||
if [ "$ANDROID_VERSION" -ge 15 ]; then
|
||||
ANGLE_DEST_PATH=/system/lib64
|
||||
fi
|
||||
|
||||
$ADB shell rm -f "$ANGLE_DEST_PATH/libEGL_angle.so"*
|
||||
$ADB shell rm -f "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"*
|
||||
$ADB shell rm -f "$ANGLE_DEST_PATH/libGLESv2_angle.so"*
|
||||
|
||||
$ADB push /angle/libEGL_angle.so "$ANGLE_DEST_PATH/libEGL_angle.so"
|
||||
$ADB push /angle/libGLESv1_CM_angle.so "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"
|
||||
$ADB push /angle/libGLESv2_angle.so "$ANGLE_DEST_PATH/libGLESv2_angle.so"
|
||||
|
||||
get_gles_runtime_version() {
|
||||
while [ "$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" = "" ] ; do sleep 1; done
|
||||
$ADB shell dumpsys SurfaceFlinger | grep GLES
|
||||
}
|
||||
|
||||
# Check what GLES implementation is used before loading the new libraries
|
||||
get_gles_runtime_version
|
||||
|
||||
# restart Android shell, so that services use the new libraries
|
||||
$ADB shell stop
|
||||
$ADB shell start
|
||||
|
||||
# Check what GLES implementation is used after loading the new libraries
|
||||
GLES_RUNTIME_VERSION="$(get_gles_runtime_version)"
|
||||
|
||||
if [ -n "$ANGLE_TAG" ]; then
|
||||
# Note: we are injecting the ANGLE libs too, so we need to check if the
|
||||
# ANGLE libs are being used after the shell restart.
|
||||
ANGLE_HASH=$(head -c 12 /angle/version)
|
||||
if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep --quiet "${ANGLE_HASH}"; then
|
||||
echo "Fatal: Android is loading a wrong version of the ANGLE libs: ${ANGLE_HASH}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION")
|
||||
if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep --quiet "${MESA_BUILD_VERSION}$"; then
|
||||
echo "Fatal: Android is loading a wrong version of the Mesa3D GLES libs: ${GLES_RUNTIME_VERSION}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$USE_ANDROID_CTS" ]; then
|
||||
# The script sets EXIT_CODE
|
||||
. "$(dirname "$0")/android-cts-runner.sh"
|
||||
else
|
||||
# The script sets EXIT_CODE
|
||||
. "$(dirname "$0")/android-deqp-runner.sh"
|
||||
fi
|
||||
|
||||
exit $EXIT_CODE
|
@@ -2,154 +2,67 @@ version: 1
|
||||
|
||||
# Rules to match for a machine to qualify
|
||||
target:
|
||||
id: '{{ CI_RUNNER_DESCRIPTION }}'
|
||||
{% if tags %}
|
||||
tags:
|
||||
{% for tag in tags %}
|
||||
- '{{ tag | trim }}'
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
timeouts:
|
||||
|
||||
first_console_activity: # This limits the time it can take to receive the first console log
|
||||
minutes: {{ B2C_TIMEOUT_FIRST_CONSOLE_ACTIVITY_MINUTES | default(0, true) }}
|
||||
seconds: {{ B2C_TIMEOUT_FIRST_CONSOLE_ACTIVITY_SECONDS | default(0, true) }}
|
||||
retries: {{ B2C_TIMEOUT_FIRST_CONSOLE_ACTIVITY_RETRIES }}
|
||||
|
||||
minutes: {{ timeout_first_minutes }}
|
||||
retries: {{ timeout_first_retries }}
|
||||
console_activity: # Reset every time we receive a message from the logs
|
||||
minutes: {{ B2C_TIMEOUT_CONSOLE_ACTIVITY_MINUTES | default(0, true) }}
|
||||
seconds: {{ B2C_TIMEOUT_CONSOLE_ACTIVITY_SECONDS | default(0, true) }}
|
||||
retries: {{ B2C_TIMEOUT_CONSOLE_ACTIVITY_RETRIES }}
|
||||
|
||||
minutes: {{ timeout_minutes }}
|
||||
retries: {{ timeout_retries }}
|
||||
boot_cycle:
|
||||
minutes: {{ B2C_TIMEOUT_BOOT_MINUTES | default(0, true) }}
|
||||
seconds: {{ B2C_TIMEOUT_BOOT_SECONDS | default(0, true) }}
|
||||
retries: {{ B2C_TIMEOUT_BOOT_RETRIES }}
|
||||
|
||||
minutes: {{ timeout_boot_minutes }}
|
||||
retries: {{ timeout_boot_retries }}
|
||||
overall: # Maximum time the job can take, not overrideable by the "continue" deployment
|
||||
minutes: {{ B2C_TIMEOUT_OVERALL_MINUTES | default(0, true) }}
|
||||
seconds: {{ B2C_TIMEOUT_OVERALL_SECONDS | default(0, true) }}
|
||||
minutes: {{ timeout_overall_minutes }}
|
||||
retries: 0
|
||||
# no retries possible here
|
||||
|
||||
watchdogs:
|
||||
boot:
|
||||
minutes: {{ B2C_TIMEOUT_BOOT_WD_MINUTES | default(0, true) }}
|
||||
seconds: {{ B2C_TIMEOUT_BOOT_WD_SECONDS | default(0, true) }}
|
||||
retries: {{ B2C_TIMEOUT_BOOT_WD_RETRIES | default(0, true) }}
|
||||
|
||||
console_patterns:
|
||||
session_end:
|
||||
regex: >-
|
||||
{{ B2C_SESSION_END_REGEX }}
|
||||
{% if B2C_SESSION_REBOOT_REGEX %}
|
||||
{{ session_end_regex }}
|
||||
{% if session_reboot_regex %}
|
||||
session_reboot:
|
||||
regex: >-
|
||||
{{ B2C_SESSION_REBOOT_REGEX }}
|
||||
{{ session_reboot_regex }}
|
||||
{% endif %}
|
||||
job_success:
|
||||
regex: >-
|
||||
{{ B2C_JOB_SUCCESS_REGEX }}
|
||||
{% if B2C_JOB_WARN_REGEX %}
|
||||
{{ job_success_regex }}
|
||||
job_warn:
|
||||
regex: >-
|
||||
{{ B2C_JOB_WARN_REGEX }}
|
||||
{% endif %}
|
||||
|
||||
{% if B2C_BOOT_WD_START_REGEX and B2C_BOOT_WD_STOP_REGEX %}
|
||||
watchdogs:
|
||||
boot:
|
||||
start:
|
||||
regex: >-
|
||||
{{ B2C_BOOT_WD_START_REGEX }}
|
||||
reset:
|
||||
regex: >-
|
||||
{{ B2C_BOOT_WD_RESET_REGEX | default(B2C_BOOT_WD_START_REGEX, true) }}
|
||||
stop:
|
||||
regex: >-
|
||||
{{ B2C_BOOT_WD_STOP_REGEX }}
|
||||
{% endif %}
|
||||
{{ job_warn_regex }}
|
||||
|
||||
# Environment to deploy
|
||||
deployment:
|
||||
# Initial boot
|
||||
start:
|
||||
storage:
|
||||
{% if B2C_IMAGESTORE_PLATFORM %}
|
||||
imagestore:
|
||||
public:
|
||||
# List of images that should be pulled into the image store ahead of execution
|
||||
images:
|
||||
mars:
|
||||
name: "{{ B2C_MACHINE_REGISTRATION_IMAGE }}"
|
||||
platform: "{{ B2C_IMAGESTORE_PLATFORM }}"
|
||||
tls_verify: false
|
||||
{% set machine_registration_image="{% raw %}{{ job.imagestore.public.mars.image_id }}{% endraw %}" %}
|
||||
telegraf:
|
||||
name: "{{ B2C_TELEGRAF_IMAGE }}"
|
||||
platform: "{{ B2C_IMAGESTORE_PLATFORM }}"
|
||||
tls_verify: false
|
||||
{% set telegraf_image="{% raw %}{{ job.imagestore.public.telegraf.image_id }}{% endraw %}" %}
|
||||
image_under_test:
|
||||
name: "{{ B2C_IMAGE_UNDER_TEST }}"
|
||||
platform: "{{ B2C_IMAGESTORE_PLATFORM }}"
|
||||
tls_verify: false
|
||||
{% set image_under_test="{% raw %}{{ job.imagestore.public.image_under_test.image_id }}{% endraw %}" %}
|
||||
nbd:
|
||||
storage:
|
||||
max_connections: 5
|
||||
size: 10G
|
||||
{% endif %}
|
||||
|
||||
http:
|
||||
- path: "/install.tar.zst"
|
||||
url: "{{ B2C_INSTALL_TARBALL_URL }}"
|
||||
- path: "/b2c-extra-args"
|
||||
data: >
|
||||
b2c.pipefail b2c.poweroff_delay={{ B2C_POWEROFF_DELAY }}
|
||||
b2c.minio="gateway,{{ '{{' }} minio_url }},{{ '{{' }} job_bucket_access_key }},{{ '{{' }} job_bucket_secret_key }}"
|
||||
b2c.volume="{{ '{{' }} job_bucket }}-results,mirror=gateway/{{ '{{' }} job_bucket }},pull_on=pipeline_start,push_on=changes,overwrite{% for excl in B2C_JOB_VOLUME_EXCLUSIONS.split(',') %},exclude={{ excl }}{% endfor %},remove,expiration=pipeline_end,preserve"
|
||||
{% for volume in B2C_VOLUMES %}
|
||||
b2c.volume={{ volume }}
|
||||
{% endfor %}
|
||||
b2c.run_service="--privileged --tls-verify=false --pid=host {{ B2C_TELEGRAF_IMAGE }}" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
|
||||
b2c.run="-ti --tls-verify=false {{ B2C_MACHINE_REGISTRATION_IMAGE }} {% if B2C_MARS_SETUP_TAGS %}setup --tags {{ B2C_MARS_SETUP_TAGS }}{% else %}check{% endif %}"
|
||||
b2c.run="-v {{ '{{' }} job_bucket }}-results:{{ CI_PROJECT_DIR }} -w {{ CI_PROJECT_DIR }} {% for mount_volume in B2C_MOUNT_VOLUMES %} -v {{ mount_volume }}{% endfor %} --tls-verify=false --entrypoint bash {{ B2C_IMAGE_UNDER_TEST }} -euc 'curl --fail -q {{ '{{' }} job.http.url }}/install.tar.zst | tar --zstd -x; {{ B2C_CONTAINER_CMD }}'"
|
||||
kernel:
|
||||
{% if B2C_KERNEL_URL %}
|
||||
url: '{{ B2C_KERNEL_URL }}'
|
||||
{% endif %}
|
||||
|
||||
# NOTE: b2c.cache_device should not be here, but this works around
|
||||
# a limitation of b2c which will be removed in the next release
|
||||
url: '{{ kernel_url }}'
|
||||
cmdline: >
|
||||
SALAD.machine_id={{ '{{' }} machine_id }}
|
||||
console={{ '{{' }} local_tty_device }},115200
|
||||
b2c.ntp_peer=10.42.0.1
|
||||
b2c.extra_args_url={{ '{{' }} job.http.url }}/b2c-extra-args
|
||||
{% if B2C_IMAGESTORE_PLATFORM is defined %}
|
||||
{{ '{{' }} imagestore.mount("public").nfs.to_b2c_filesystem("publicimgstore") }}
|
||||
b2c.storage="additionalimagestores=publicimgstore"
|
||||
b2c.nbd=/dev/nbd0,host=ci-gateway,port={% raw %}{{ '{{' }} job.nbd.storage.tcp_port }}{% endraw %},connections=5
|
||||
b2c.cache_device=/dev/nbd0
|
||||
{% else %}
|
||||
b2c.cache_device=auto
|
||||
{% endif %}
|
||||
{% if B2C_KERNEL_CMDLINE_EXTRAS is defined %}
|
||||
{{ B2C_KERNEL_CMDLINE_EXTRAS }}
|
||||
console={{ '{{' }} local_tty_device }},115200 earlyprintk=vga,keep
|
||||
loglevel={{ log_level }} no_hash_pointers
|
||||
b2c.service="--privileged --tls-verify=false --pid=host docker://{{ '{{' }} fdo_proxy_registry }}/gfx-ci/ci-tron/telegraf:latest" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
|
||||
b2c.container="-ti --tls-verify=false docker://{{ '{{' }} fdo_proxy_registry }}/gfx-ci/ci-tron/machine-registration:latest check"
|
||||
b2c.ntp_peer=10.42.0.1 b2c.pipefail b2c.cache_device=auto b2c.poweroff_delay={{ poweroff_delay }}
|
||||
b2c.minio="gateway,{{ '{{' }} minio_url }},{{ '{{' }} job_bucket_access_key }},{{ '{{' }} job_bucket_secret_key }}"
|
||||
b2c.volume="{{ '{{' }} job_bucket }}-results,mirror=gateway/{{ '{{' }} job_bucket }},pull_on=pipeline_start,push_on=changes,overwrite{% for excl in job_volume_exclusions %},exclude={{ excl }}{% endfor %},remove,expiration=pipeline_end,preserve"
|
||||
{% for volume in volumes %}
|
||||
b2c.volume={{ volume }}
|
||||
{% endfor %}
|
||||
b2c.container="-v {{ '{{' }} job_bucket }}-results:{{ working_dir }} -w {{ working_dir }} {% for mount_volume in mount_volumes %} -v {{ mount_volume }}{% endfor %} --tls-verify=false docker://{{ local_container }} {{ container_cmd }}"
|
||||
{% if cmdline_extras is defined %}
|
||||
{{ cmdline_extras }}
|
||||
{% endif %}
|
||||
|
||||
{% if B2C_INITRAMFS_URL or B2C_FIRMWARE_URL %}
|
||||
initramfs:
|
||||
{% if B2C_FIRMWARE_URL %}
|
||||
- url: '{{ B2C_FIRMWARE_URL }}'
|
||||
{% endif %}
|
||||
{% if B2C_INITRAMFS_URL %}
|
||||
- url: '{{ B2C_INITRAMFS_URL }}'
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
url: '{{ initramfs_url }}'
|
||||
|
||||
{% if B2C_DTB_URL %}
|
||||
dtb:
|
||||
url: '{{ B2C_DTB_URL }}'
|
||||
{% if B2C_DTB_MATCH %}
|
||||
format:
|
||||
archive:
|
||||
match: "{{ B2C_DTB_MATCH }}"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@@ -22,19 +22,86 @@
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
from argparse import ArgumentParser
|
||||
from os import environ, path
|
||||
import json
|
||||
|
||||
|
||||
# Pass through all the CI and B2C environment variables
|
||||
values = {
|
||||
key: environ[key]
|
||||
for key in environ if key.startswith("B2C_") or key.startswith("CI_")
|
||||
}
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument('--ci-job-id')
|
||||
parser.add_argument('--container-cmd')
|
||||
parser.add_argument('--initramfs-url')
|
||||
parser.add_argument('--job-success-regex')
|
||||
parser.add_argument('--job-warn-regex')
|
||||
parser.add_argument('--kernel-url')
|
||||
parser.add_argument('--log-level', type=int)
|
||||
parser.add_argument('--poweroff-delay', type=int)
|
||||
parser.add_argument('--session-end-regex')
|
||||
parser.add_argument('--session-reboot-regex')
|
||||
parser.add_argument('--tags', nargs='?', default='')
|
||||
parser.add_argument('--template', default='b2c.yml.jinja2.jinja2')
|
||||
parser.add_argument('--timeout-boot-minutes', type=int)
|
||||
parser.add_argument('--timeout-boot-retries', type=int)
|
||||
parser.add_argument('--timeout-first-minutes', type=int)
|
||||
parser.add_argument('--timeout-first-retries', type=int)
|
||||
parser.add_argument('--timeout-minutes', type=int)
|
||||
parser.add_argument('--timeout-overall-minutes', type=int)
|
||||
parser.add_argument('--timeout-retries', type=int)
|
||||
parser.add_argument('--job-volume-exclusions', nargs='?', default='')
|
||||
parser.add_argument('--volume', action='append')
|
||||
parser.add_argument('--mount-volume', action='append')
|
||||
parser.add_argument('--local-container', default=environ.get('B2C_LOCAL_CONTAINER', 'alpine:latest'))
|
||||
parser.add_argument('--working-dir')
|
||||
args = parser.parse_args()
|
||||
|
||||
env = Environment(loader=FileSystemLoader(path.dirname(environ['B2C_JOB_TEMPLATE'])),
|
||||
env = Environment(loader=FileSystemLoader(path.dirname(args.template)),
|
||||
trim_blocks=True, lstrip_blocks=True)
|
||||
|
||||
template = env.get_template(path.basename(environ['B2C_JOB_TEMPLATE']))
|
||||
template = env.get_template(path.basename(args.template))
|
||||
|
||||
with open(path.splitext(path.basename(environ['B2C_JOB_TEMPLATE']))[0], "w") as f:
|
||||
f.write(template.render(values))
|
||||
values = {}
|
||||
values['ci_job_id'] = args.ci_job_id
|
||||
values['container_cmd'] = args.container_cmd
|
||||
values['initramfs_url'] = args.initramfs_url
|
||||
values['job_success_regex'] = args.job_success_regex
|
||||
values['job_warn_regex'] = args.job_warn_regex
|
||||
values['kernel_url'] = args.kernel_url
|
||||
values['log_level'] = args.log_level
|
||||
values['poweroff_delay'] = args.poweroff_delay
|
||||
values['session_end_regex'] = args.session_end_regex
|
||||
values['session_reboot_regex'] = args.session_reboot_regex
|
||||
try:
|
||||
values['tags'] = json.loads(args.tags)
|
||||
except json.decoder.JSONDecodeError:
|
||||
values['tags'] = args.tags.split(",")
|
||||
values['template'] = args.template
|
||||
values['timeout_boot_minutes'] = args.timeout_boot_minutes
|
||||
values['timeout_boot_retries'] = args.timeout_boot_retries
|
||||
values['timeout_first_minutes'] = args.timeout_first_minutes
|
||||
values['timeout_first_retries'] = args.timeout_first_retries
|
||||
values['timeout_minutes'] = args.timeout_minutes
|
||||
values['timeout_overall_minutes'] = args.timeout_overall_minutes
|
||||
values['timeout_retries'] = args.timeout_retries
|
||||
if len(args.job_volume_exclusions) > 0:
|
||||
exclusions = args.job_volume_exclusions.split(",")
|
||||
values['job_volume_exclusions'] = [excl for excl in exclusions if len(excl) > 0]
|
||||
if args.volume is not None:
|
||||
values['volumes'] = args.volume
|
||||
if args.mount_volume is not None:
|
||||
values['mount_volumes'] = args.mount_volume
|
||||
values['working_dir'] = args.working_dir
|
||||
|
||||
assert(len(args.local_container) > 0)
|
||||
|
||||
# Use the gateway's pull-through registry caches to reduce load on fd.o.
|
||||
values['local_container'] = args.local_container
|
||||
for url, replacement in [('registry.freedesktop.org', '{{ fdo_proxy_registry }}'),
|
||||
('harbor.freedesktop.org', '{{ harbor_fdo_registry }}')]:
|
||||
values['local_container'] = values['local_container'].replace(url, replacement)
|
||||
|
||||
if 'B2C_KERNEL_CMDLINE_EXTRAS' in environ:
|
||||
values['cmdline_extras'] = environ['B2C_KERNEL_CMDLINE_EXTRAS']
|
||||
|
||||
f = open(path.splitext(path.basename(args.template))[0], "w")
|
||||
f.write(template.render(values))
|
||||
f.close()
|
||||
|
@@ -5,8 +5,6 @@
|
||||
# First stage: very basic setup to bring up network and /dev etc
|
||||
/init-stage1.sh
|
||||
|
||||
export CURRENT_SECTION=dut_boot
|
||||
|
||||
# Second stage: run jobs
|
||||
test $? -eq 0 && /init-stage2.sh
|
||||
|
||||
|
@@ -9,7 +9,6 @@
|
||||
# We're run from the root of the repo, make a helper var for our paths
|
||||
BM=$CI_PROJECT_DIR/install/bare-metal
|
||||
CI_COMMON=$CI_PROJECT_DIR/install/common
|
||||
CI_INSTALL=$CI_PROJECT_DIR/install
|
||||
|
||||
# Runner config checks
|
||||
if [ -z "$BM_SERIAL" ]; then
|
||||
@@ -50,10 +49,6 @@ if [ -z "$BM_CMDLINE" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. "${SCRIPTS_DIR}/setup-test-env.sh"
|
||||
|
||||
section_start prepare_rootfs "Preparing rootfs components"
|
||||
|
||||
set -ex
|
||||
|
||||
# Clear out any previous run's artifacts.
|
||||
@@ -90,40 +85,21 @@ rm -rf /tftp/*
|
||||
if echo "$BM_KERNEL" | grep -q http; then
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
$BM_KERNEL -o /tftp/vmlinuz
|
||||
elif [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_KERNEL}" -o /tftp/vmlinuz
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar.zst" -o modules.tar.zst
|
||||
tar --keep-directory-symlink --zstd -xf modules.tar.zst -C "/nfs/"
|
||||
rm modules.tar.zst &
|
||||
else
|
||||
cp /baremetal-files/"$BM_KERNEL" /tftp/vmlinuz
|
||||
fi
|
||||
echo "$BM_CMDLINE" > /tftp/cmdline
|
||||
|
||||
set +e
|
||||
STRUCTURED_LOG_FILE=results/job_detail.json
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update dut_job_type "${DEVICE_TYPE}"
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update farm "${FARM}"
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --create-dut-job dut_name "${CI_RUNNER_DESCRIPTION}"
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update-dut-time submit "${CI_JOB_STARTED_AT}"
|
||||
section_end prepare_rootfs
|
||||
|
||||
python3 $BM/cros_servo_run.py \
|
||||
--cpu $BM_SERIAL \
|
||||
--ec $BM_SERIAL_EC \
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT_MINUTES:-20}
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT:-20}
|
||||
ret=$?
|
||||
|
||||
section_start dut_cleanup "Cleaning up after job"
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close
|
||||
set -e
|
||||
|
||||
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
|
||||
# will look for them.
|
||||
cp -Rp /nfs/results/. results/
|
||||
section_end dut_cleanup
|
||||
|
||||
exit $ret
|
||||
|
@@ -4,74 +4,38 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
import argparse
|
||||
import datetime
|
||||
import math
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
from custom_logger import CustomLogger
|
||||
from serial_buffer import SerialBuffer
|
||||
|
||||
ANSI_ESCAPE="\x1b[0K"
|
||||
ANSI_COLOUR="\x1b[0;36m"
|
||||
ANSI_RESET="\x1b[0m"
|
||||
SECTION_START="start"
|
||||
SECTION_END="end"
|
||||
|
||||
class CrosServoRun:
|
||||
def __init__(self, cpu, ec, test_timeout, logger):
|
||||
def __init__(self, cpu, ec, test_timeout):
|
||||
self.cpu_ser = SerialBuffer(
|
||||
cpu, "results/serial.txt", ": ")
|
||||
cpu, "results/serial.txt", "R SERIAL-CPU> ")
|
||||
# Merge the EC serial into the cpu_ser's line stream so that we can
|
||||
# effectively poll on both at the same time and not have to worry about
|
||||
self.ec_ser = SerialBuffer(
|
||||
ec, "results/serial-ec.txt", " EC: ", line_queue=self.cpu_ser.line_queue)
|
||||
ec, "results/serial-ec.txt", "R SERIAL-EC> ", line_queue=self.cpu_ser.line_queue)
|
||||
self.test_timeout = test_timeout
|
||||
self.logger = logger
|
||||
|
||||
def close(self):
|
||||
self.ec_ser.close()
|
||||
self.cpu_ser.close()
|
||||
|
||||
def ec_write(self, s):
|
||||
print("EC> %s" % s)
|
||||
print("W SERIAL-EC> %s" % s)
|
||||
self.ec_ser.serial.write(s.encode())
|
||||
|
||||
def cpu_write(self, s):
|
||||
print("> %s" % s)
|
||||
print("W SERIAL-CPU> %s" % s)
|
||||
self.cpu_ser.serial.write(s.encode())
|
||||
|
||||
def print_error(self, message):
|
||||
RED = '\033[0;31m'
|
||||
NO_COLOR = '\033[0m'
|
||||
print(RED + message + NO_COLOR)
|
||||
self.logger.update_status_fail(message)
|
||||
|
||||
def get_rel_timestamp(self):
|
||||
now = datetime.datetime.now(tz=datetime.UTC)
|
||||
then_env = os.getenv("CI_JOB_STARTED_AT")
|
||||
if not then_env:
|
||||
return ""
|
||||
delta = now - datetime.datetime.fromisoformat(then_env)
|
||||
return f"[{math.floor(delta.seconds / 60):02}:{(delta.seconds % 60):02}]"
|
||||
|
||||
def get_cur_timestamp(self):
|
||||
return str(int(datetime.datetime.timestamp(datetime.datetime.now())))
|
||||
|
||||
def print_gitlab_section(self, action, name, description, collapse=True):
|
||||
assert action in [SECTION_START, SECTION_END]
|
||||
out = ANSI_ESCAPE + "section_" + action + ":"
|
||||
out += self.get_cur_timestamp() + ":"
|
||||
out += name
|
||||
if action == "start" and collapse:
|
||||
out += "[collapsed=true]"
|
||||
out += "\r" + ANSI_ESCAPE + ANSI_COLOUR
|
||||
out += self.get_rel_timestamp() + " " + description + ANSI_RESET
|
||||
print(out)
|
||||
|
||||
def boot_section(self, action):
|
||||
self.print_gitlab_section(action, "dut_boot", "Booting hardware device", True)
|
||||
|
||||
def run(self):
|
||||
# Flush any partial commands in the EC's prompt, then ask for a reboot.
|
||||
@@ -79,8 +43,6 @@ class CrosServoRun:
|
||||
self.ec_write("reboot\n")
|
||||
|
||||
bootloader_done = False
|
||||
self.logger.create_job_phase("boot")
|
||||
self.boot_section(SECTION_START)
|
||||
tftp_failures = 0
|
||||
# This is emitted right when the bootloader pauses to check for input.
|
||||
# Emit a ^N character to request network boot, because we don't have a
|
||||
@@ -117,10 +79,9 @@ class CrosServoRun:
|
||||
return 1
|
||||
|
||||
if not bootloader_done:
|
||||
self.print_error("Failed to make it through bootloader, abandoning run.")
|
||||
print("Failed to make it through bootloader, abandoning run.")
|
||||
return 1
|
||||
|
||||
self.logger.create_job_phase("test")
|
||||
for line in self.cpu_ser.lines(timeout=self.test_timeout, phase="test"):
|
||||
if re.search("---. end Kernel panic", line):
|
||||
return 1
|
||||
@@ -161,18 +122,12 @@ class CrosServoRun:
|
||||
self.print_error("Detected cheza MMU fail, abandoning run.")
|
||||
return 1
|
||||
|
||||
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
|
||||
result = re.search("hwci: mesa: (\S*)", line)
|
||||
if result:
|
||||
status = result.group(1)
|
||||
exit_code = int(result.group(2))
|
||||
|
||||
if status == "pass":
|
||||
self.logger.update_dut_job("status", "pass")
|
||||
if result.group(1) == "pass":
|
||||
return 0
|
||||
else:
|
||||
self.logger.update_status_fail("test fail")
|
||||
|
||||
self.logger.update_dut_job("exit_code", exit_code)
|
||||
return exit_code
|
||||
return 1
|
||||
|
||||
self.print_error(
|
||||
"Reached the end of the CPU serial log without finding a result")
|
||||
@@ -189,14 +144,11 @@ def main():
|
||||
'--test-timeout', type=int, help='Test phase timeout (minutes)', required=True)
|
||||
args = parser.parse_args()
|
||||
|
||||
logger = CustomLogger("results/job_detail.json")
|
||||
logger.update_dut_time("start", None)
|
||||
servo = CrosServoRun(args.cpu, args.ec, args.test_timeout * 60, logger)
|
||||
servo = CrosServoRun(args.cpu, args.ec, args.test_timeout * 60)
|
||||
retval = servo.run()
|
||||
|
||||
# power down the CPU on the device
|
||||
servo.ec_write("power off\n")
|
||||
logger.update_dut_time("end", None)
|
||||
servo.close()
|
||||
|
||||
sys.exit(retval)
|
||||
|
@@ -55,8 +55,6 @@ if echo $BM_CMDLINE | grep -q "root=/dev/nfs"; then
|
||||
BM_FASTBOOT_NFSROOT=1
|
||||
fi
|
||||
|
||||
section_start prepare_rootfs "Preparing rootfs components"
|
||||
|
||||
set -ex
|
||||
|
||||
# Clear out any previous run's artifacts.
|
||||
@@ -82,7 +80,11 @@ else
|
||||
# Finally, pack it up into a cpio rootfs. Skip the vulkan CTS since none of
|
||||
# these devices use it and it would take up space in the initrd.
|
||||
|
||||
EXCLUDE_FILTER="deqp|arb_gpu_shader5|arb_gpu_shader_fp64|arb_gpu_shader_int64|glsl-4.[0123456]0|arb_tessellation_shader"
|
||||
if [ -n "$PIGLIT_PROFILES" ]; then
|
||||
EXCLUDE_FILTER="deqp|arb_gpu_shader5|arb_gpu_shader_fp64|arb_gpu_shader_int64|glsl-4.[0123456]0|arb_tessellation_shader"
|
||||
else
|
||||
EXCLUDE_FILTER="piglit|python"
|
||||
fi
|
||||
|
||||
pushd rootfs
|
||||
find -H . | \
|
||||
@@ -94,30 +96,22 @@ else
|
||||
popd
|
||||
fi
|
||||
|
||||
# Make the combined kernel image and dtb for passing to fastboot. For normal
|
||||
# Mesa development, we build the kernel and store it in the docker container
|
||||
# that this script is running in.
|
||||
#
|
||||
# However, container builds are expensive, so when you're hacking on the
|
||||
# kernel, it's nice to be able to skip the half hour container build and plus
|
||||
# moving that container to the runner. So, if BM_KERNEL+BM_DTB are URLs,
|
||||
# fetch them instead of looking in the container.
|
||||
if echo "$BM_KERNEL $BM_DTB" | grep -q http; then
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"$BM_KERNEL" -o kernel
|
||||
# FIXME: modules should be supplied too
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"$BM_DTB" -o dtb
|
||||
|
||||
cat kernel dtb > Image.gz-dtb
|
||||
|
||||
elif [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_KERNEL}" -o kernel
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar.zst" -o modules.tar.zst
|
||||
|
||||
if [ -n "$BM_DTB" ]; then
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_DTB}.dtb" -o dtb
|
||||
fi
|
||||
|
||||
cat kernel dtb > Image.gz-dtb || echo "No DTB available, using pure kernel."
|
||||
rm kernel
|
||||
tar --keep-directory-symlink --zstd -xf modules.tar.zst -C "$BM_ROOTFS/"
|
||||
rm modules.tar.zst &
|
||||
else
|
||||
cat /baremetal-files/"$BM_KERNEL" /baremetal-files/"$BM_DTB".dtb > Image.gz-dtb
|
||||
cp /baremetal-files/"$BM_DTB".dtb dtb
|
||||
@@ -146,12 +140,10 @@ if [ -n "$BM_SERIAL_SCRIPT" ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
section_end prepare_rootfs
|
||||
|
||||
set +e
|
||||
$BM/fastboot_run.py \
|
||||
--dev="$BM_SERIAL" \
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT_MINUTES:-20} \
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT:-20} \
|
||||
--fbserial="$BM_FASTBOOT_SERIAL" \
|
||||
--powerup="$BM_POWERUP" \
|
||||
--powerdown="$BM_POWERDOWN"
|
||||
|
@@ -119,12 +119,12 @@ class FastbootRun:
|
||||
if print_more_lines == -1:
|
||||
print_more_lines = 30
|
||||
|
||||
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
|
||||
result = re.search("hwci: mesa: (\S*)", line)
|
||||
if result:
|
||||
status = result.group(1)
|
||||
exit_code = int(result.group(2))
|
||||
|
||||
return exit_code
|
||||
if result.group(1) == "pass":
|
||||
return 0
|
||||
else:
|
||||
return 1
|
||||
|
||||
self.print_error(
|
||||
"Reached the end of the CPU serial log without finding a result, abandoning run.")
|
||||
|
@@ -10,7 +10,7 @@ if [ -z "$BM_POE_ADDRESS" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((${BM_POE_BASE:-0} + BM_POE_INTERFACE))"
|
||||
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((48 + BM_POE_INTERFACE))"
|
||||
SNMP_OFF="i 2"
|
||||
|
||||
flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF"
|
||||
|
@@ -10,7 +10,7 @@ if [ -z "$BM_POE_ADDRESS" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((${BM_POE_BASE:-0} + BM_POE_INTERFACE))"
|
||||
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((48 + BM_POE_INTERFACE))"
|
||||
SNMP_ON="i 1"
|
||||
SNMP_OFF="i 2"
|
||||
|
||||
|
@@ -12,7 +12,6 @@
|
||||
# We're run from the root of the repo, make a helper var for our paths
|
||||
BM=$CI_PROJECT_DIR/install/bare-metal
|
||||
CI_COMMON=$CI_PROJECT_DIR/install/common
|
||||
CI_INSTALL=$CI_PROJECT_DIR/install
|
||||
|
||||
# Runner config checks
|
||||
if [ -z "$BM_SERIAL" ]; then
|
||||
@@ -61,8 +60,8 @@ if [ -z "$BM_ROOTFS" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_BOOTFS" ] && { [ -z "$BM_KERNEL" ] || [ -z "$BM_DTB" ]; } ; then
|
||||
echo "Must set /boot files for the TFTP boot in the job's variables or set kernel and dtb"
|
||||
if [ -z "$BM_BOOTFS" ]; then
|
||||
echo "Must set /boot files for the TFTP boot in the job's variables"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -71,7 +70,10 @@ if [ -z "$BM_CMDLINE" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
section_start prepare_rootfs "Preparing rootfs components"
|
||||
if [ -z "$BM_BOOTCONFIG" ]; then
|
||||
echo "Must set BM_BOOTCONFIG to your board's required boot configuration arguments"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -97,50 +99,23 @@ fi
|
||||
date +'%F %T'
|
||||
|
||||
# If BM_BOOTFS is a file, assume it is a tarball and uncompress it
|
||||
if [ -f "${BM_BOOTFS}" ]; then
|
||||
if [ -f $BM_BOOTFS ]; then
|
||||
mkdir -p /tmp/bootfs
|
||||
tar xf $BM_BOOTFS -C /tmp/bootfs
|
||||
BM_BOOTFS=/tmp/bootfs
|
||||
fi
|
||||
|
||||
# If BM_KERNEL and BM_DTS is present
|
||||
if [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
|
||||
if [ -z "${BM_KERNEL}" ] || [ -z "${BM_DTB}" ]; then
|
||||
echo "This machine cannot be tested with external kernel since BM_KERNEL or BM_DTB missing!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_KERNEL}" -o "${BM_KERNEL}"
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_DTB}.dtb" -o "${BM_DTB}.dtb"
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar.zst" -o modules.tar.zst
|
||||
fi
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
# Install kernel modules (it could be either in /lib/modules or
|
||||
# /usr/lib/modules, but we want to install in the latter)
|
||||
if [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
|
||||
tar --keep-directory-symlink --zstd -xf modules.tar.zst -C /nfs/
|
||||
rm modules.tar.zst &
|
||||
elif [ -n "${BM_BOOTFS}" ]; then
|
||||
[ -d $BM_BOOTFS/usr/lib/modules ] && rsync -a $BM_BOOTFS/usr/lib/modules/ /nfs/usr/lib/modules/
|
||||
[ -d $BM_BOOTFS/lib/modules ] && rsync -a $BM_BOOTFS/lib/modules/ /nfs/lib/modules/
|
||||
else
|
||||
echo "No modules!"
|
||||
fi
|
||||
|
||||
[ -d $BM_BOOTFS/usr/lib/modules ] && rsync -a $BM_BOOTFS/usr/lib/modules/ /nfs/usr/lib/modules/
|
||||
[ -d $BM_BOOTFS/lib/modules ] && rsync -a $BM_BOOTFS/lib/modules/ /nfs/lib/modules/
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
# Install kernel image + bootloader files
|
||||
if [ -n "${EXTERNAL_KERNEL_TAG}" ] || [ -z "$BM_BOOTFS" ]; then
|
||||
mv "${BM_KERNEL}" "${BM_DTB}.dtb" /tftp/
|
||||
else # BM_BOOTFS
|
||||
rsync -aL --delete $BM_BOOTFS/boot/ /tftp/
|
||||
fi
|
||||
rsync -aL --delete $BM_BOOTFS/boot/ /tftp/
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
@@ -172,56 +147,32 @@ LABEL primary
|
||||
EOF
|
||||
|
||||
# Create the rootfs in the NFS directory
|
||||
mkdir -p /nfs/results
|
||||
. $BM/rootfs-setup.sh /nfs
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
echo "$BM_CMDLINE" > /tftp/cmdline.txt
|
||||
|
||||
# Add some options in config.txt, if defined
|
||||
if [ -n "$BM_BOOTCONFIG" ]; then
|
||||
printf "$BM_BOOTCONFIG" >> /tftp/config.txt
|
||||
fi
|
||||
|
||||
section_end prepare_rootfs
|
||||
# Add some required options in config.txt
|
||||
printf "$BM_BOOTCONFIG" >> /tftp/config.txt
|
||||
|
||||
set +e
|
||||
STRUCTURED_LOG_FILE=results/job_detail.json
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update dut_job_type "${DEVICE_TYPE}"
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update farm "${FARM}"
|
||||
ATTEMPTS=3
|
||||
first_attempt=True
|
||||
while [ $((ATTEMPTS--)) -gt 0 ]; do
|
||||
section_start dut_boot "Booting hardware device ..."
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --create-dut-job dut_name "${CI_RUNNER_DESCRIPTION}"
|
||||
# Update subtime time to CI_JOB_STARTED_AT only for the first run
|
||||
if [ "$first_attempt" = "True" ]; then
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update-dut-time submit "${CI_JOB_STARTED_AT}"
|
||||
else
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update-dut-time submit
|
||||
fi
|
||||
python3 $BM/poe_run.py \
|
||||
--dev="$BM_SERIAL" \
|
||||
--powerup="$BM_POWERUP" \
|
||||
--powerdown="$BM_POWERDOWN" \
|
||||
--boot-timeout-seconds ${BOOT_PHASE_TIMEOUT_SECONDS:-300} \
|
||||
--test-timeout-minutes ${TEST_PHASE_TIMEOUT_MINUTES:-$((CI_JOB_TIMEOUT/60 - ${TEST_SETUP_AND_UPLOAD_MARGIN_MINUTES:-5}))}
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT:-20}
|
||||
ret=$?
|
||||
|
||||
if [ $ret -eq 2 ]; then
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job
|
||||
first_attempt=False
|
||||
error "Device failed to boot; will retry"
|
||||
echo "Did not detect boot sequence, retrying..."
|
||||
else
|
||||
# We're no longer in dut_boot by this point
|
||||
unset CURRENT_SECTION
|
||||
ATTEMPTS=0
|
||||
fi
|
||||
done
|
||||
|
||||
section_start dut_cleanup "Cleaning up after job"
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close
|
||||
set -e
|
||||
|
||||
date +'%F %T'
|
||||
@@ -231,6 +182,5 @@ date +'%F %T'
|
||||
cp -Rp /nfs/results/. results/
|
||||
|
||||
date +'%F %T'
|
||||
section_end dut_cleanup
|
||||
|
||||
exit $ret
|
||||
|
@@ -24,27 +24,23 @@
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
from serial_buffer import SerialBuffer
|
||||
import sys
|
||||
import threading
|
||||
|
||||
from custom_logger import CustomLogger
|
||||
from serial_buffer import SerialBuffer
|
||||
|
||||
class PoERun:
|
||||
def __init__(self, args, boot_timeout, test_timeout, logger):
|
||||
def __init__(self, args, test_timeout):
|
||||
self.powerup = args.powerup
|
||||
self.powerdown = args.powerdown
|
||||
self.ser = SerialBuffer(
|
||||
args.dev, "results/serial-output.txt", ": ")
|
||||
self.boot_timeout = boot_timeout
|
||||
args.dev, "results/serial-output.txt", "")
|
||||
self.test_timeout = test_timeout
|
||||
self.logger = logger
|
||||
|
||||
def print_error(self, message):
|
||||
RED = '\033[0;31m'
|
||||
NO_COLOR = '\033[0m'
|
||||
print(RED + message + NO_COLOR)
|
||||
self.logger.update_status_fail(message)
|
||||
|
||||
def logged_system(self, cmd):
|
||||
print("Running '{}'".format(cmd))
|
||||
@@ -52,12 +48,10 @@ class PoERun:
|
||||
|
||||
def run(self):
|
||||
if self.logged_system(self.powerup) != 0:
|
||||
self.logger.update_status_fail("powerup failed")
|
||||
return 1
|
||||
|
||||
boot_detected = False
|
||||
self.logger.create_job_phase("boot")
|
||||
for line in self.ser.lines(timeout=self.boot_timeout, phase="bootloader"):
|
||||
for line in self.ser.lines(timeout=5 * 60, phase="bootloader"):
|
||||
if re.search("Booting Linux", line):
|
||||
boot_detected = True
|
||||
break
|
||||
@@ -65,12 +59,10 @@ class PoERun:
|
||||
if not boot_detected:
|
||||
self.print_error(
|
||||
"Something wrong; couldn't detect the boot start up sequence")
|
||||
return 2
|
||||
return 1
|
||||
|
||||
self.logger.create_job_phase("test")
|
||||
for line in self.ser.lines(timeout=self.test_timeout, phase="test"):
|
||||
if re.search("---. end Kernel panic", line):
|
||||
self.logger.update_status_fail("kernel panic")
|
||||
return 1
|
||||
|
||||
# Binning memory problems
|
||||
@@ -87,18 +79,12 @@ class PoERun:
|
||||
self.print_error("nouveau jetson tk1 network fail, abandoning run.")
|
||||
return 1
|
||||
|
||||
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
|
||||
result = re.search("hwci: mesa: (\S*)", line)
|
||||
if result:
|
||||
status = result.group(1)
|
||||
exit_code = int(result.group(2))
|
||||
|
||||
if status == "pass":
|
||||
self.logger.update_dut_job("status", "pass")
|
||||
if result.group(1) == "pass":
|
||||
return 0
|
||||
else:
|
||||
self.logger.update_status_fail("test fail")
|
||||
|
||||
self.logger.update_dut_job("exit_code", exit_code)
|
||||
return exit_code
|
||||
return 1
|
||||
|
||||
self.print_error(
|
||||
"Reached the end of the CPU serial log without finding a result")
|
||||
@@ -114,18 +100,13 @@ def main():
|
||||
parser.add_argument('--powerdown', type=str,
|
||||
help='shell command for powering off', required=True)
|
||||
parser.add_argument(
|
||||
'--boot-timeout-seconds', type=int, help='Boot phase timeout (seconds)', required=True)
|
||||
parser.add_argument(
|
||||
'--test-timeout-minutes', type=int, help='Test phase timeout (minutes)', required=True)
|
||||
'--test-timeout', type=int, help='Test phase timeout (minutes)', required=True)
|
||||
args = parser.parse_args()
|
||||
|
||||
logger = CustomLogger("results/job_detail.json")
|
||||
logger.update_dut_time("start", None)
|
||||
poe = PoERun(args, args.boot_timeout_seconds, args.test_timeout_minutes * 60, logger)
|
||||
poe = PoERun(args, args.test_timeout * 60)
|
||||
retval = poe.run()
|
||||
|
||||
poe.logged_system(args.powerdown)
|
||||
logger.update_dut_time("end", None)
|
||||
|
||||
sys.exit(retval)
|
||||
|
||||
|
@@ -13,17 +13,20 @@ date +'%F %T'
|
||||
|
||||
# Make JWT token available as file in the bare-metal storage to enable access
|
||||
# to MinIO
|
||||
cp "${S3_JWT_FILE}" "${rootfs_dst}${S3_JWT_FILE}"
|
||||
cp "${CI_JOB_JWT_FILE}" "${rootfs_dst}${CI_JOB_JWT_FILE}"
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
cp $CI_COMMON/capture-devcoredump.sh $rootfs_dst/
|
||||
cp $CI_COMMON/intel-gpu-freq.sh $rootfs_dst/
|
||||
cp $CI_COMMON/kdl.sh $rootfs_dst/
|
||||
cp "$SCRIPTS_DIR/setup-test-env.sh" "$rootfs_dst/"
|
||||
|
||||
set +x
|
||||
|
||||
# Pass through relevant env vars from the gitlab job to the baremetal init script
|
||||
echo "Variables passed through:"
|
||||
"$CI_COMMON"/export-gitlab-job-env-for-dut.sh | tee $rootfs_dst/set-job-env-vars.sh
|
||||
"$CI_COMMON"/generate-env.sh | tee $rootfs_dst/set-job-env-vars.sh
|
||||
|
||||
set -x
|
||||
|
||||
|
@@ -22,7 +22,7 @@
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
import argparse
|
||||
from datetime import datetime, UTC
|
||||
from datetime import datetime, timezone
|
||||
import queue
|
||||
import serial
|
||||
import threading
|
||||
@@ -130,10 +130,9 @@ class SerialBuffer:
|
||||
if b == b'\n'[0]:
|
||||
line = line.decode(errors="replace")
|
||||
|
||||
ts = datetime.now(tz=UTC)
|
||||
ts_str = f"{ts.hour:02}:{ts.minute:02}:{ts.second:02}.{int(ts.microsecond / 1000):03}"
|
||||
print("{endc}{time}{prefix}{line}".format(
|
||||
time=ts_str, prefix=self.prefix, line=line, endc='\033[0m'), flush=True, end='')
|
||||
time = datetime.now().strftime('%y-%m-%d %H:%M:%S')
|
||||
print("{endc}{time} {prefix}{line}".format(
|
||||
time=time, prefix=self.prefix, line=line, endc='\033[0m'), flush=True, end='')
|
||||
|
||||
self.line_queue.put(line)
|
||||
line = bytearray()
|
||||
|
7
.gitlab-ci/build/compiler-wrapper-clang++-15.sh
Executable file
7
.gitlab-ci/build/compiler-wrapper-clang++-15.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
|
||||
_COMPILER=clang++-15
|
||||
. compiler-wrapper.sh
|
7
.gitlab-ci/build/compiler-wrapper-clang++.sh
Executable file
7
.gitlab-ci/build/compiler-wrapper-clang++.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
|
||||
_COMPILER=clang++
|
||||
. compiler-wrapper.sh
|
7
.gitlab-ci/build/compiler-wrapper-clang-15.sh
Executable file
7
.gitlab-ci/build/compiler-wrapper-clang-15.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
|
||||
_COMPILER=clang-15
|
||||
. compiler-wrapper.sh
|
7
.gitlab-ci/build/compiler-wrapper-clang.sh
Executable file
7
.gitlab-ci/build/compiler-wrapper-clang.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
|
||||
_COMPILER=clang
|
||||
. compiler-wrapper.sh
|
7
.gitlab-ci/build/compiler-wrapper-g++.sh
Executable file
7
.gitlab-ci/build/compiler-wrapper-g++.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
|
||||
_COMPILER=g++
|
||||
. compiler-wrapper.sh
|
7
.gitlab-ci/build/compiler-wrapper-gcc.sh
Executable file
7
.gitlab-ci/build/compiler-wrapper-gcc.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
|
||||
_COMPILER=gcc
|
||||
. compiler-wrapper.sh
|
21
.gitlab-ci/build/compiler-wrapper.sh
Normal file
21
.gitlab-ci/build/compiler-wrapper.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
# shellcheck disable=SC1091
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
if command -V ccache >/dev/null 2>/dev/null; then
|
||||
CCACHE=ccache
|
||||
else
|
||||
CCACHE=
|
||||
fi
|
||||
|
||||
if echo "$@" | grep -E 'meson-private/tmp[^ /]*/testfile.c' >/dev/null; then
|
||||
# Invoked for meson feature check
|
||||
exec $CCACHE $_COMPILER "$@"
|
||||
fi
|
||||
|
||||
if [ "$(eval printf "'%s'" "\"\${$(($#-1))}\"")" = "-c" ]; then
|
||||
# Not invoked for linking
|
||||
exec $CCACHE $_COMPILER "$@"
|
||||
fi
|
||||
|
||||
# Compiler invoked by ninja for linking. Add -Werror to turn compiler warnings into errors
|
||||
# with LTO. (meson's werror should arguably do this, but meanwhile we need to)
|
||||
exec $CCACHE $_COMPILER "$@" -Werror
|
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ while true; do
|
||||
devcds=$(find /sys/devices/virtual/devcoredump/ -name data 2>/dev/null)
|
||||
for i in $devcds; do
|
||||
echo "Found a devcoredump at $i."
|
||||
if cp $i $RESULTS_DIR/first.devcore; then
|
||||
if cp $i /results/first.devcore; then
|
||||
echo 1 > $i
|
||||
echo "Saved to the job artifacts at /first.devcore"
|
||||
exit 0
|
||||
@@ -23,7 +23,7 @@ while true; do
|
||||
rm "$tmpfile"
|
||||
else
|
||||
echo "Found an i915 error state at $i size=$filesize."
|
||||
if cp "$tmpfile" $RESULTS_DIR/first.i915_error_state; then
|
||||
if cp "$tmpfile" /results/first.i915_error_state; then
|
||||
rm "$tmpfile"
|
||||
echo 1 > "$i"
|
||||
echo "Saved to the job artifacts at /first.i915_error_state"
|
||||
|
@@ -1,142 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
VARS=(
|
||||
ACO_DEBUG
|
||||
ANGLE_TAG
|
||||
ANGLE_TRACE_FILES_TAG
|
||||
ANV_DEBUG
|
||||
ARTIFACTS_BASE_URL
|
||||
ASAN_OPTIONS
|
||||
BASE_SYSTEM_FORK_HOST_PREFIX
|
||||
BASE_SYSTEM_MAINLINE_HOST_PREFIX
|
||||
CI_COMMIT_BRANCH
|
||||
CI_COMMIT_REF_NAME
|
||||
CI_COMMIT_TITLE
|
||||
CI_JOB_ID
|
||||
CI_JOB_NAME
|
||||
CI_JOB_STARTED_AT
|
||||
CI_JOB_URL
|
||||
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
||||
CI_MERGE_REQUEST_TITLE
|
||||
CI_NODE_INDEX
|
||||
CI_NODE_TOTAL
|
||||
CI_PAGES_DOMAIN
|
||||
CI_PIPELINE_ID
|
||||
CI_PIPELINE_URL
|
||||
CI_PROJECT_DIR
|
||||
CI_PROJECT_NAME
|
||||
CI_PROJECT_PATH
|
||||
CI_PROJECT_ROOT_NAMESPACE
|
||||
CI_RUNNER_DESCRIPTION
|
||||
CI_SERVER_URL
|
||||
CROSVM_GALLIUM_DRIVER
|
||||
CROSVM_GPU_ARGS
|
||||
CURRENT_SECTION
|
||||
DEQP_BIN_DIR
|
||||
DEQP_FORCE_ASAN
|
||||
DEQP_FRACTION
|
||||
DEQP_RUNNER_MAX_FAILS
|
||||
DEQP_SUITE
|
||||
DEQP_TEMP_DIR
|
||||
DEVICE_NAME
|
||||
DRIVER_NAME
|
||||
EGL_PLATFORM
|
||||
ETNA_MESA_DEBUG
|
||||
FDO_CI_CONCURRENT
|
||||
FDO_HTTP_CACHE_URI
|
||||
FDO_UPSTREAM_REPO
|
||||
FD_MESA_DEBUG
|
||||
FLAKES_CHANNEL
|
||||
FLUSTER_CODECS
|
||||
FLUSTER_FRACTION
|
||||
FLUSTER_VECTORS_VERSION
|
||||
FREEDRENO_HANGCHECK_MS
|
||||
GALLIUM_DRIVER
|
||||
GALLIVM_PERF
|
||||
GPU_VERSION
|
||||
GTEST
|
||||
GTEST_FAILS
|
||||
GTEST_FRACTION
|
||||
GTEST_RUNNER_OPTIONS
|
||||
GTEST_SKIPS
|
||||
HWCI_FREQ_MAX
|
||||
HWCI_KERNEL_MODULES
|
||||
HWCI_KVM
|
||||
HWCI_START_WESTON
|
||||
HWCI_START_XORG
|
||||
HWCI_TEST_ARGS
|
||||
HWCI_TEST_SCRIPT
|
||||
INTEL_XE_IGNORE_EXPERIMENTAL_WARNING
|
||||
IR3_SHADER_DEBUG
|
||||
JOB_ARTIFACTS_BASE
|
||||
JOB_RESULTS_PATH
|
||||
JOB_ROOTFS_OVERLAY_PATH
|
||||
KERNEL_IMAGE_BASE
|
||||
KERNEL_IMAGE_NAME
|
||||
LD_LIBRARY_PATH
|
||||
LIBGL_ALWAYS_SOFTWARE
|
||||
LP_NUM_THREADS
|
||||
LVP_POISON_MEMORY
|
||||
MESA_BASE_TAG
|
||||
MESA_BUILD_PATH
|
||||
MESA_DEBUG
|
||||
MESA_GLES_VERSION_OVERRIDE
|
||||
MESA_GLSL_VERSION_OVERRIDE
|
||||
MESA_GL_VERSION_OVERRIDE
|
||||
MESA_IMAGE
|
||||
MESA_IMAGE_PATH
|
||||
MESA_IMAGE_TAG
|
||||
MESA_LOADER_DRIVER_OVERRIDE
|
||||
MESA_SPIRV_LOG_LEVEL
|
||||
MESA_TEMPLATES_COMMIT
|
||||
MESA_VK_ABORT_ON_DEVICE_LOSS
|
||||
MESA_VK_IGNORE_CONFORMANCE_WARNING
|
||||
NIR_DEBUG
|
||||
PANVK_DEBUG
|
||||
PAN_I_WANT_A_BROKEN_VULKAN_DRIVER
|
||||
PAN_MESA_DEBUG
|
||||
PIGLIT_FRACTION
|
||||
PIGLIT_NO_WINDOW
|
||||
PIGLIT_OPTIONS
|
||||
PIGLIT_PLATFORM
|
||||
PIGLIT_REPLAY_ANGLE_ARCH
|
||||
PIGLIT_REPLAY_ARTIFACTS_BASE_URL
|
||||
PIGLIT_REPLAY_DEVICE_NAME
|
||||
PIGLIT_REPLAY_EXTRA_ARGS
|
||||
PIGLIT_REPLAY_LOOP_TIMES
|
||||
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE
|
||||
PIGLIT_REPLAY_SUBCOMMAND
|
||||
PIGLIT_RESULTS
|
||||
PIGLIT_RUNNER_OPTIONS
|
||||
PIGLIT_TESTS
|
||||
PIGLIT_TRACES_FILE
|
||||
PIPELINE_ARTIFACTS_BASE
|
||||
RADEON_DEBUG
|
||||
RADV_DEBUG
|
||||
radv_enable_float16_gfx8
|
||||
RADV_PERFTEST
|
||||
S3_HOST
|
||||
S3_JWT_FILE
|
||||
S3_RESULTS_UPLOAD
|
||||
SKQP_ASSETS_DIR
|
||||
SKQP_BACKENDS
|
||||
STORAGE_FORK_HOST_PATH
|
||||
STORAGE_MAINLINE_HOST_PATH
|
||||
TU_DEBUG
|
||||
VIRGL_HOST_API
|
||||
VIRGL_RENDER_SERVER
|
||||
VK_DRIVER
|
||||
WAFFLE_PLATFORM
|
||||
ZINK_DEBUG
|
||||
ZINK_DESCRIPTORS
|
||||
|
||||
# Dead code within Mesa CI, but required by virglrender CI
|
||||
# (because they include our files in their CI)
|
||||
VK_DRIVER_FILES
|
||||
)
|
||||
|
||||
for var in "${VARS[@]}"; do
|
||||
if [ -n "${!var+x}" ]; then
|
||||
echo "export $var=${!var@Q}"
|
||||
fi
|
||||
done
|
128
.gitlab-ci/common/generate-env.sh
Executable file
128
.gitlab-ci/common/generate-env.sh
Executable file
@@ -0,0 +1,128 @@
|
||||
#!/bin/bash
|
||||
|
||||
for var in \
|
||||
ACO_DEBUG \
|
||||
ASAN_OPTIONS \
|
||||
BASE_SYSTEM_FORK_HOST_PREFIX \
|
||||
BASE_SYSTEM_MAINLINE_HOST_PREFIX \
|
||||
CI_COMMIT_BRANCH \
|
||||
CI_COMMIT_REF_NAME \
|
||||
CI_COMMIT_TITLE \
|
||||
CI_JOB_ID \
|
||||
CI_JOB_JWT_FILE \
|
||||
CI_JOB_STARTED_AT \
|
||||
CI_JOB_NAME \
|
||||
CI_JOB_URL \
|
||||
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME \
|
||||
CI_MERGE_REQUEST_TITLE \
|
||||
CI_NODE_INDEX \
|
||||
CI_NODE_TOTAL \
|
||||
CI_PAGES_DOMAIN \
|
||||
CI_PIPELINE_ID \
|
||||
CI_PIPELINE_URL \
|
||||
CI_PROJECT_DIR \
|
||||
CI_PROJECT_NAME \
|
||||
CI_PROJECT_PATH \
|
||||
CI_PROJECT_ROOT_NAMESPACE \
|
||||
CI_RUNNER_DESCRIPTION \
|
||||
CI_SERVER_URL \
|
||||
CROSVM_GALLIUM_DRIVER \
|
||||
CROSVM_GPU_ARGS \
|
||||
CURRENT_SECTION \
|
||||
DEQP_BIN_DIR \
|
||||
DEQP_CONFIG \
|
||||
DEQP_EXPECTED_RENDERER \
|
||||
DEQP_FRACTION \
|
||||
DEQP_HEIGHT \
|
||||
DEQP_RESULTS_DIR \
|
||||
DEQP_RUNNER_OPTIONS \
|
||||
DEQP_SUITE \
|
||||
DEQP_TEMP_DIR \
|
||||
DEQP_VARIANT \
|
||||
DEQP_VER \
|
||||
DEQP_WIDTH \
|
||||
DEVICE_NAME \
|
||||
DRIVER_NAME \
|
||||
EGL_PLATFORM \
|
||||
ETNA_MESA_DEBUG \
|
||||
FDO_CI_CONCURRENT \
|
||||
FDO_UPSTREAM_REPO \
|
||||
FD_MESA_DEBUG \
|
||||
FLAKES_CHANNEL \
|
||||
FREEDRENO_HANGCHECK_MS \
|
||||
GALLIUM_DRIVER \
|
||||
GALLIVM_PERF \
|
||||
GPU_VERSION \
|
||||
GTEST \
|
||||
GTEST_FAILS \
|
||||
GTEST_FRACTION \
|
||||
GTEST_RESULTS_DIR \
|
||||
GTEST_RUNNER_OPTIONS \
|
||||
GTEST_SKIPS \
|
||||
HWCI_FREQ_MAX \
|
||||
HWCI_KERNEL_MODULES \
|
||||
HWCI_KVM \
|
||||
HWCI_START_WESTON \
|
||||
HWCI_START_XORG \
|
||||
HWCI_TEST_SCRIPT \
|
||||
IR3_SHADER_DEBUG \
|
||||
JOB_ARTIFACTS_BASE \
|
||||
JOB_RESULTS_PATH \
|
||||
JOB_ROOTFS_OVERLAY_PATH \
|
||||
KERNEL_IMAGE_BASE \
|
||||
KERNEL_IMAGE_NAME \
|
||||
LD_LIBRARY_PATH \
|
||||
LP_NUM_THREADS \
|
||||
MESA_BASE_TAG \
|
||||
MESA_BUILD_PATH \
|
||||
MESA_DEBUG \
|
||||
MESA_GLES_VERSION_OVERRIDE \
|
||||
MESA_GLSL_VERSION_OVERRIDE \
|
||||
MESA_GL_VERSION_OVERRIDE \
|
||||
MESA_IMAGE \
|
||||
MESA_IMAGE_PATH \
|
||||
MESA_IMAGE_TAG \
|
||||
MESA_LOADER_DRIVER_OVERRIDE \
|
||||
MESA_TEMPLATES_COMMIT \
|
||||
MESA_VK_IGNORE_CONFORMANCE_WARNING \
|
||||
S3_HOST \
|
||||
S3_RESULTS_UPLOAD \
|
||||
NIR_DEBUG \
|
||||
PAN_I_WANT_A_BROKEN_VULKAN_DRIVER \
|
||||
PAN_MESA_DEBUG \
|
||||
PIGLIT_FRACTION \
|
||||
PIGLIT_NO_WINDOW \
|
||||
PIGLIT_OPTIONS \
|
||||
PIGLIT_PLATFORM \
|
||||
PIGLIT_PROFILES \
|
||||
PIGLIT_REPLAY_ARTIFACTS_BASE_URL \
|
||||
PIGLIT_REPLAY_DESCRIPTION_FILE \
|
||||
PIGLIT_REPLAY_DEVICE_NAME \
|
||||
PIGLIT_REPLAY_EXTRA_ARGS \
|
||||
PIGLIT_REPLAY_LOOP_TIMES \
|
||||
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE \
|
||||
PIGLIT_REPLAY_SUBCOMMAND \
|
||||
PIGLIT_RESULTS \
|
||||
PIGLIT_TESTS \
|
||||
PIPELINE_ARTIFACTS_BASE \
|
||||
RADV_DEBUG \
|
||||
RADV_PERFTEST \
|
||||
SKQP_ASSETS_DIR \
|
||||
SKQP_BACKENDS \
|
||||
TU_DEBUG \
|
||||
USE_ANGLE \
|
||||
VIRGL_HOST_API \
|
||||
WAFFLE_PLATFORM \
|
||||
VK_CPU \
|
||||
VK_DRIVER \
|
||||
VK_ICD_FILENAMES \
|
||||
VKD3D_PROTON_RESULTS \
|
||||
VKD3D_CONFIG \
|
||||
ZINK_DESCRIPTORS \
|
||||
ZINK_DEBUG \
|
||||
LVP_POISON_MEMORY \
|
||||
; do
|
||||
if [ -n "${!var+x}" ]; then
|
||||
echo "export $var=${!var@Q}"
|
||||
fi
|
||||
done
|
@@ -7,10 +7,10 @@ set -ex
|
||||
|
||||
cd /
|
||||
|
||||
findmnt --mountpoint /proc || mount -t proc none /proc
|
||||
findmnt --mountpoint /sys || mount -t sysfs none /sys
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
mount -t debugfs none /sys/kernel/debug
|
||||
findmnt --mountpoint /dev || mount -t devtmpfs none /dev
|
||||
mount -t devtmpfs none /dev || echo possibly already mounted
|
||||
mkdir -p /dev/pts
|
||||
mount -t devpts devpts /dev/pts
|
||||
mkdir /dev/shm
|
||||
|
@@ -7,8 +7,6 @@
|
||||
# Second-stage init, used to set up devices and our job environment before
|
||||
# running tests.
|
||||
|
||||
shopt -s extglob
|
||||
|
||||
# Make sure to kill itself and all the children process from this script on
|
||||
# exiting, since any console output may interfere with LAVA signals handling,
|
||||
# which based on the log console.
|
||||
@@ -47,13 +45,6 @@ for path in '/dut-env-vars.sh' '/set-job-env-vars.sh' './set-job-env-vars.sh'; d
|
||||
done
|
||||
. "$SCRIPTS_DIR"/setup-test-env.sh
|
||||
|
||||
# Flush out anything which might be stuck in a serial buffer
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
|
||||
section_switch init_stage2 "Pre-testing hardware setup"
|
||||
|
||||
set -ex
|
||||
|
||||
# Set up any devices required by the jobs
|
||||
@@ -92,9 +83,9 @@ if [ "$HWCI_KVM" = "true" ]; then
|
||||
} || \
|
||||
modprobe ${KVM_KERNEL_MODULE}
|
||||
|
||||
mkdir -p /kernel
|
||||
mkdir -p /lava-files
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "/kernel/${KERNEL_IMAGE_NAME}" \
|
||||
-o "/lava-files/${KERNEL_IMAGE_NAME}" \
|
||||
"${KERNEL_IMAGE_BASE}/amd64/${KERNEL_IMAGE_NAME}"
|
||||
fi
|
||||
|
||||
@@ -115,13 +106,6 @@ export XDG_CACHE_HOME=/tmp
|
||||
# Make sure Python can find all our imports
|
||||
export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))")
|
||||
|
||||
# If we need to specify a driver, it means several drivers could pick up this gpu;
|
||||
# ensure that the other driver can't accidentally be used
|
||||
if [ -n "$MESA_LOADER_DRIVER_OVERRIDE" ]; then
|
||||
rm /install/lib/dri/!($MESA_LOADER_DRIVER_OVERRIDE)_dri.so
|
||||
fi
|
||||
ls -1 /install/lib/dri/*_dri.so || true
|
||||
|
||||
if [ "$HWCI_FREQ_MAX" = "true" ]; then
|
||||
# Ensure initialization of the DRM device (needed by MSM)
|
||||
head -0 /dev/dri/renderD128
|
||||
@@ -140,14 +124,13 @@ if [ "$HWCI_FREQ_MAX" = "true" ]; then
|
||||
# and enable throttling detection & reporting.
|
||||
# Additionally, set the upper limit for CPU scaling frequency to 65% of the
|
||||
# maximum permitted, as an additional measure to mitigate thermal throttling.
|
||||
/install/common/intel-gpu-freq.sh -s 70% --cpu-set-max 65% -g all -d
|
||||
/intel-gpu-freq.sh -s 70% --cpu-set-max 65% -g all -d
|
||||
fi
|
||||
|
||||
# Start a little daemon to capture sysfs records and produce a JSON file
|
||||
KDL_PATH=/install/common/kdl.sh
|
||||
if [ -x "$KDL_PATH" ]; then
|
||||
if [ -x /kdl.sh ]; then
|
||||
echo "launch kdl.sh!"
|
||||
$KDL_PATH &
|
||||
/kdl.sh &
|
||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
||||
else
|
||||
echo "kdl.sh not found!"
|
||||
@@ -161,15 +144,11 @@ fi
|
||||
|
||||
# Start a little daemon to capture the first devcoredump we encounter. (They
|
||||
# expire after 5 minutes, so we poll for them).
|
||||
CAPTURE_DEVCOREDUMP=/install/common/capture-devcoredump.sh
|
||||
if [ -x "$CAPTURE_DEVCOREDUMP" ]; then
|
||||
$CAPTURE_DEVCOREDUMP &
|
||||
if [ -x /capture-devcoredump.sh ]; then
|
||||
/capture-devcoredump.sh &
|
||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
||||
fi
|
||||
|
||||
ARCH=$(uname -m)
|
||||
export VK_DRIVER_FILES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json"
|
||||
|
||||
# If we want Xorg to be running for the test, then we start it up before the
|
||||
# HWCI_TEST_SCRIPT because we need to use xinit to start X (otherwise
|
||||
# without using -displayfd you can race with Xorg's startup), but xinit will eat
|
||||
@@ -177,7 +156,8 @@ export VK_DRIVER_FILES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json"
|
||||
if [ -n "$HWCI_START_XORG" ]; then
|
||||
echo "touch /xorg-started; sleep 100000" > /xorg-script
|
||||
env \
|
||||
xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile "$RESULTS_DIR/Xorg.0.log" &
|
||||
VK_ICD_FILENAMES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$(uname -m).json" \
|
||||
xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile /Xorg.0.log &
|
||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
||||
|
||||
# Wait for xorg to be ready for connections.
|
||||
@@ -203,34 +183,32 @@ if [ -n "$HWCI_START_WESTON" ]; then
|
||||
mkdir -p /tmp/.X11-unix
|
||||
|
||||
env \
|
||||
VK_ICD_FILENAMES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$(uname -m).json" \
|
||||
weston -Bheadless-backend.so --use-gl -Swayland-0 --xwayland --idle-time=0 &
|
||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
||||
|
||||
while [ ! -S "$WESTON_X11_SOCK" ]; do sleep 1; done
|
||||
fi
|
||||
|
||||
set +x
|
||||
|
||||
section_end init_stage2
|
||||
|
||||
echo "Running ${HWCI_TEST_SCRIPT} ${HWCI_TEST_ARGS} ..."
|
||||
|
||||
set +e
|
||||
$HWCI_TEST_SCRIPT ${HWCI_TEST_ARGS:-}; EXIT_CODE=$?
|
||||
bash -c ". $SCRIPTS_DIR/setup-test-env.sh && $HWCI_TEST_SCRIPT"
|
||||
EXIT_CODE=$?
|
||||
set -e
|
||||
|
||||
section_start post_test_cleanup "Cleaning up after testing, uploading results"
|
||||
set -x
|
||||
# Let's make sure the results are always stored in current working directory
|
||||
mv -f ${CI_PROJECT_DIR}/results ./ 2>/dev/null || true
|
||||
|
||||
[ ${EXIT_CODE} -ne 0 ] || rm -rf results/trace/"$PIGLIT_REPLAY_DEVICE_NAME"
|
||||
|
||||
# Make sure that capture-devcoredump is done before we start trying to tar up
|
||||
# artifacts -- if it's writing while tar is reading, tar will throw an error and
|
||||
# kill the job.
|
||||
cleanup
|
||||
|
||||
# upload artifacts (lava jobs)
|
||||
# upload artifacts
|
||||
if [ -n "$S3_RESULTS_UPLOAD" ]; then
|
||||
tar --zstd -cf results.tar.zst results/;
|
||||
s3_upload results.tar.zst "https://${S3_RESULTS_UPLOAD}/"
|
||||
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" results.tar.zst https://"$S3_RESULTS_UPLOAD"/results.tar.zst;
|
||||
fi
|
||||
|
||||
# We still need to echo the hwci: mesa message, as some scripts rely on it, such
|
||||
@@ -238,12 +216,7 @@ fi
|
||||
[ ${EXIT_CODE} -eq 0 ] && RESULT=pass || RESULT=fail
|
||||
|
||||
set +x
|
||||
section_end post_test_cleanup
|
||||
|
||||
# Print the final result; both bare-metal and LAVA look for this string to get
|
||||
# the result of our run, so try really hard to get it out rather than losing
|
||||
# the run. The device gets shut down right at this point, and a630 seems to
|
||||
# enjoy corrupting the last line of serial output before shutdown.
|
||||
for _ in $(seq 0 3); do echo "hwci: mesa: $RESULT, exit_code: $EXIT_CODE"; sleep 1; echo; done
|
||||
|
||||
echo "hwci: mesa: $RESULT"
|
||||
# Sleep a bit to avoid kernel dump message interleave from LAVA ENDTC signal
|
||||
sleep 1
|
||||
exit $EXIT_CODE
|
||||
|
@@ -35,27 +35,6 @@
|
||||
# - gt_act_freq_mhz (the actual GPU freq)
|
||||
# - gt_cur_freq_mhz (the last requested freq)
|
||||
#
|
||||
# Intel later switched to per-tile sysfs interfaces, which is what the Xe DRM
|
||||
# driver exlusively uses, and the capabilites are now located under the
|
||||
# following directory for the first tile:
|
||||
#
|
||||
# /sys/class/drm/card<n>/device/tile0/gt0/freq0/<freq_info>
|
||||
#
|
||||
# Where <n> is the DRM card index and <freq_info> one of the following:
|
||||
#
|
||||
# - max_freq (enforced maximum freq)
|
||||
# - min_freq (enforced minimum freq)
|
||||
#
|
||||
# The hardware capabilities can be accessed via:
|
||||
#
|
||||
# - rp0_freq (supported maximum freq)
|
||||
# - rpn_freq (supported minimum freq)
|
||||
# - rpe_freq (most efficient freq)
|
||||
#
|
||||
# The current frequency can be read from:
|
||||
# - act_freq (the actual GPU freq)
|
||||
# - cur_freq (the last requested freq)
|
||||
#
|
||||
# Also note that in addition to GPU management, the script offers the
|
||||
# possibility to adjust CPU operating frequencies. However, this is currently
|
||||
# limited to just setting the maximum scaling frequency as percentage of the
|
||||
@@ -71,25 +50,10 @@
|
||||
# Constants
|
||||
#
|
||||
|
||||
# Check if any /sys/class/drm/cardX/device/tile0 directory exists to detect Xe
|
||||
USE_XE=0
|
||||
for i in $(seq 0 15); do
|
||||
if [ -d "/sys/class/drm/card$i/device/tile0" ]; then
|
||||
USE_XE=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# GPU
|
||||
if [ "$USE_XE" -eq 1 ]; then
|
||||
DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/device/tile0/gt0/freq0/%s_freq"
|
||||
ENF_FREQ_INFO="max min"
|
||||
CAP_FREQ_INFO="rp0 rpn rpe"
|
||||
else
|
||||
DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/gt_%s_freq_mhz"
|
||||
ENF_FREQ_INFO="max min boost"
|
||||
CAP_FREQ_INFO="RP0 RPn RP1"
|
||||
fi
|
||||
DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/gt_%s_freq_mhz"
|
||||
ENF_FREQ_INFO="max min boost"
|
||||
CAP_FREQ_INFO="RP0 RPn RP1"
|
||||
ACT_FREQ_INFO="act cur"
|
||||
THROTT_DETECT_SLEEP_SEC=2
|
||||
THROTT_DETECT_PID_FILE_PATH=/tmp/thrott-detect.pid
|
||||
@@ -148,11 +112,7 @@ identify_intel_gpu() {
|
||||
}
|
||||
|
||||
path=$(print_freq_sysfs_path "" ${i})
|
||||
if [ "$USE_XE" -eq 1 ]; then
|
||||
path=${path%/*/*/*/*/*}/device/vendor
|
||||
else
|
||||
path=${path%/*}/device/vendor
|
||||
fi
|
||||
path=${path%/*}/device/vendor
|
||||
|
||||
[ -r "${path}" ] && read vendor < "${path}" && \
|
||||
[ "${vendor}" = "0x8086" ] && INTEL_DRM_CARD_INDEX=$i && return 0
|
||||
@@ -237,13 +197,13 @@ compute_freq_set() {
|
||||
|
||||
case "$1" in
|
||||
+)
|
||||
val=$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}") # FREQ_rp0 or FREQ_RP0
|
||||
val=${FREQ_RP0}
|
||||
;;
|
||||
-)
|
||||
val=$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") # FREQ_rpn or FREQ_RPn
|
||||
val=${FREQ_RPn}
|
||||
;;
|
||||
*%)
|
||||
val=$((${1%?} * $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}") / 100))
|
||||
val=$((${1%?} * FREQ_RP0 / 100))
|
||||
# Adjust freq to comply with 50 MHz increments
|
||||
val=$((val / 50 * 50))
|
||||
;;
|
||||
@@ -272,17 +232,15 @@ set_freq_max() {
|
||||
|
||||
read_freq_info n min || return $?
|
||||
|
||||
# FREQ_rp0 or FREQ_RP0
|
||||
[ ${SET_MAX_FREQ} -gt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}") ] && {
|
||||
[ ${SET_MAX_FREQ} -gt ${FREQ_RP0} ] && {
|
||||
log ERROR "Cannot set GPU max freq (%s) to be greater than hw max freq (%s)" \
|
||||
"${SET_MAX_FREQ}" "$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}")"
|
||||
"${SET_MAX_FREQ}" "${FREQ_RP0}"
|
||||
return 1
|
||||
}
|
||||
|
||||
# FREQ_rpn or FREQ_RPn
|
||||
[ ${SET_MAX_FREQ} -lt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") ] && {
|
||||
[ ${SET_MAX_FREQ} -lt ${FREQ_RPn} ] && {
|
||||
log ERROR "Cannot set GPU max freq (%s) to be less than hw min freq (%s)" \
|
||||
"${SET_MIN_FREQ}" "$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}")"
|
||||
"${SET_MIN_FREQ}" "${FREQ_RPn}"
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -294,21 +252,12 @@ set_freq_max() {
|
||||
|
||||
[ -z "${DRY_RUN}" ] || return 0
|
||||
|
||||
# Write to max freq path
|
||||
if ! printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path max) > /dev/null;
|
||||
if ! printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path max) \
|
||||
$(print_freq_sysfs_path boost) > /dev/null;
|
||||
then
|
||||
log ERROR "Failed to set GPU max frequency"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Only write to boost if the sysfs file exists, as it's removed in Xe
|
||||
if [ -e "$(print_freq_sysfs_path boost)" ]; then
|
||||
if ! printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path boost) > /dev/null;
|
||||
then
|
||||
log ERROR "Failed to set GPU boost frequency"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
@@ -325,9 +274,9 @@ set_freq_min() {
|
||||
return 1
|
||||
}
|
||||
|
||||
[ ${SET_MIN_FREQ} -lt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") ] && {
|
||||
[ ${SET_MIN_FREQ} -lt ${FREQ_RPn} ] && {
|
||||
log ERROR "Cannot set GPU min freq (%s) to be less than hw min freq (%s)" \
|
||||
"${SET_MIN_FREQ}" "$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}")"
|
||||
"${SET_MIN_FREQ}" "${FREQ_RPn}"
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -345,7 +294,7 @@ set_freq_min() {
|
||||
#
|
||||
set_freq() {
|
||||
# Get hw max & min frequencies
|
||||
read_freq_info n $(echo $CAP_FREQ_INFO | cut -d' ' -f1,2) || return $? # RP0 RPn
|
||||
read_freq_info n RP0 RPn || return $?
|
||||
|
||||
[ -z "${SET_MAX_FREQ}" ] || {
|
||||
SET_MAX_FREQ=$(compute_freq_set "${SET_MAX_FREQ}")
|
||||
@@ -448,7 +397,7 @@ detect_throttling() {
|
||||
}
|
||||
|
||||
(
|
||||
read_freq_info n $(echo $CAP_FREQ_INFO | cut -d' ' -f2) || return $? # RPn
|
||||
read_freq_info n RPn || exit $?
|
||||
|
||||
while true; do
|
||||
sleep ${THROTT_DETECT_SLEEP_SEC}
|
||||
@@ -457,13 +406,13 @@ detect_throttling() {
|
||||
#
|
||||
# The throttling seems to occur when act freq goes below min.
|
||||
# However, it's necessary to exclude the idle states, where
|
||||
# act freq normally reaches rpn and cur goes below min.
|
||||
# act freq normally reaches RPn and cur goes below min.
|
||||
#
|
||||
[ ${FREQ_act} -lt ${FREQ_min} ] && \
|
||||
[ ${FREQ_act} -gt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") ] && \
|
||||
[ ${FREQ_act} -gt ${FREQ_RPn} ] && \
|
||||
[ ${FREQ_cur} -ge ${FREQ_min} ] && \
|
||||
printf "GPU throttling detected: act=%s min=%s cur=%s rpn=%s\n" \
|
||||
${FREQ_act} ${FREQ_min} ${FREQ_cur} $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}")
|
||||
printf "GPU throttling detected: act=%s min=%s cur=%s RPn=%s\n" \
|
||||
${FREQ_act} ${FREQ_min} ${FREQ_cur} ${FREQ_RPn}
|
||||
done
|
||||
) &
|
||||
|
||||
@@ -611,8 +560,7 @@ set_cpu_freq_max() {
|
||||
read_cpu_freq_info ${cpu_index} n ${CAP_CPU_FREQ_INFO} || { res=$?; continue; }
|
||||
|
||||
target_freq=$(compute_cpu_freq_set "${CPU_SET_MAX_FREQ}")
|
||||
tf_res=$?
|
||||
[ -z "${target_freq}" ] && { res=$tf_res; continue; }
|
||||
[ -z "${target_freq}" ] && { res=$?; continue; }
|
||||
|
||||
log INFO "Setting CPU%s max scaling freq to %s Hz" ${cpu_index} "${target_freq}"
|
||||
[ -n "${DRY_RUN}" ] && continue
|
||||
|
@@ -1,18 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091 # the path is created in build-kdl and
|
||||
# here is check if exist
|
||||
# shellcheck disable=SC2086 # we want the arguments to be expanded
|
||||
|
||||
if ! [ -f /ci-kdl/bin/activate ]; then
|
||||
echo -e "ci-kdl not installed; not monitoring temperature"
|
||||
exit 0
|
||||
terminate() {
|
||||
echo "ci-kdl.sh caught SIGTERM signal! propagating to child processes"
|
||||
for job in $(jobs -p)
|
||||
do
|
||||
kill -15 "$job"
|
||||
done
|
||||
}
|
||||
|
||||
trap terminate SIGTERM
|
||||
|
||||
if [ -f /ci-kdl.venv/bin/activate ]; then
|
||||
source /ci-kdl.venv/bin/activate
|
||||
/ci-kdl.venv/bin/python /ci-kdl.venv/bin/ci-kdl | tee -a /results/kdl.log &
|
||||
child=$!
|
||||
wait $child
|
||||
mv kdl_*.json /results/kdl.json
|
||||
else
|
||||
echo -e "Not possible to activate ci-kdl virtual environment"
|
||||
fi
|
||||
|
||||
KDL_ARGS="
|
||||
--output-file=${RESULTS_DIR}/kdl.json
|
||||
--log-level=WARNING
|
||||
--num-samples=-1
|
||||
"
|
||||
|
||||
source /ci-kdl/bin/activate
|
||||
exec /ci-kdl/bin/ci-kdl ${KDL_ARGS}
|
||||
|
21
.gitlab-ci/common/start-x.sh
Executable file
21
.gitlab-ci/common/start-x.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
_XORG_SCRIPT="/xorg-script"
|
||||
_FLAG_FILE="/xorg-started"
|
||||
|
||||
echo "touch ${_FLAG_FILE}; sleep 100000" > "${_XORG_SCRIPT}"
|
||||
if [ "x$1" != "x" ]; then
|
||||
export LD_LIBRARY_PATH="${1}/lib"
|
||||
export LIBGL_DRIVERS_PATH="${1}/lib/dri"
|
||||
fi
|
||||
xinit /bin/sh "${_XORG_SCRIPT}" -- /usr/bin/Xorg vt45 -noreset -s 0 -dpms -logfile /Xorg.0.log &
|
||||
|
||||
# Wait for xorg to be ready for connections.
|
||||
for _ in 1 2 3 4 5; do
|
||||
if [ -e "${_FLAG_FILE}" ]; then
|
||||
break
|
||||
fi
|
||||
sleep 5
|
||||
done
|
@@ -1,2 +0,0 @@
|
||||
variables:
|
||||
CONDITIONAL_BUILD_ANGLE_TAG: ab19bccfd3858c539ba8cb8d9b52a003
|
@@ -6,9 +6,6 @@
|
||||
# ALPINE_X86_64_BUILD_TAG
|
||||
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
EPHEMERAL=(
|
||||
@@ -19,7 +16,6 @@ DEPS=(
|
||||
bash
|
||||
bison
|
||||
ccache
|
||||
"clang${LLVM_VERSION}-dev"
|
||||
cmake
|
||||
clang-dev
|
||||
coreutils
|
||||
@@ -30,52 +26,33 @@ DEPS=(
|
||||
git
|
||||
gettext
|
||||
glslang
|
||||
graphviz
|
||||
linux-headers
|
||||
"llvm${LLVM_VERSION}-static"
|
||||
"llvm${LLVM_VERSION}-dev"
|
||||
llvm16-dev
|
||||
meson
|
||||
mold
|
||||
musl-dev
|
||||
expat-dev
|
||||
elfutils-dev
|
||||
libclc-dev
|
||||
libdrm-dev
|
||||
libselinux-dev
|
||||
libva-dev
|
||||
libpciaccess-dev
|
||||
zlib-dev
|
||||
python3-dev
|
||||
py3-clang
|
||||
py3-cparser
|
||||
py3-mako
|
||||
py3-packaging
|
||||
py3-pip
|
||||
py3-ply
|
||||
py3-yaml
|
||||
vulkan-headers
|
||||
spirv-tools-dev
|
||||
spirv-llvm-translator-dev
|
||||
util-macros
|
||||
wayland-dev
|
||||
wayland-protocols
|
||||
)
|
||||
|
||||
apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}"
|
||||
|
||||
pip3 install --break-system-packages sphinx===8.2.3 hawkmoth===0.19.0
|
||||
apk add "${DEPS[@]}" "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
EXTRA_MESON_ARGS='--prefix=/usr' \
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
# too many vendor binarise, just keep the ones we need
|
||||
find /usr/share/clc \
|
||||
\( -type f -o -type l \) \
|
||||
! -name 'spirv-mesa3d-.spv' \
|
||||
! -name 'spirv64-mesa3d-.spv' \
|
||||
-delete
|
||||
|
||||
apk del "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
@@ -4,9 +4,6 @@
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
EPHEMERAL=(
|
||||
@@ -21,7 +18,7 @@ DEPS=(
|
||||
)
|
||||
|
||||
|
||||
apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}"
|
||||
apk add "${DEPS[@]}" "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
|
@@ -7,7 +7,7 @@ set -o xtrace
|
||||
# network transfer, disk usage, and runtime on test jobs)
|
||||
|
||||
# shellcheck disable=SC2154 # arch is assigned in previous scripts
|
||||
if curl --fail -L -s "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
|
||||
if curl -X HEAD -s "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
|
||||
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}"
|
||||
else
|
||||
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}/${arch}"
|
||||
@@ -31,7 +31,7 @@ if [[ $arch == "arm64" ]]; then
|
||||
-O "${KERNEL_IMAGE_BASE}"/arm64/cheza-kernel
|
||||
|
||||
DEVICE_TREES=""
|
||||
DEVICE_TREES="$DEVICE_TREES apq8016-sbc-usb-host.dtb"
|
||||
DEVICE_TREES="$DEVICE_TREES apq8016-sbc.dtb"
|
||||
DEVICE_TREES="$DEVICE_TREES apq8096-db820c.dtb"
|
||||
DEVICE_TREES="$DEVICE_TREES tegra210-p3450-0000.dtb"
|
||||
DEVICE_TREES="$DEVICE_TREES imx8mq-nitrogen.dtb"
|
||||
|
@@ -1,121 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml and .gitlab-ci/container/gitlab-ci.yml tags:
|
||||
# DEBIAN_BUILD_TAG
|
||||
# ANDROID_LLVM_ARTIFACT_NAME
|
||||
|
||||
set -exu
|
||||
|
||||
# If CI vars are not set, assign an empty value, this prevents -u to fail
|
||||
: "${CI:=}"
|
||||
: "${CI_PROJECT_PATH:=}"
|
||||
|
||||
# Early check for required env variables, relies on `set -u`
|
||||
: "$ANDROID_NDK_VERSION"
|
||||
: "$ANDROID_SDK_VERSION"
|
||||
: "$ANDROID_LLVM_VERSION"
|
||||
: "$ANDROID_LLVM_ARTIFACT_NAME"
|
||||
: "$S3_JWT_FILE"
|
||||
: "$S3_HOST"
|
||||
: "$S3_ANDROID_BUCKET"
|
||||
|
||||
# Check for CI if the auth file used later on is non-empty
|
||||
if [ -n "$CI" ] && [ ! -s "${S3_JWT_FILE}" ]; then
|
||||
echo "Error: ${S3_JWT_FILE} is empty." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if curl -s -o /dev/null -I -L -f --retry 4 --retry-delay 15 "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"; then
|
||||
echo "Artifact ${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst already exists, skip re-building."
|
||||
|
||||
# Download prebuilt LLVM libraries for Android when they have not changed,
|
||||
# to save some time
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
|
||||
tar -C / --zstd -xf "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
|
||||
rm "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
|
||||
|
||||
exit
|
||||
fi
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
EPHEMERAL=(
|
||||
unzip
|
||||
)
|
||||
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends --no-remove "${EPHEMERAL[@]}"
|
||||
|
||||
ANDROID_NDK="android-ndk-${ANDROID_NDK_VERSION}"
|
||||
ANDROID_NDK_ROOT="/${ANDROID_NDK}"
|
||||
if [ ! -d "$ANDROID_NDK_ROOT" ];
|
||||
then
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "${ANDROID_NDK}.zip" \
|
||||
"https://dl.google.com/android/repository/${ANDROID_NDK}-linux.zip"
|
||||
unzip -d / "${ANDROID_NDK}.zip" "$ANDROID_NDK/source.properties" "$ANDROID_NDK/build/cmake/*" "$ANDROID_NDK/toolchains/llvm/*"
|
||||
rm "${ANDROID_NDK}.zip"
|
||||
fi
|
||||
|
||||
if [ ! -d "/llvm-project" ];
|
||||
then
|
||||
mkdir "/llvm-project"
|
||||
pushd "/llvm-project"
|
||||
git init
|
||||
git remote add origin https://github.com/llvm/llvm-project.git
|
||||
git fetch --depth 1 origin "$ANDROID_LLVM_VERSION"
|
||||
git checkout FETCH_HEAD
|
||||
popd
|
||||
fi
|
||||
|
||||
pushd "/llvm-project"
|
||||
|
||||
# Checkout again the intended version, just in case of a pre-existing full clone
|
||||
git checkout "$ANDROID_LLVM_VERSION" || true
|
||||
|
||||
LLVM_INSTALL_PREFIX="/${ANDROID_LLVM_ARTIFACT_NAME}"
|
||||
|
||||
rm -rf build/
|
||||
cmake -GNinja -S llvm -B build/ \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
|
||||
-DANDROID_ABI=x86_64 \
|
||||
-DANDROID_PLATFORM="android-${ANDROID_SDK_VERSION}" \
|
||||
-DANDROID_NDK="${ANDROID_NDK_ROOT}" \
|
||||
-DCMAKE_ANDROID_ARCH_ABI=x86_64 \
|
||||
-DCMAKE_ANDROID_NDK="${ANDROID_NDK_ROOT}" \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-DCMAKE_SYSTEM_NAME=Android \
|
||||
-DCMAKE_SYSTEM_VERSION="${ANDROID_SDK_VERSION}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${LLVM_INSTALL_PREFIX}" \
|
||||
-DCMAKE_CXX_FLAGS="-march=x86-64 --target=x86_64-linux-android${ANDROID_SDK_VERSION} -fno-rtti" \
|
||||
-DLLVM_HOST_TRIPLE="x86_64-linux-android${ANDROID_SDK_VERSION}" \
|
||||
-DLLVM_TARGETS_TO_BUILD=X86 \
|
||||
-DLLVM_BUILD_LLVM_DYLIB=OFF \
|
||||
-DLLVM_BUILD_TESTS=OFF \
|
||||
-DLLVM_BUILD_EXAMPLES=OFF \
|
||||
-DLLVM_BUILD_DOCS=OFF \
|
||||
-DLLVM_BUILD_TOOLS=OFF \
|
||||
-DLLVM_ENABLE_RTTI=OFF \
|
||||
-DLLVM_BUILD_INSTRUMENTED_COVERAGE=OFF \
|
||||
-DLLVM_NATIVE_TOOL_DIR="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin" \
|
||||
-DLLVM_ENABLE_PIC=False \
|
||||
-DLLVM_OPTIMIZED_TABLEGEN=ON
|
||||
|
||||
ninja "-j${FDO_CI_CONCURRENT:-4}" -C build/ install
|
||||
|
||||
popd
|
||||
|
||||
rm -rf /llvm-project
|
||||
|
||||
tar --zstd -cf "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "$LLVM_INSTALL_PREFIX"
|
||||
|
||||
# If run in CI upload the tar.zst archive to S3 to avoid rebuilding it if the
|
||||
# version does not change, and delete it.
|
||||
# The file is not deleted for non-CI because it can be useful in local runs.
|
||||
if [ -n "$CI" ]; then
|
||||
s3_upload "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/"
|
||||
rm "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
|
||||
fi
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
166
.gitlab-ci/container/build-angle.sh
Executable file → Normal file
166
.gitlab-ci/container/build-angle.sh
Executable file → Normal file
@@ -1,164 +1,58 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_ANDROID_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
set -ex
|
||||
|
||||
set -uex
|
||||
|
||||
uncollapsed_section_start angle "Building ANGLE"
|
||||
|
||||
# Do a very early check to make sure the tag is correct without the need of
|
||||
# setting up the environment variables locally
|
||||
ci_tag_build_time_check "ANGLE_TAG"
|
||||
|
||||
ANGLE_REV="a3f2545f6bb3e8d27827dceb2b4e901673995ad1"
|
||||
|
||||
# Set ANGLE_ARCH based on DEBIAN_ARCH if it hasn't been explicitly defined
|
||||
if [[ -z "${ANGLE_ARCH:-}" ]]; then
|
||||
case "$DEBIAN_ARCH" in
|
||||
amd64) ANGLE_ARCH=x64;;
|
||||
arm64) ANGLE_ARCH=arm64;;
|
||||
esac
|
||||
fi
|
||||
ANGLE_REV="0518a3ff4d4e7e5b2ce8203358f719613a31c118"
|
||||
|
||||
# DEPOT tools
|
||||
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot-tools
|
||||
export PATH=/depot-tools:$PATH
|
||||
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
PWD=$(pwd)
|
||||
export PATH=$PWD/depot_tools:$PATH
|
||||
export DEPOT_TOOLS_UPDATE=0
|
||||
|
||||
mkdir /angle-build
|
||||
mkdir /angle
|
||||
pushd /angle-build
|
||||
git init
|
||||
git remote add origin https://chromium.googlesource.com/angle/angle.git
|
||||
git fetch --depth 1 origin "$ANGLE_REV"
|
||||
git checkout FETCH_HEAD
|
||||
|
||||
echo "$ANGLE_REV" > /angle/version
|
||||
|
||||
GCLIENT_CUSTOM_VARS=()
|
||||
GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_cl=False')
|
||||
GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_cl_testing=False')
|
||||
GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_vulkan_validation_layers=False')
|
||||
GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_wgpu=False')
|
||||
GCLIENT_CUSTOM_VARS+=('--custom-var=build_angle_deqp_tests=False')
|
||||
GCLIENT_CUSTOM_VARS+=('--custom-var=build_angle_perftests=False')
|
||||
if [[ "$ANGLE_TARGET" == "android" ]]; then
|
||||
GCLIENT_CUSTOM_VARS+=('--custom-var=checkout_android=True')
|
||||
fi
|
||||
|
||||
# source preparation
|
||||
gclient config --name REPLACE-WITH-A-DOT --unmanaged \
|
||||
"${GCLIENT_CUSTOM_VARS[@]}" \
|
||||
https://chromium.googlesource.com/angle/angle.git
|
||||
sed -e 's/REPLACE-WITH-A-DOT/./;' -i .gclient
|
||||
sed -e 's|"custom_deps" : {|"custom_deps" : {\
|
||||
"third_party/clspv/src": None,\
|
||||
"third_party/dawn": None,\
|
||||
"third_party/glmark2/src": None,\
|
||||
"third_party/libjpeg_turbo": None,\
|
||||
"third_party/llvm/src": None,\
|
||||
"third_party/OpenCL-CTS/src": None,\
|
||||
"third_party/SwiftShader": None,\
|
||||
"third_party/VK-GL-CTS/src": None,\
|
||||
"third_party/vulkan-validation-layers/src": None,|' -i .gclient
|
||||
gclient sync --no-history -j"${FDO_CI_CONCURRENT:-4}"
|
||||
python3 scripts/bootstrap.py
|
||||
mkdir -p build/config
|
||||
gclient sync
|
||||
|
||||
sed -i "/catapult/d" testing/BUILD.gn
|
||||
|
||||
mkdir -p out/Release
|
||||
cat > out/Release/args.gn <<EOF
|
||||
angle_assert_always_on=false
|
||||
angle_build_all=false
|
||||
angle_build_tests=false
|
||||
angle_enable_cl=false
|
||||
angle_enable_cl_testing=false
|
||||
angle_enable_gl=false
|
||||
angle_enable_gl_desktop_backend=false
|
||||
angle_enable_null=false
|
||||
angle_enable_swiftshader=false
|
||||
angle_enable_trace=false
|
||||
angle_enable_wgpu=false
|
||||
angle_enable_vulkan=true
|
||||
angle_enable_vulkan_api_dump_layer=false
|
||||
angle_enable_vulkan_validation_layers=false
|
||||
angle_has_frame_capture=false
|
||||
angle_has_histograms=false
|
||||
angle_has_rapidjson=false
|
||||
angle_use_custom_libvulkan=false
|
||||
build_angle_deqp_tests=false
|
||||
echo '
|
||||
is_debug = false
|
||||
angle_enable_swiftshader = false
|
||||
angle_enable_null = false
|
||||
angle_enable_gl = false
|
||||
angle_enable_vulkan = true
|
||||
angle_has_histograms = false
|
||||
build_angle_trace_perf_tests = false
|
||||
build_angle_deqp_tests = false
|
||||
angle_use_custom_libvulkan = false
|
||||
dcheck_always_on=true
|
||||
enable_expensive_dchecks=false
|
||||
is_component_build=false
|
||||
is_debug=false
|
||||
target_cpu="${ANGLE_ARCH}"
|
||||
target_os="${ANGLE_TARGET}"
|
||||
treat_warnings_as_errors=false
|
||||
EOF
|
||||
|
||||
case "$ANGLE_TARGET" in
|
||||
linux) cat >> out/Release/args.gn <<EOF
|
||||
angle_egl_extension="so.1"
|
||||
angle_glesv2_extension="so.2"
|
||||
use_custom_libcxx=false
|
||||
custom_toolchain="//build/toolchain/linux/unbundle:default"
|
||||
host_toolchain="//build/toolchain/linux/unbundle:default"
|
||||
EOF
|
||||
;;
|
||||
android) cat >> out/Release/args.gn <<EOF
|
||||
android_ndk_version="${ANDROID_NDK_VERSION}"
|
||||
android64_ndk_api_level=${ANDROID_SDK_VERSION}
|
||||
android32_ndk_api_level=${ANDROID_SDK_VERSION}
|
||||
use_custom_libcxx=true
|
||||
EOF
|
||||
;;
|
||||
*) echo "Unexpected ANGLE_TARGET value: $ANGLE_TARGET"; exit 1;;
|
||||
esac
|
||||
' > out/Release/args.gn
|
||||
|
||||
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
||||
# We need to get an AArch64 sysroot - because ANGLE isn't great friends with
|
||||
# system dependencies - but use the default system toolchain, because the
|
||||
# 'arm64' toolchain you get from Google infrastructure is a cross-compiler
|
||||
# from x86-64
|
||||
build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
|
||||
fi
|
||||
|
||||
(
|
||||
# The 'unbundled' toolchain configuration requires clang, and it also needs to
|
||||
# be configured via environment variables.
|
||||
export CC="clang-${LLVM_VERSION}"
|
||||
export HOST_CC="$CC"
|
||||
export CFLAGS="-Wno-unknown-warning-option"
|
||||
export HOST_CFLAGS="$CFLAGS"
|
||||
export CXX="clang++-${LLVM_VERSION}"
|
||||
export HOST_CXX="$CXX"
|
||||
export CXXFLAGS="-Wno-unknown-warning-option"
|
||||
export HOST_CXXFLAGS="$CXXFLAGS"
|
||||
export AR="ar"
|
||||
export HOST_AR="$AR"
|
||||
export NM="nm"
|
||||
export HOST_NM="$NM"
|
||||
export LDFLAGS="-fuse-ld=lld-${LLVM_VERSION} -lpthread -ldl"
|
||||
export HOST_LDFLAGS="$LDFLAGS"
|
||||
gn gen out/Release
|
||||
# depot_tools overrides ninja with a version that doesn't work. We want
|
||||
# ninja with FDO_CI_CONCURRENT anyway.
|
||||
/usr/local/bin/ninja -C out/Release/
|
||||
|
||||
gn gen out/Release
|
||||
# depot_tools overrides ninja with a version that doesn't work. We want
|
||||
# ninja with FDO_CI_CONCURRENT anyway.
|
||||
/usr/local/bin/ninja -C out/Release/ libEGL libGLESv1_CM libGLESv2
|
||||
)
|
||||
|
||||
rm -f out/Release/libvulkan.so* out/Release/*.so*.TOC
|
||||
cp out/Release/lib*.so* /angle/
|
||||
|
||||
if [[ "$ANGLE_TARGET" == "linux" ]]; then
|
||||
ln -s libEGL.so.1 /angle/libEGL.so
|
||||
ln -s libGLESv2.so.2 /angle/libGLESv2.so
|
||||
fi
|
||||
mkdir /angle
|
||||
cp out/Release/lib*GL*.so /angle/
|
||||
ln -s libEGL.so /angle/libEGL.so.1
|
||||
ln -s libGLESv2.so /angle/libGLESv2.so.2
|
||||
|
||||
rm -rf out
|
||||
|
||||
popd
|
||||
rm -rf /depot-tools
|
||||
rm -rf /angle-build
|
||||
|
||||
section_end angle
|
||||
rm -rf ./depot_tools
|
||||
|
@@ -3,21 +3,19 @@
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# DEBIAN_X86_64_TEST_GL_TAG
|
||||
# DEBIAN_X86_64_TEST_VK_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -uex
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start apitrace "Building apitrace"
|
||||
|
||||
APITRACE_VERSION="952bad1469ea747012bdc48c48993bd5f13eec04"
|
||||
APITRACE_VERSION="0a6506433e1f9f7b69757b4e5730326970c4321a"
|
||||
|
||||
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
|
||||
pushd /apitrace
|
||||
git checkout "$APITRACE_VERSION"
|
||||
git submodule update --init --depth 1 --recursive
|
||||
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on ${EXTRA_CMAKE_ARGS:-}
|
||||
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on $EXTRA_CMAKE_ARGS
|
||||
cmake --build _build --parallel --target apitrace eglretrace
|
||||
mkdir build
|
||||
cp _build/apitrace build
|
||||
@@ -25,5 +23,3 @@ cp _build/eglretrace build
|
||||
${STRIP_CMD:-strip} build/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
||||
|
||||
section_end apitrace
|
||||
|
@@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
uncollapsed_section_start bindgen "Building bindgen"
|
||||
|
||||
BINDGEN_VER=0.65.1
|
||||
CBINDGEN_VER=0.26.0
|
||||
|
||||
# bindgen
|
||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
bindgen-cli --version ${BINDGEN_VER} \
|
||||
--locked \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--root /usr/local
|
||||
|
||||
# cbindgen
|
||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
cbindgen --version ${CBINDGEN_VER} \
|
||||
--locked \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--root /usr/local
|
||||
|
||||
section_end bindgen
|
@@ -1,55 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BASE_TAG
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -uex
|
||||
|
||||
uncollapsed_section_start crosvm "Building crosvm"
|
||||
set -ex
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
|
||||
CROSVM_VERSION=e27efaf8f4bdc4a47d1e99cc44d2b6908b6f36bd
|
||||
CROSVM_VERSION=e3815e62d675ef436956a992e0ed58b7309c759d
|
||||
git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/crosvm/crosvm /platform/crosvm
|
||||
pushd /platform/crosvm
|
||||
git checkout "$CROSVM_VERSION"
|
||||
git submodule update --init
|
||||
|
||||
VIRGLRENDERER_VERSION=7570167549358ce77b8d4774041b4a77c72a021c
|
||||
VIRGLRENDERER_VERSION=10120c0d9ebdc00eae1b5c9f7c98fc0d198ba602
|
||||
rm -rf third_party/virglrenderer
|
||||
git clone --single-branch -b main --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
|
||||
pushd third_party/virglrenderer
|
||||
git checkout "$VIRGLRENDERER_VERSION"
|
||||
meson setup build/ -D libdir=lib -D render-server-worker=process -D venus=true ${EXTRA_MESON_ARGS:-}
|
||||
meson setup build/ -D libdir=lib -D render-server-worker=process -D venus=true $EXTRA_MESON_ARGS
|
||||
meson install -C build
|
||||
popd
|
||||
|
||||
rm rust-toolchain
|
||||
cargo update -p pkg-config@0.3.26 --precise 0.3.27
|
||||
|
||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
bindgen-cli \
|
||||
--locked \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--root /usr/local \
|
||||
--version 0.71.1 \
|
||||
${EXTRA_CARGO_ARGS:-}
|
||||
--version 0.65.1 \
|
||||
$EXTRA_CARGO_ARGS
|
||||
|
||||
CROSVM_USE_SYSTEM_MINIGBM=1 CROSVM_USE_SYSTEM_VIRGLRENDERER=1 RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
CROSVM_USE_SYSTEM_VIRGLRENDERER=1 RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--locked \
|
||||
--features 'default-no-sandbox gpu x virgl_renderer' \
|
||||
--features 'default-no-sandbox gpu x virgl_renderer virgl_renderer_next' \
|
||||
--path . \
|
||||
--root /usr/local \
|
||||
${EXTRA_CARGO_ARGS:-}
|
||||
$EXTRA_CARGO_ARGS
|
||||
|
||||
popd
|
||||
|
||||
rm -rf /platform/crosvm
|
||||
|
||||
section_end crosvm
|
||||
|
@@ -1,100 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_ANDROID_TAG
|
||||
# DEBIAN_BASE_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
set -ex
|
||||
|
||||
set -uex
|
||||
if [ -n "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
|
||||
# Build and install from source
|
||||
DEQP_RUNNER_CARGO_ARGS="--git ${DEQP_RUNNER_GIT_URL:-https://gitlab.freedesktop.org/anholt/deqp-runner.git}"
|
||||
|
||||
uncollapsed_section_start deqp-runner "Building deqp-runner"
|
||||
|
||||
DEQP_RUNNER_VERSION=0.20.3
|
||||
|
||||
commits_to_backport=(
|
||||
)
|
||||
|
||||
patch_files=(
|
||||
)
|
||||
|
||||
DEQP_RUNNER_GIT_URL="${DEQP_RUNNER_GIT_URL:-https://gitlab.freedesktop.org/mesa/deqp-runner.git}"
|
||||
|
||||
if [ -n "${DEQP_RUNNER_GIT_TAG:-}" ]; then
|
||||
DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_TAG"
|
||||
elif [ -n "${DEQP_RUNNER_GIT_REV:-}" ]; then
|
||||
DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_REV"
|
||||
else
|
||||
DEQP_RUNNER_GIT_CHECKOUT="v$DEQP_RUNNER_VERSION"
|
||||
fi
|
||||
|
||||
BASE_PWD=$PWD
|
||||
|
||||
mkdir -p /deqp-runner
|
||||
pushd /deqp-runner
|
||||
mkdir deqp-runner-git
|
||||
pushd deqp-runner-git
|
||||
git init
|
||||
git remote add origin "$DEQP_RUNNER_GIT_URL"
|
||||
git fetch --depth 1 origin "$DEQP_RUNNER_GIT_CHECKOUT"
|
||||
git checkout FETCH_HEAD
|
||||
|
||||
for commit in "${commits_to_backport[@]}"
|
||||
do
|
||||
PATCH_URL="https://gitlab.freedesktop.org/mesa/deqp-runner/-/commit/$commit.patch"
|
||||
echo "Backport deqp-runner commit $commit from $PATCH_URL"
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 $PATCH_URL | git am
|
||||
done
|
||||
|
||||
for patch in "${patch_files[@]}"
|
||||
do
|
||||
echo "Apply patch to deqp-runner from $patch"
|
||||
git am "$BASE_PWD/.gitlab-ci/container/patches/$patch"
|
||||
done
|
||||
|
||||
if [ -z "${RUST_TARGET:-}" ]; then
|
||||
RUST_TARGET=""
|
||||
fi
|
||||
|
||||
if [[ "$RUST_TARGET" != *-android ]]; then
|
||||
# When CC (/usr/lib/ccache/gcc) variable is set, the rust compiler uses
|
||||
# this variable when cross-compiling arm32 and build fails for zsys-sys.
|
||||
# So unset the CC variable when cross-compiling for arm32.
|
||||
SAVEDCC=${CC:-}
|
||||
if [ "$RUST_TARGET" = "armv7-unknown-linux-gnueabihf" ]; then
|
||||
unset CC
|
||||
if [ -n "${DEQP_RUNNER_GIT_TAG}" ]; then
|
||||
DEQP_RUNNER_CARGO_ARGS="--tag ${DEQP_RUNNER_GIT_TAG} ${DEQP_RUNNER_CARGO_ARGS}"
|
||||
else
|
||||
DEQP_RUNNER_CARGO_ARGS="--rev ${DEQP_RUNNER_GIT_REV} ${DEQP_RUNNER_CARGO_ARGS}"
|
||||
fi
|
||||
|
||||
DEQP_RUNNER_CARGO_ARGS="${DEQP_RUNNER_CARGO_ARGS} ${EXTRA_CARGO_ARGS}"
|
||||
else
|
||||
# Install from package registry
|
||||
DEQP_RUNNER_CARGO_ARGS="--version 0.16.0 ${EXTRA_CARGO_ARGS} -- deqp-runner"
|
||||
fi
|
||||
|
||||
if [ -z "$ANDROID_NDK_HOME" ]; then
|
||||
cargo install --locked \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--root /usr/local \
|
||||
${EXTRA_CARGO_ARGS:-} \
|
||||
--path .
|
||||
CC=$SAVEDCC
|
||||
${DEQP_RUNNER_CARGO_ARGS}
|
||||
else
|
||||
mkdir -p /deqp-runner
|
||||
pushd /deqp-runner
|
||||
git clone --branch v0.16.1 --depth 1 https://gitlab.freedesktop.org/anholt/deqp-runner.git deqp-runner-git
|
||||
pushd deqp-runner-git
|
||||
|
||||
cargo install --locked \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--root /usr/local --version 2.10.0 \
|
||||
cargo-ndk
|
||||
|
||||
rustup target add $RUST_TARGET
|
||||
RUSTFLAGS='-C target-feature=+crt-static' cargo ndk --target $RUST_TARGET build --release
|
||||
rustup target add x86_64-linux-android
|
||||
RUSTFLAGS='-C target-feature=+crt-static' cargo ndk --target x86_64-linux-android build
|
||||
|
||||
mv target/$RUST_TARGET/release/deqp-runner /deqp-runner
|
||||
mv target/x86_64-linux-android/debug/deqp-runner /deqp-runner
|
||||
|
||||
cargo uninstall --locked \
|
||||
--root /usr/local \
|
||||
cargo-ndk
|
||||
fi
|
||||
|
||||
popd
|
||||
rm -rf deqp-runner-git
|
||||
popd
|
||||
popd
|
||||
rm -rf deqp-runner-git
|
||||
popd
|
||||
fi
|
||||
|
||||
# remove unused test runners to shrink images for the Mesa CI build (not kernel,
|
||||
# which chooses its own deqp branch)
|
||||
if [ -z "${DEQP_RUNNER_GIT_TAG:-}${DEQP_RUNNER_GIT_REV:-}" ]; then
|
||||
if [ -z "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
|
||||
rm -f /usr/local/bin/igt-runner
|
||||
fi
|
||||
|
||||
section_end deqp-runner
|
||||
|
341
.gitlab-ci/container/build-deqp.sh
Executable file → Normal file
341
.gitlab-ci/container/build-deqp.sh
Executable file → Normal file
@@ -3,31 +3,21 @@
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_ANDROID_TAG
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# DEBIAN_X86_64_TEST_ANDROID_TAG
|
||||
# DEBIAN_X86_64_TEST_GL_TAG
|
||||
# DEBIAN_X86_64_TEST_VK_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -ue -o pipefail
|
||||
set -ex
|
||||
|
||||
# shellcheck disable=SC2153
|
||||
deqp_api=${DEQP_API,,}
|
||||
|
||||
uncollapsed_section_start deqp-$deqp_api "Building dEQP $DEQP_API"
|
||||
|
||||
set -x
|
||||
|
||||
# See `deqp_build_targets` below for which release is used to produce which
|
||||
# binary. Unless this comment has bitrotten:
|
||||
# - the commit from the main branch produces the deqp tools and `deqp-vk`,
|
||||
# - the VK release produces `deqp-vk`,
|
||||
# - the GL release produces `glcts`, and
|
||||
# - the GLES release produces `deqp-gles*` and `deqp-egl`
|
||||
|
||||
DEQP_MAIN_COMMIT=76c1572eaba42d7ddd9bb8eb5788e52dd932068e
|
||||
DEQP_VK_VERSION=1.4.1.1
|
||||
DEQP_GL_VERSION=4.6.5.0
|
||||
DEQP_GLES_VERSION=3.2.11.0
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
git clone \
|
||||
https://github.com/KhronosGroup/VK-GL-CTS.git \
|
||||
-b vulkan-cts-1.3.7.0 \
|
||||
--depth 1 \
|
||||
/VK-GL-CTS
|
||||
pushd /VK-GL-CTS
|
||||
|
||||
# Patches to VulkanCTS may come from commits in their repo (listed in
|
||||
# cts_commits_to_backport) or patch files stored in our repo (in the patch
|
||||
@@ -35,291 +25,118 @@ DEQP_GLES_VERSION=3.2.11.0
|
||||
# Both list variables would have comments explaining the reasons behind the
|
||||
# patches.
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
main_cts_commits_to_backport=(
|
||||
# If you find yourself wanting to add something in here, consider whether
|
||||
# bumping DEQP_MAIN_COMMIT is not a better solution :)
|
||||
cts_commits_to_backport=(
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
main_cts_patch_files=(
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
vk_cts_commits_to_backport=(
|
||||
# Stop querying device address from unbound buffers
|
||||
046343f46f7d39d53b47842d7fd8ed3279528046
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
vk_cts_patch_files=(
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
gl_cts_commits_to_backport=(
|
||||
# Add #include <cmath> in deMath.h when being compiled by C++
|
||||
71808fe7d0a640dfd703e845d93ba1c5ab751055
|
||||
# Revert "Add #include <cmath> in deMath.h when being compiled by C++ compiler"
|
||||
# This also adds an alternative fix along with the revert.
|
||||
6164879a0acce258637d261592a9c395e564b361
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
gl_cts_patch_files=(
|
||||
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
# GLES builds also EGL
|
||||
gles_cts_commits_to_backport=(
|
||||
# Add #include <cmath> in deMath.h when being compiled by C++
|
||||
71808fe7d0a640dfd703e845d93ba1c5ab751055
|
||||
# Revert "Add #include <cmath> in deMath.h when being compiled by C++ compiler"
|
||||
# This also adds an alternative fix along with the revert.
|
||||
6164879a0acce258637d261592a9c395e564b361
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
gles_cts_patch_files=(
|
||||
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
|
||||
)
|
||||
|
||||
if [ "${DEQP_TARGET}" = 'android' ]; then
|
||||
gles_cts_patch_files+=(
|
||||
build-deqp-gles_Allow-running-on-Android-from-the-command-line.patch
|
||||
build-deqp-gles_Android-prints-to-stdout-instead-of-logcat.patch
|
||||
)
|
||||
fi
|
||||
|
||||
|
||||
### Careful editing anything below this line
|
||||
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
|
||||
# shellcheck disable=SC2153
|
||||
case "${DEQP_API}" in
|
||||
tools) DEQP_VERSION="$DEQP_MAIN_COMMIT";;
|
||||
*-main) DEQP_VERSION="$DEQP_MAIN_COMMIT";;
|
||||
VK) DEQP_VERSION="vulkan-cts-$DEQP_VK_VERSION";;
|
||||
GL) DEQP_VERSION="opengl-cts-$DEQP_GL_VERSION";;
|
||||
GLES) DEQP_VERSION="opengl-es-cts-$DEQP_GLES_VERSION";;
|
||||
*) echo "Unexpected DEQP_API value: $DEQP_API"; exit 1;;
|
||||
esac
|
||||
|
||||
mkdir -p /VK-GL-CTS
|
||||
pushd /VK-GL-CTS
|
||||
[ -e .git ] || {
|
||||
git init
|
||||
git remote add origin https://github.com/KhronosGroup/VK-GL-CTS.git
|
||||
}
|
||||
git fetch --depth 1 origin "$DEQP_VERSION"
|
||||
git checkout FETCH_HEAD
|
||||
DEQP_COMMIT=$(git rev-parse FETCH_HEAD)
|
||||
|
||||
if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
|
||||
merge_base="$(curl --fail -s https://api.github.com/repos/KhronosGroup/VK-GL-CTS/compare/main...$DEQP_MAIN_COMMIT | jq -r .merge_base_commit.sha)"
|
||||
if [[ "$merge_base" != "$DEQP_MAIN_COMMIT" ]]; then
|
||||
echo "VK-GL-CTS commit $DEQP_MAIN_COMMIT is not a commit from the main branch."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p /deqp-$deqp_api
|
||||
|
||||
if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
|
||||
prefix="main"
|
||||
else
|
||||
prefix="$deqp_api"
|
||||
fi
|
||||
|
||||
cts_commits_to_backport="${prefix}_cts_commits_to_backport[@]"
|
||||
for commit in "${!cts_commits_to_backport}"
|
||||
for commit in "${cts_commits_to_backport[@]}"
|
||||
do
|
||||
PATCH_URL="https://github.com/KhronosGroup/VK-GL-CTS/commit/$commit.patch"
|
||||
echo "Apply patch to ${DEQP_API} CTS from $PATCH_URL"
|
||||
echo "Apply patch to VK-GL-CTS from $PATCH_URL"
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 $PATCH_URL | \
|
||||
GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am -
|
||||
git am -
|
||||
done
|
||||
|
||||
cts_patch_files="${prefix}_cts_patch_files[@]"
|
||||
for patch in "${!cts_patch_files}"
|
||||
cts_patch_files=(
|
||||
# Android specific patches.
|
||||
build-deqp_Allow-running-on-Android-from-the-command-line.patch
|
||||
build-deqp_Android-prints-to-stdout-instead-of-logcat.patch
|
||||
)
|
||||
|
||||
for patch in "${cts_patch_files[@]}"
|
||||
do
|
||||
echo "Apply patch to ${DEQP_API} CTS from $patch"
|
||||
GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am < $OLDPWD/.gitlab-ci/container/patches/$patch
|
||||
echo "Apply patch to VK-GL-CTS from $patch"
|
||||
git am < $OLDPWD/.gitlab-ci/container/patches/$patch
|
||||
done
|
||||
|
||||
{
|
||||
if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
|
||||
commit_desc=$(git show --no-patch --format='commit %h on %ci' --abbrev=10 "$DEQP_COMMIT")
|
||||
echo "dEQP $DEQP_API at $commit_desc"
|
||||
else
|
||||
echo "dEQP $DEQP_API version $DEQP_VERSION"
|
||||
fi
|
||||
if [ "$(git rev-parse HEAD)" != "$DEQP_COMMIT" ]; then
|
||||
echo "The following local patches are applied on top:"
|
||||
git log --reverse --oneline "$DEQP_COMMIT".. --format='- %s'
|
||||
fi
|
||||
} > /deqp-$deqp_api/deqp-$deqp_api-version
|
||||
|
||||
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
|
||||
# libpng (sigh). The archives get their checksums checked anyway, and git
|
||||
# always goes through ssh or https.
|
||||
python3 external/fetch_sources.py --insecure
|
||||
|
||||
case "${DEQP_API}" in
|
||||
VK-main)
|
||||
# Video tests rely on external files
|
||||
python3 external/fetch_video_decode_samples.py
|
||||
python3 external/fetch_video_encode_samples.py
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$DEQP_API" = tools ]]; then
|
||||
# Save the testlog stylesheets:
|
||||
cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp-$deqp_api
|
||||
fi
|
||||
mkdir -p /deqp
|
||||
|
||||
# Save the testlog stylesheets:
|
||||
cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp
|
||||
popd
|
||||
|
||||
deqp_build_targets=()
|
||||
case "${DEQP_API}" in
|
||||
VK|VK-main)
|
||||
deqp_build_targets+=(deqp-vk)
|
||||
;;
|
||||
GL)
|
||||
deqp_build_targets+=(glcts)
|
||||
;;
|
||||
GLES)
|
||||
deqp_build_targets+=(deqp-gles{2,3,31})
|
||||
deqp_build_targets+=(glcts) # needed for gles*-khr tests
|
||||
# deqp-egl also comes from this build, but it is handled separately below.
|
||||
;;
|
||||
tools)
|
||||
deqp_build_targets+=(testlog-to-xml)
|
||||
deqp_build_targets+=(testlog-to-csv)
|
||||
deqp_build_targets+=(testlog-to-junit)
|
||||
;;
|
||||
esac
|
||||
pushd /deqp
|
||||
|
||||
OLD_IFS="$IFS"
|
||||
IFS=";"
|
||||
CMAKE_SBT="${deqp_build_targets[*]}"
|
||||
IFS="$OLD_IFS"
|
||||
|
||||
pushd /deqp-$deqp_api
|
||||
|
||||
if [ "${DEQP_API}" = 'GLES' ]; then
|
||||
if [ "${DEQP_TARGET}" = 'android' ]; then
|
||||
cmake -S /VK-GL-CTS -B . -G Ninja \
|
||||
-DDEQP_TARGET=android \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSELECTED_BUILD_TARGETS="deqp-egl" \
|
||||
${EXTRA_CMAKE_ARGS:-}
|
||||
ninja modules/egl/deqp-egl
|
||||
mv modules/egl/deqp-egl{,-android}
|
||||
else
|
||||
if [ "${DEQP_TARGET}" != 'android' ]; then
|
||||
# When including EGL/X11 testing, do that build first and save off its
|
||||
# deqp-egl binary.
|
||||
cmake -S /VK-GL-CTS -B . -G Ninja \
|
||||
-DDEQP_TARGET=x11_egl_glx \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSELECTED_BUILD_TARGETS="deqp-egl" \
|
||||
${EXTRA_CMAKE_ARGS:-}
|
||||
$EXTRA_CMAKE_ARGS
|
||||
ninja modules/egl/deqp-egl
|
||||
mv modules/egl/deqp-egl{,-x11}
|
||||
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-x11
|
||||
|
||||
cmake -S /VK-GL-CTS -B . -G Ninja \
|
||||
-DDEQP_TARGET=wayland \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSELECTED_BUILD_TARGETS="deqp-egl" \
|
||||
${EXTRA_CMAKE_ARGS:-}
|
||||
$EXTRA_CMAKE_ARGS
|
||||
ninja modules/egl/deqp-egl
|
||||
mv modules/egl/deqp-egl{,-wayland}
|
||||
fi
|
||||
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-wayland
|
||||
fi
|
||||
|
||||
cmake -S /VK-GL-CTS -B . -G Ninja \
|
||||
-DDEQP_TARGET=${DEQP_TARGET} \
|
||||
-DDEQP_TARGET=${DEQP_TARGET:-x11_glx} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSELECTED_BUILD_TARGETS="${CMAKE_SBT}" \
|
||||
${EXTRA_CMAKE_ARGS:-}
|
||||
$EXTRA_CMAKE_ARGS
|
||||
mold --run ninja
|
||||
|
||||
# Make sure `default` doesn't silently stop detecting one of the platforms we care about
|
||||
if [ "${DEQP_TARGET}" = 'default' ]; then
|
||||
grep -q DEQP_SUPPORT_WAYLAND=1 build.ninja
|
||||
grep -q DEQP_SUPPORT_X11=1 build.ninja
|
||||
grep -q DEQP_SUPPORT_XCB=1 build.ninja
|
||||
if [ "${DEQP_TARGET}" = 'android' ]; then
|
||||
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-android
|
||||
fi
|
||||
|
||||
ninja "${deqp_build_targets[@]}"
|
||||
git -C /VK-GL-CTS describe --long > /deqp/version
|
||||
|
||||
if [ "$DEQP_API" != tools ]; then
|
||||
# Copy out the mustpass lists we want.
|
||||
mkdir -p mustpass
|
||||
# Copy out the mustpass lists we want.
|
||||
mkdir /deqp/mustpass
|
||||
for mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/main/vk-default.txt) ; do
|
||||
cat /VK-GL-CTS/external/vulkancts/mustpass/main/$mustpass \
|
||||
>> /deqp/mustpass/vk-master.txt
|
||||
done
|
||||
|
||||
if [ "${DEQP_API}" = 'VK' ] || [ "${DEQP_API}" = 'VK-main' ]; then
|
||||
for mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/main/vk-default.txt) ; do
|
||||
cat /VK-GL-CTS/external/vulkancts/mustpass/main/$mustpass \
|
||||
>> mustpass/vk-main.txt
|
||||
done
|
||||
fi
|
||||
if [ "${DEQP_TARGET}" != 'android' ]; then
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/aosp_mustpass/3.2.6.x/*.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-master.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/khronos_mustpass/3.2.6.x/*-master.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass/4.6.1.x/*-master.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass_single/4.6.1.x/*-single.txt \
|
||||
/deqp/mustpass/.
|
||||
|
||||
if [ "${DEQP_API}" = 'GL' ]; then
|
||||
cp \
|
||||
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gl/khronos_mustpass/main/*-main.txt \
|
||||
mustpass/
|
||||
cp \
|
||||
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gl/khronos_mustpass_single/main/*-single.txt \
|
||||
mustpass/
|
||||
fi
|
||||
|
||||
if [ "${DEQP_API}" = 'GLES' ]; then
|
||||
cp \
|
||||
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gles/aosp_mustpass/main/*.txt \
|
||||
mustpass/
|
||||
cp \
|
||||
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/egl/aosp_mustpass/main/egl-main.txt \
|
||||
mustpass/
|
||||
cp \
|
||||
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gles/khronos_mustpass/main/*-main.txt \
|
||||
mustpass/
|
||||
fi
|
||||
|
||||
# Compress the caselists, since Vulkan's in particular are gigantic; higher
|
||||
# compression levels provide no real measurable benefit.
|
||||
zstd -1 --rm mustpass/*.txt
|
||||
fi
|
||||
|
||||
if [ "$DEQP_API" = tools ]; then
|
||||
# Save *some* executor utils, but otherwise strip things down
|
||||
# to reduct deqp build size:
|
||||
mv executor/testlog-to-* .
|
||||
rm -rf executor
|
||||
mkdir /deqp/executor.save
|
||||
cp /deqp/executor/testlog-to-* /deqp/executor.save
|
||||
rm -rf /deqp/executor
|
||||
mv /deqp/executor.save /deqp/executor
|
||||
fi
|
||||
|
||||
# Remove other mustpass files, since we saved off the ones we wanted to conventient locations above.
|
||||
rm -rf assets/**/mustpass/
|
||||
rm -rf external/**/mustpass/
|
||||
rm -rf external/vulkancts/modules/vulkan/vk-main*
|
||||
rm -rf external/vulkancts/modules/vulkan/vk-default
|
||||
rm -rf /deqp/external/openglcts/modules/gl_cts/data/mustpass
|
||||
rm -rf /deqp/external/vulkancts/modules/vulkan/vk-master*
|
||||
rm -rf /deqp/external/vulkancts/modules/vulkan/vk-default
|
||||
|
||||
rm -rf external/openglcts/modules/cts-runner
|
||||
rm -rf modules/internal
|
||||
rm -rf execserver
|
||||
rm -rf framework
|
||||
find . -depth \( -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' \) -exec rm -rf {} \;
|
||||
if [ "${DEQP_API}" = 'VK' ] || [ "${DEQP_API}" = 'VK-main' ]; then
|
||||
${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
|
||||
fi
|
||||
if [ "${DEQP_API}" = 'GL' ] || [ "${DEQP_API}" = 'GLES' ]; then
|
||||
${STRIP_CMD:-strip} external/openglcts/modules/glcts
|
||||
fi
|
||||
if [ "${DEQP_API}" = 'GLES' ]; then
|
||||
${STRIP_CMD:-strip} modules/*/deqp-*
|
||||
fi
|
||||
rm -rf /deqp/external/openglcts/modules/cts-runner
|
||||
rm -rf /deqp/modules/internal
|
||||
rm -rf /deqp/execserver
|
||||
rm -rf /deqp/framework
|
||||
# shellcheck disable=SC2038,SC2185 # TODO: rewrite find
|
||||
find -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' | xargs rm -rf
|
||||
${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
|
||||
${STRIP_CMD:-strip} external/openglcts/modules/glcts
|
||||
${STRIP_CMD:-strip} modules/*/deqp-*
|
||||
du -sh ./*
|
||||
rm -rf /VK-GL-CTS
|
||||
popd
|
||||
|
||||
section_end deqp-$deqp_api
|
||||
|
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BUILD_TAG
|
||||
|
||||
set -uex
|
||||
|
||||
uncollapsed_section_start directx-headers "Building directx-headers"
|
||||
|
||||
git clone https://github.com/microsoft/DirectX-Headers -b v1.614.1 --depth 1
|
||||
pushd DirectX-Headers
|
||||
meson setup build --backend=ninja --buildtype=release -Dbuild-test=false ${EXTRA_MESON_ARGS:-}
|
||||
meson install -C build
|
||||
popd
|
||||
rm -rf DirectX-Headers
|
||||
|
||||
section_end directx-headers
|
@@ -1,39 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
|
||||
# shellcheck disable=SC2034 # Variables are used in scripts called from here
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
# Install fluster in /usr/local.
|
||||
|
||||
FLUSTER_REVISION="e997402978f62428fffc8e5a4a709690d9ca9bc5"
|
||||
|
||||
git clone https://github.com/fluendo/fluster.git --single-branch --no-checkout
|
||||
|
||||
pushd fluster || exit
|
||||
git checkout ${FLUSTER_REVISION}
|
||||
popd || exit
|
||||
|
||||
if [ "${SKIP_UPDATE_FLUSTER_VECTORS}" != 1 ]; then
|
||||
# Download the necessary vectors: H264, H265 and VP9
|
||||
# When updating FLUSTER_REVISION, make sure to update the vectors if necessary or
|
||||
# fluster-runner will report Missing results.
|
||||
fluster/fluster.py download \
|
||||
JVT-AVC_V1 JVT-FR-EXT JVT-MVC JVT-SVC_V1 \
|
||||
JCT-VC-3D-HEVC JCT-VC-HEVC_V1 JCT-VC-MV-HEVC JCT-VC-RExt JCT-VC-SCC JCT-VC-SHVC \
|
||||
VP9-TEST-VECTORS-HIGH VP9-TEST-VECTORS
|
||||
|
||||
# Build fluster vectors archive and upload it
|
||||
tar --zstd -cf "vectors.tar.zst" fluster/resources/
|
||||
s3_upload vectors.tar.zst "https://${S3_PATH_FLUSTER}/"
|
||||
|
||||
touch /lava-files/done
|
||||
s3_upload /lava-files/done "https://${S3_PATH_FLUSTER}/"
|
||||
|
||||
# Don't include the vectors in the rootfs
|
||||
rm -fr fluster/resources/*
|
||||
fi
|
||||
|
||||
mkdir -p "${ROOTFS}/usr/local/"
|
||||
mv fluster "${ROOTFS}/usr/local/"
|
||||
|
@@ -2,13 +2,11 @@
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# DEBIAN_X86_64_TEST_VK_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start fossilize "Building fossilize"
|
||||
|
||||
git clone https://github.com/ValveSoftware/Fossilize.git
|
||||
cd Fossilize
|
||||
git checkout b43ee42bbd5631ea21fe9a2dee4190d5d875c327
|
||||
@@ -19,5 +17,3 @@ cmake -S .. -B . -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
ninja -C . install
|
||||
cd ../..
|
||||
rm -rf Fossilize
|
||||
|
||||
section_end fossilize
|
||||
|
@@ -2,8 +2,6 @@
|
||||
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start gfxreconstruct "Building gfxreconstruct"
|
||||
|
||||
GFXRECONSTRUCT_VERSION=761837794a1e57f918a85af7000b12e531b178ae
|
||||
|
||||
git clone https://github.com/LunarG/gfxreconstruct.git \
|
||||
@@ -19,5 +17,3 @@ cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:
|
||||
cmake --build _build --parallel --target tools/{replay,info}/install/strip
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
||||
|
||||
section_end gfxreconstruct
|
||||
|
16
.gitlab-ci/container/build-hang-detection.sh
Normal file
16
.gitlab-ci/container/build-hang-detection.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
PARALLEL_DEQP_RUNNER_VERSION=fe557794b5dadd8dbf0eae403296625e03bda18a
|
||||
|
||||
git clone https://gitlab.freedesktop.org/mesa/parallel-deqp-runner --single-branch -b master --no-checkout /parallel-deqp-runner
|
||||
pushd /parallel-deqp-runner
|
||||
git checkout "$PARALLEL_DEQP_RUNNER_VERSION"
|
||||
meson . _build
|
||||
ninja -C _build hang-detection
|
||||
mkdir -p build/bin
|
||||
install _build/hang-detection build/bin
|
||||
strip build/bin/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
@@ -3,30 +3,21 @@
|
||||
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start kdl "Building kdl"
|
||||
KDL_REVISION="5056f71b100a68b72b285c6fc845a66a2ed25985"
|
||||
|
||||
KDL_REVISION="cbbe5fd54505fd03ee34f35bfd16794f0c30074f"
|
||||
KDL_CHECKOUT_DIR="/tmp/ci-kdl.git"
|
||||
|
||||
mkdir -p ${KDL_CHECKOUT_DIR}
|
||||
pushd ${KDL_CHECKOUT_DIR}
|
||||
git init
|
||||
git remote add origin https://gitlab.freedesktop.org/gfx-ci/ci-kdl.git
|
||||
git fetch --depth 1 origin ${KDL_REVISION}
|
||||
git checkout FETCH_HEAD
|
||||
git clone \
|
||||
https://gitlab.freedesktop.org/gfx-ci/ci-kdl.git \
|
||||
--depth 1 \
|
||||
ci-kdl.git
|
||||
pushd ci-kdl.git
|
||||
git checkout ${KDL_REVISION}
|
||||
popd
|
||||
|
||||
# Run venv in a subshell, so we don't accidentally leak the venv state into
|
||||
# calling scripts
|
||||
(
|
||||
python3 -m venv /ci-kdl
|
||||
source /ci-kdl/bin/activate &&
|
||||
pushd ${KDL_CHECKOUT_DIR} &&
|
||||
pip install -r requirements.txt &&
|
||||
pip install . &&
|
||||
popd
|
||||
)
|
||||
python3 -m venv ci-kdl.venv
|
||||
source ci-kdl.venv/bin/activate
|
||||
pushd ci-kdl.git
|
||||
pip install -r requirements.txt
|
||||
pip install .
|
||||
popd
|
||||
|
||||
rm -rf ${KDL_CHECKOUT_DIR}
|
||||
|
||||
section_end kdl
|
||||
rm -rf ci-kdl.git
|
||||
|
31
.gitlab-ci/container/build-kernel.sh
Normal file
31
.gitlab-ci/container/build-kernel.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
# shellcheck disable=SC2153
|
||||
|
||||
set -ex
|
||||
|
||||
mkdir -p kernel
|
||||
pushd kernel
|
||||
|
||||
if [[ ${DEBIAN_ARCH} = "arm64" ]]; then
|
||||
KERNEL_IMAGE_NAME+=" cheza-kernel"
|
||||
fi
|
||||
|
||||
for image in ${KERNEL_IMAGE_NAME}; do
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "/lava-files/${image}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${image}"
|
||||
done
|
||||
|
||||
for dtb in ${DEVICE_TREES}; do
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "/lava-files/${dtb}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${dtb}"
|
||||
done
|
||||
|
||||
mkdir -p "/lava-files/rootfs-${DEBIAN_ARCH}"
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar.zst"
|
||||
tar --keep-directory-symlink --zstd -xf modules.tar.zst -C "/lava-files/rootfs-${DEBIAN_ARCH}/"
|
||||
|
||||
popd
|
||||
rm -rf kernel
|
||||
|
@@ -1,8 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -uex
|
||||
|
||||
uncollapsed_section_start libclc "Building libclc"
|
||||
set -ex
|
||||
|
||||
export LLVM_CONFIG="llvm-config-${LLVM_VERSION:?"llvm unset!"}"
|
||||
LLVM_TAG="llvmorg-15.0.7"
|
||||
@@ -31,5 +29,3 @@ ln -s /usr/share/clc/spirv-mesa3d-.spv /usr/lib/clc/
|
||||
|
||||
du -sh ./*
|
||||
rm -rf /libclc /llvm-project
|
||||
|
||||
section_end libclc
|
||||
|
@@ -1,21 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# Script used for Android and Fedora builds (Debian builds get their libdrm version
|
||||
# from https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo - see PKG_REPO_REV)
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -uex
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start libdrm "Building libdrm"
|
||||
|
||||
export LIBDRM_VERSION=libdrm-2.4.122
|
||||
export LIBDRM_VERSION=libdrm-2.4.114
|
||||
|
||||
curl -L -O --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
https://dri.freedesktop.org/libdrm/"$LIBDRM_VERSION".tar.xz
|
||||
tar -xvf "$LIBDRM_VERSION".tar.xz && rm "$LIBDRM_VERSION".tar.xz
|
||||
cd "$LIBDRM_VERSION"
|
||||
meson setup build -D vc4=disabled -D freedreno=disabled -D etnaviv=disabled ${EXTRA_MESON_ARGS:-}
|
||||
meson setup build -D vc4=disabled -D freedreno=disabled -D etnaviv=disabled $EXTRA_MESON_ARGS
|
||||
meson install -C build
|
||||
cd ..
|
||||
rm -rf "$LIBDRM_VERSION"
|
||||
|
||||
section_end libdrm
|
||||
|
@@ -2,13 +2,7 @@
|
||||
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start llvm-spirv "Building LLVM-SPIRV-Translator"
|
||||
|
||||
if [ "${LLVM_VERSION:?llvm version not set}" -ge 18 ]; then
|
||||
VER="${LLVM_VERSION}.1.0"
|
||||
else
|
||||
VER="${LLVM_VERSION}.0.0"
|
||||
fi
|
||||
VER="${LLVM_VERSION:?llvm not set}.0.0"
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v${VER}.tar.gz"
|
||||
@@ -26,5 +20,3 @@ popd
|
||||
|
||||
du -sh "SPIRV-LLVM-Translator-${VER}"
|
||||
rm -rf "SPIRV-LLVM-Translator-${VER}"
|
||||
|
||||
section_end llvm-spirv
|
||||
|
@@ -2,31 +2,14 @@
|
||||
|
||||
set -ex
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# ALPINE_X86_64_BUILD_TAG
|
||||
# DEBIAN_BASE_TAG
|
||||
# DEBIAN_BUILD_TAG
|
||||
# FEDORA_X86_64_BUILD_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
uncollapsed_section_start mold "Building mold"
|
||||
|
||||
MOLD_VERSION="2.32.0"
|
||||
MOLD_VERSION="1.11.0"
|
||||
|
||||
git clone -b v"$MOLD_VERSION" --single-branch --depth 1 https://github.com/rui314/mold.git
|
||||
pushd mold
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -D BUILD_TESTING=OFF -D MOLD_LTO=ON
|
||||
cmake --build . --parallel "${FDO_CI_CONCURRENT:-4}"
|
||||
cmake --install . --strip
|
||||
|
||||
# Always use mold from now on
|
||||
find /usr/bin \( -name '*-ld' -o -name 'ld' \) \
|
||||
-exec ln -sf /usr/local/bin/ld.mold {} \; \
|
||||
-exec ls -l {} +
|
||||
cmake --build . --parallel
|
||||
cmake --install .
|
||||
|
||||
popd
|
||||
rm -rf mold
|
||||
|
||||
section_end mold
|
||||
|
@@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
|
||||
set -ex -o pipefail
|
||||
|
||||
uncollapsed_section_start ninetests "Building Nine tests"
|
||||
|
||||
### Careful editing anything below this line
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
git clone https://github.com/axeldavy/Xnine.git /Xnine
|
||||
mkdir /Xnine/build
|
||||
pushd /Xnine/build
|
||||
git checkout c64753d224c08006bcdcfa7880ada826f27164b1
|
||||
|
||||
cmake .. -DBUILD_TESTS=1 -DWITH_DRI3=1 -DD3DADAPTER9_LOCATION=/install/lib/d3d/d3dadapter9.so
|
||||
make
|
||||
|
||||
mkdir -p /NineTests/
|
||||
mv NineTests/NineTests /NineTests/
|
||||
|
||||
popd
|
||||
rm -rf /Xnine
|
||||
|
||||
section_end ninetests
|
@@ -1,38 +1,33 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
set -uex
|
||||
|
||||
uncollapsed_section_start piglit "Building piglit"
|
||||
set -ex
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# DEBIAN_X86_64_TEST_GL_TAG
|
||||
# DEBIAN_X86_64_TEST_VK_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
REV="0ecdebb0f5927728ddeeb851639a559b0f7d6590"
|
||||
REV="f7db20b03de6896d013826c0a731bc4417c1a5a0"
|
||||
|
||||
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
|
||||
pushd /piglit
|
||||
git checkout "$REV"
|
||||
patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
|
||||
cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS ${EXTRA_CMAKE_ARGS:-}
|
||||
ninja ${PIGLIT_BUILD_TARGETS:-}
|
||||
find . -depth \( -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' \) \
|
||||
! -name 'include_test.h' -exec rm -rf {} \;
|
||||
cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS $EXTRA_CMAKE_ARGS
|
||||
ninja $PIGLIT_BUILD_TARGETS
|
||||
# shellcheck disable=SC2038,SC2185 # TODO: rewrite find
|
||||
find -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' | xargs rm -rf
|
||||
rm -rf target_api
|
||||
if [ "${PIGLIT_BUILD_TARGETS:-}" = "piglit_replayer" ]; then
|
||||
find . -depth \
|
||||
! -regex "^\.$" \
|
||||
if [ "$PIGLIT_BUILD_TARGETS" = "piglit_replayer" ]; then
|
||||
# shellcheck disable=SC2038,SC2185 # TODO: rewrite find
|
||||
find ! -regex "^\.$" \
|
||||
! -regex "^\.\/piglit.*" \
|
||||
! -regex "^\.\/framework.*" \
|
||||
! -regex "^\.\/bin$" \
|
||||
! -regex "^\.\/bin\/replayer\.py" \
|
||||
! -regex "^\.\/templates.*" \
|
||||
! -regex "^\.\/tests$" \
|
||||
! -regex "^\.\/tests\/replay\.py" \
|
||||
-exec rm -rf {} \; 2>/dev/null
|
||||
! -regex "^\.\/tests\/replay\.py" 2>/dev/null | xargs rm -rf
|
||||
fi
|
||||
popd
|
||||
|
||||
section_end piglit
|
||||
|
@@ -5,10 +5,17 @@
|
||||
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start rust "Building Rust toolchain"
|
||||
# cargo (and rustup) wants to store stuff in $HOME/.cargo, and binaries in
|
||||
# $HOME/.cargo/bin. Make bin a link to a public bin directory so the commands
|
||||
# are just available to all build jobs.
|
||||
mkdir -p "$HOME"/.cargo
|
||||
ln -s /usr/local/bin "$HOME"/.cargo/bin
|
||||
|
||||
# Pick a specific snapshot from rustup so the compiler doesn't drift on us.
|
||||
RUST_VERSION=1.78.0-2024-05-02
|
||||
# Rusticl requires at least Rust 1.66.0
|
||||
#
|
||||
# Also, pick a specific snapshot from rustup so the compiler doesn't drift on
|
||||
# us.
|
||||
RUST_VERSION=1.66.1-2023-01-10
|
||||
|
||||
# For rust in Mesa, we use rustup to install. This lets us pick an arbitrary
|
||||
# version of the compiler, rather than whatever the container's Debian comes
|
||||
@@ -19,20 +26,14 @@ curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
--profile minimal \
|
||||
-y
|
||||
|
||||
# Make rustup tools available in the PATH environment variable
|
||||
# shellcheck disable=SC1091
|
||||
. "$HOME/.cargo/env"
|
||||
|
||||
rustup component add clippy rustfmt
|
||||
|
||||
# Set up a config script for cross compiling -- cargo needs your system cc for
|
||||
# linking in cross builds, but doesn't know what you want to use for system cc.
|
||||
cat > "$HOME/.cargo/config" <<EOF
|
||||
cat > /root/.cargo/config <<EOF
|
||||
[target.armv7-unknown-linux-gnueabihf]
|
||||
linker = "arm-linux-gnueabihf-gcc"
|
||||
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
linker = "aarch64-linux-gnu-gcc"
|
||||
EOF
|
||||
|
||||
section_end rust
|
||||
|
@@ -6,13 +6,9 @@
|
||||
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start shader-db "Building shader-db"
|
||||
|
||||
pushd /usr/local
|
||||
git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1
|
||||
rm -rf shader-db/.git
|
||||
cd shader-db
|
||||
make
|
||||
popd
|
||||
|
||||
section_end shader-db
|
||||
|
@@ -8,33 +8,13 @@
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -uex
|
||||
|
||||
uncollapsed_section_start skqp "Building skqp"
|
||||
|
||||
SKQP_BRANCH=android-cts-12.1_r5
|
||||
|
||||
SCRIPT_DIR="$(pwd)/.gitlab-ci/container"
|
||||
SKQP_PATCH_DIR="${SCRIPT_DIR}/patches"
|
||||
BASE_ARGS_GN_FILE="${SCRIPT_DIR}/build-skqp_base.gn"
|
||||
|
||||
case "$DEBIAN_ARCH" in
|
||||
amd64)
|
||||
SKQP_ARCH=x64
|
||||
;;
|
||||
armhf)
|
||||
SKQP_ARCH=arm
|
||||
;;
|
||||
arm64)
|
||||
SKQP_ARCH=arm64
|
||||
;;
|
||||
esac
|
||||
|
||||
SKIA_DIR=${SKIA_DIR:-$(mktemp -d)}
|
||||
SKQP_OUT_DIR=${SKIA_DIR}/out/${SKQP_ARCH}
|
||||
SKQP_INSTALL_DIR=${SKQP_INSTALL_DIR:-/skqp}
|
||||
SKQP_ASSETS_DIR="${SKQP_INSTALL_DIR}/assets"
|
||||
SKQP_BINARIES=(skqp list_gpu_unit_tests list_gms)
|
||||
# hack for skqp see the clang
|
||||
pushd /usr/bin/
|
||||
ln -s ../lib/llvm-15/bin/clang clang
|
||||
ln -s ../lib/llvm-15/bin/clang++ clang++
|
||||
popd
|
||||
|
||||
create_gn_args() {
|
||||
# gn can be configured to cross-compile skia and its tools
|
||||
@@ -58,6 +38,19 @@ download_skia_source() {
|
||||
git clone --branch "${SKQP_BRANCH}" --depth 1 "${SKQP_REPO}" "${SKIA_DIR}"
|
||||
}
|
||||
|
||||
set -ex
|
||||
|
||||
SCRIPT_DIR=$(realpath "$(dirname "$0")")
|
||||
SKQP_PATCH_DIR="${SCRIPT_DIR}/patches"
|
||||
BASE_ARGS_GN_FILE="${SCRIPT_DIR}/build-skqp_base.gn"
|
||||
|
||||
SKQP_ARCH=${SKQP_ARCH:-x64}
|
||||
SKIA_DIR=${SKIA_DIR:-$(mktemp -d)}
|
||||
SKQP_OUT_DIR=${SKIA_DIR}/out/${SKQP_ARCH}
|
||||
SKQP_INSTALL_DIR=${SKQP_INSTALL_DIR:-/skqp}
|
||||
SKQP_ASSETS_DIR="${SKQP_INSTALL_DIR}/assets"
|
||||
SKQP_BINARIES=(skqp list_gpu_unit_tests list_gms)
|
||||
|
||||
download_skia_source
|
||||
|
||||
pushd "${SKIA_DIR}"
|
||||
@@ -66,12 +59,6 @@ pushd "${SKIA_DIR}"
|
||||
cat "${SKQP_PATCH_DIR}"/build-skqp_*.patch |
|
||||
patch -p1
|
||||
|
||||
# hack for skqp see the clang
|
||||
pushd /usr/bin/
|
||||
ln -s "../lib/llvm-${LLVM_VERSION}/bin/clang" clang
|
||||
ln -s "../lib/llvm-${LLVM_VERSION}/bin/clang++" clang++
|
||||
popd
|
||||
|
||||
# Fetch some needed build tools needed to build skia/skqp.
|
||||
# Basically, it clones repositories with commits SHAs from ${SKIA_DIR}/DEPS
|
||||
# directory.
|
||||
@@ -100,5 +87,3 @@ popd
|
||||
rm -Rf "${SKIA_DIR}"
|
||||
|
||||
set +ex
|
||||
|
||||
section_end skqp
|
||||
|
@@ -34,11 +34,6 @@ extra_cflags_cc = [
|
||||
"-Wno-unused-but-set-variable",
|
||||
"-Wno-sizeof-array-div",
|
||||
"-Wno-string-concatenation",
|
||||
"-Wno-unsafe-buffer-usage",
|
||||
"-Wno-switch-default",
|
||||
"-Wno-cast-function-type-strict",
|
||||
"-Wno-format",
|
||||
"-Wno-enum-constexpr-conversion",
|
||||
]
|
||||
|
||||
cc_wrapper = "ccache"
|
||||
|
@@ -4,9 +4,7 @@
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -uex
|
||||
|
||||
uncollapsed_section_start va-tools "Building va-tools"
|
||||
set -ex
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
@@ -19,11 +17,9 @@ git clone \
|
||||
|
||||
pushd /va-utils
|
||||
# Too old libva in Debian 11. TODO: when this PR gets in, refer to the patch.
|
||||
curl --fail -L https://github.com/intel/libva-utils/pull/329.patch | git am
|
||||
curl -L https://github.com/intel/libva-utils/pull/329.patch | git am
|
||||
|
||||
meson setup build -D tests=true -Dprefix=/va ${EXTRA_MESON_ARGS:-}
|
||||
meson setup build -D tests=true -Dprefix=/va $EXTRA_MESON_ARGS
|
||||
meson install -C build
|
||||
popd
|
||||
rm -rf /va-utils
|
||||
|
||||
section_end va-tools
|
||||
|
@@ -2,21 +2,21 @@
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# DEBIAN_X86_64_TEST_VK_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start vkd3d-proton "Building vkd3d-proton"
|
||||
|
||||
VKD3D_PROTON_COMMIT="078f07f588c849c52fa21c8cfdd1c201465b1932"
|
||||
VKD3D_PROTON_COMMIT="2ad6cfdeaacdf47e2689e30a8fb5ac8193725f0d"
|
||||
|
||||
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
|
||||
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
|
||||
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-build"
|
||||
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-$VKD3D_PROTON_VERSION"
|
||||
|
||||
function build_arch {
|
||||
local arch="$1"
|
||||
shift
|
||||
|
||||
meson setup \
|
||||
meson "$@" \
|
||||
-Denable_tests=true \
|
||||
--buildtype release \
|
||||
--prefix "$VKD3D_PROTON_DST_DIR" \
|
||||
@@ -37,14 +37,7 @@ git submodule update --init --recursive
|
||||
git submodule update --recursive
|
||||
build_arch 64
|
||||
build_arch 86
|
||||
mkdir "$VKD3D_PROTON_DST_DIR/tests"
|
||||
cp \
|
||||
"tests/test-runner.sh" \
|
||||
"tests/d3d12_tests.h" \
|
||||
"$VKD3D_PROTON_DST_DIR/tests/"
|
||||
popd
|
||||
|
||||
rm -rf "$VKD3D_PROTON_BUILD_DIR"
|
||||
rm -rf "$VKD3D_PROTON_SRC_DIR"
|
||||
|
||||
section_end vkd3d-proton
|
||||
|
@@ -2,24 +2,17 @@
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
# DEBIAN_X86_64_TEST_GL_TAG
|
||||
# KERNEL_ROOTFS_TAG:
|
||||
|
||||
set -uex
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start vulkan-validation "Building Vulkan validation layers"
|
||||
|
||||
VALIDATION_TAG="snapshot-2025wk15"
|
||||
VALIDATION_TAG="v1.3.263"
|
||||
|
||||
git clone -b "$VALIDATION_TAG" --single-branch --depth 1 https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
|
||||
pushd Vulkan-ValidationLayers
|
||||
# we don't need to build SPIRV-Tools tools
|
||||
sed -i scripts/known_good.json -e 's/SPIRV_SKIP_EXECUTABLES=OFF/SPIRV_SKIP_EXECUTABLES=ON/'
|
||||
python3 scripts/update_deps.py --dir external --config release --generator Ninja --optional tests
|
||||
python3 scripts/update_deps.py --dir external --config debug
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTS=OFF -DBUILD_WERROR=OFF -C external/helper.cmake -S . -B build
|
||||
ninja -C build -j"${FDO_CI_CONCURRENT:-4}"
|
||||
cmake --install build --strip
|
||||
ninja -C build install
|
||||
popd
|
||||
rm -rf Vulkan-ValidationLayers
|
||||
|
||||
section_end vulkan-validation
|
||||
|
@@ -1,28 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -uex
|
||||
|
||||
uncollapsed_section_start wayland "Building Wayland"
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# ALPINE_X86_64_BUILD_TAG
|
||||
# DEBIAN_BASE_TAG
|
||||
# DEBIAN_BUILD_TAG
|
||||
# DEBIAN_TEST_ANDROID_TAG
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# FEDORA_X86_64_BUILD_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
set -ex
|
||||
|
||||
export LIBWAYLAND_VERSION="1.21.0"
|
||||
export WAYLAND_PROTOCOLS_VERSION="1.41"
|
||||
export WAYLAND_PROTOCOLS_VERSION="1.31"
|
||||
|
||||
git clone https://gitlab.freedesktop.org/wayland/wayland
|
||||
cd wayland
|
||||
git checkout "$LIBWAYLAND_VERSION"
|
||||
meson setup -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true _build ${EXTRA_MESON_ARGS:-}
|
||||
meson setup -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true _build $EXTRA_MESON_ARGS
|
||||
meson install -C _build
|
||||
cd ..
|
||||
rm -rf wayland
|
||||
@@ -30,9 +17,7 @@ rm -rf wayland
|
||||
git clone https://gitlab.freedesktop.org/wayland/wayland-protocols
|
||||
cd wayland-protocols
|
||||
git checkout "$WAYLAND_PROTOCOLS_VERSION"
|
||||
meson setup -Dtests=false _build ${EXTRA_MESON_ARGS:-}
|
||||
meson setup _build $EXTRA_MESON_ARGS
|
||||
meson install -C _build
|
||||
cd ..
|
||||
rm -rf wayland-protocols
|
||||
|
||||
section_end wayland
|
||||
|
@@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# When changing this file, all the linux tags in
|
||||
# .gitlab-ci/image-tags.yml need updating.
|
||||
|
||||
set -eu
|
||||
|
||||
# Early check for required env variables, relies on `set -u`
|
||||
: "$S3_JWT_FILE_SCRIPT"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: $(basename "$0") <CONTAINER_CI_JOB_NAME>" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CONTAINER_CI_JOB_NAME="$1"
|
||||
|
||||
# Tasks to perform before executing the script of a container job
|
||||
eval "$S3_JWT_FILE_SCRIPT"
|
||||
unset S3_JWT_FILE_SCRIPT
|
||||
|
||||
trap 'rm -f ${S3_JWT_FILE}' EXIT INT TERM
|
||||
|
||||
bash ".gitlab-ci/container/${CONTAINER_CI_JOB_NAME}.sh"
|
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
if test -f /etc/debian_version; then
|
||||
apt-get autoremove -y --purge
|
||||
fi
|
||||
|
||||
# Clean up any build cache
|
||||
rm -rf /root/.cache
|
||||
# Clean up any build cache for rust.
|
||||
rm -rf /.cargo
|
||||
|
||||
if test -x /usr/bin/ccache; then
|
||||
ccache --show-stats
|
||||
|
@@ -1,7 +1,4 @@
|
||||
#!/bin/sh
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BUILD_TAG
|
||||
|
||||
if test -x /usr/bin/ccache; then
|
||||
if test -f /etc/debian_version; then
|
||||
@@ -16,8 +13,8 @@ if test -x /usr/bin/ccache; then
|
||||
|
||||
export CCACHE_COMPILERCHECK=content
|
||||
export CCACHE_COMPRESS=true
|
||||
export CCACHE_DIR="/cache/$CI_PROJECT_NAME/ccache"
|
||||
export PATH="$CCACHE_PATH:$PATH"
|
||||
export CCACHE_DIR=/cache/$CI_PROJECT_NAME/ccache
|
||||
export PATH=$CCACHE_PATH:$PATH
|
||||
|
||||
# CMake ignores $PATH, so we have to force CC/GCC to the ccache versions.
|
||||
export CC="${CCACHE_PATH}/gcc"
|
||||
@@ -26,6 +23,14 @@ if test -x /usr/bin/ccache; then
|
||||
ccache --show-stats
|
||||
fi
|
||||
|
||||
# When not using the mold linker (e.g. unsupported architecture), force
|
||||
# linkers to gold, since it's so much faster for building. We can't use
|
||||
# lld because we're on old debian and it's buggy. ming fails meson builds
|
||||
# with it with "meson.build:21:0: ERROR: Unable to determine dynamic linker"
|
||||
find /usr/bin -name \*-ld -o -name ld | \
|
||||
grep -v mingw | \
|
||||
xargs -n 1 -I '{}' ln -sf '{}.gold' '{}'
|
||||
|
||||
# Make a wrapper script for ninja to always include the -j flags
|
||||
{
|
||||
echo '#!/bin/sh -x'
|
||||
@@ -45,30 +50,3 @@ echo -e "retry_connrefused = on\n" \
|
||||
"retry_on_host_error = on\n" \
|
||||
"retry_on_http_error = 429,500,502,503,504\n" \
|
||||
"wait_retry = 32" >> /etc/wgetrc
|
||||
|
||||
# Ensure that rust tools are in PATH if they exist
|
||||
CARGO_ENV_FILE="$HOME/.cargo/env"
|
||||
if [ -f "$CARGO_ENV_FILE" ]; then
|
||||
# shellcheck disable=SC1090
|
||||
source "$CARGO_ENV_FILE"
|
||||
fi
|
||||
|
||||
ci_tag_early_checks() {
|
||||
# Runs the first part of the build script to perform the tag check only
|
||||
uncollapsed_section_switch "ci_tag_early_checks" "Ensuring component versions match declared tags in CI builds"
|
||||
echo "[Structured Tagging] Checking components: ${CI_BUILD_COMPONENTS}"
|
||||
# shellcheck disable=SC2086
|
||||
for component in ${CI_BUILD_COMPONENTS}; do
|
||||
bin/ci/update_tag.py --check ${component} || exit 1
|
||||
done
|
||||
echo "[Structured Tagging] Components check done"
|
||||
section_end "ci_tag_early_checks"
|
||||
}
|
||||
|
||||
# Check if each declared tag component is up to date before building
|
||||
if [ -n "${CI_BUILD_COMPONENTS:-}" ]; then
|
||||
# Remove any duplicates by splitting on whitespace, sorting, then joining back
|
||||
CI_BUILD_COMPONENTS="$(echo "${CI_BUILD_COMPONENTS}" | xargs -n1 | sort -u | xargs)"
|
||||
|
||||
ci_tag_early_checks
|
||||
fi
|
||||
|
@@ -18,11 +18,11 @@ cat > "$cross_file" <<EOF
|
||||
[binaries]
|
||||
ar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
|
||||
c = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
|
||||
cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '--start-no-unused-arguments', '-static-libstdc++', '--end-no-unused-arguments']
|
||||
cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-static-libstdc++']
|
||||
c_ld = 'lld'
|
||||
cpp_ld = 'lld'
|
||||
strip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip'
|
||||
pkg-config = ['/usr/bin/pkgconf']
|
||||
pkgconfig = ['/usr/bin/pkgconf']
|
||||
|
||||
[host_machine]
|
||||
system = 'android'
|
||||
|
@@ -2,71 +2,62 @@
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
: "${LLVM_VERSION:?llvm version not set!}"
|
||||
export LLVM_VERSION="${LLVM_VERSION:=15}"
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
EPHEMERAL=(
|
||||
)
|
||||
|
||||
DEPS=(
|
||||
"crossbuild-essential-$arch"
|
||||
"pkgconf:$arch"
|
||||
"libasan8:$arch"
|
||||
"libdrm-dev:$arch"
|
||||
"libelf-dev:$arch"
|
||||
"libexpat1-dev:$arch"
|
||||
"libffi-dev:$arch"
|
||||
"libpciaccess-dev:$arch"
|
||||
"libstdc++6:$arch"
|
||||
"libvulkan-dev:$arch"
|
||||
"libx11-dev:$arch"
|
||||
"libx11-xcb-dev:$arch"
|
||||
"libxcb-dri2-0-dev:$arch"
|
||||
"libxcb-dri3-dev:$arch"
|
||||
"libxcb-glx0-dev:$arch"
|
||||
"libxcb-present-dev:$arch"
|
||||
"libxcb-randr0-dev:$arch"
|
||||
"libxcb-shm0-dev:$arch"
|
||||
"libxcb-xfixes0-dev:$arch"
|
||||
"libxdamage-dev:$arch"
|
||||
"libxext-dev:$arch"
|
||||
"libxrandr-dev:$arch"
|
||||
"libxshmfence-dev:$arch"
|
||||
"libxxf86vm-dev:$arch"
|
||||
"libwayland-dev:$arch"
|
||||
)
|
||||
STABLE_EPHEMERAL=" \
|
||||
"
|
||||
|
||||
dpkg --add-architecture $arch
|
||||
|
||||
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
|
||||
$EXTRA_LOCAL_PACKAGES
|
||||
apt-get install -y --no-remove \
|
||||
$EXTRA_LOCAL_PACKAGES \
|
||||
$STABLE_EPHEMERAL \
|
||||
crossbuild-essential-$arch \
|
||||
pkgconf:$arch \
|
||||
libasan8:$arch \
|
||||
libdrm-dev:$arch \
|
||||
libelf-dev:$arch \
|
||||
libexpat1-dev:$arch \
|
||||
libffi-dev:$arch \
|
||||
libpciaccess-dev:$arch \
|
||||
libstdc++6:$arch \
|
||||
libvulkan-dev:$arch \
|
||||
libx11-dev:$arch \
|
||||
libx11-xcb-dev:$arch \
|
||||
libxcb-dri2-0-dev:$arch \
|
||||
libxcb-dri3-dev:$arch \
|
||||
libxcb-glx0-dev:$arch \
|
||||
libxcb-present-dev:$arch \
|
||||
libxcb-randr0-dev:$arch \
|
||||
libxcb-shm0-dev:$arch \
|
||||
libxcb-xfixes0-dev:$arch \
|
||||
libxdamage-dev:$arch \
|
||||
libxext-dev:$arch \
|
||||
libxrandr-dev:$arch \
|
||||
libxshmfence-dev:$arch \
|
||||
libxxf86vm-dev:$arch \
|
||||
libwayland-dev:$arch
|
||||
|
||||
if [[ $arch != "armhf" ]]; then
|
||||
# We don't need clang-format for the crossbuilds, but the installed amd64
|
||||
# package will conflict with libclang. Uninstall clang-format (and its
|
||||
# problematic dependency) to fix.
|
||||
apt-get remove -y "clang-format-${LLVM_VERSION}" "libclang-cpp${LLVM_VERSION}" \
|
||||
"llvm-${LLVM_VERSION}-runtime" "llvm-${LLVM_VERSION}-linker-tools"
|
||||
apt-get remove -y clang-format-${LLVM_VERSION} libclang-cpp${LLVM_VERSION}
|
||||
|
||||
# llvm-*-tools:$arch conflicts with python3:amd64. Install dependencies only
|
||||
# with apt-get, then force-install llvm-*-{dev,tools}:$arch with dpkg to get
|
||||
# around this.
|
||||
apt-get install -y --no-remove --no-install-recommends \
|
||||
"libclang-cpp${LLVM_VERSION}:$arch" \
|
||||
"libgcc-s1:$arch" \
|
||||
"libtinfo-dev:$arch" \
|
||||
"libz3-dev:$arch" \
|
||||
"llvm-${LLVM_VERSION}:$arch" \
|
||||
libclang-cpp${LLVM_VERSION}:$arch \
|
||||
libgcc-s1:$arch \
|
||||
libtinfo-dev:$arch \
|
||||
libz3-dev:$arch \
|
||||
llvm-${LLVM_VERSION}:$arch \
|
||||
zlib1g
|
||||
fi
|
||||
|
||||
@@ -77,19 +68,19 @@ fi
|
||||
|
||||
|
||||
# dependencies where we want a specific version
|
||||
MULTIARCH_PATH=$(dpkg-architecture -A $arch -qDEB_TARGET_MULTIARCH)
|
||||
export EXTRA_MESON_ARGS="--cross-file=/cross_file-${arch}.txt -D libdir=lib/${MULTIARCH_PATH}"
|
||||
EXTRA_MESON_ARGS="--cross-file=/cross_file-${arch}.txt -D libdir=lib/$(dpkg-architecture -A $arch -qDEB_TARGET_MULTIARCH)"
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
||||
. .gitlab-ci/container/build-directx-headers.sh
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
||||
apt-get purge -y \
|
||||
$STABLE_EPHEMERAL
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
||||
# This needs to be done after container_post_build.sh, or apt-get breaks in there
|
||||
if [[ $arch != "armhf" ]]; then
|
||||
apt-get download llvm-"${LLVM_VERSION}"-{dev,tools}:"$arch"
|
||||
dpkg -i --force-depends llvm-"${LLVM_VERSION}"-*_"${arch}".deb
|
||||
rm llvm-"${LLVM_VERSION}"-*_"${arch}".deb
|
||||
apt-get download llvm-${LLVM_VERSION}-{dev,tools}:$arch
|
||||
dpkg -i --force-depends llvm-${LLVM_VERSION}-*_${arch}.deb
|
||||
rm llvm-${LLVM_VERSION}-*_${arch}.deb
|
||||
fi
|
||||
|
73
.gitlab-ci/container/debian/android_build.sh
Executable file → Normal file
73
.gitlab-ci/container/debian/android_build.sh
Executable file → Normal file
@@ -1,37 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BUILD_TAG
|
||||
set -ex
|
||||
|
||||
set -e
|
||||
EPHEMERAL="\
|
||||
autoconf \
|
||||
rdfind \
|
||||
unzip \
|
||||
"
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -x
|
||||
|
||||
EPHEMERAL=(
|
||||
autoconf
|
||||
rdfind
|
||||
unzip
|
||||
)
|
||||
|
||||
apt-get install -y --no-remove "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
apt-get install -y --no-remove $EPHEMERAL
|
||||
|
||||
# Fetch the NDK and extract just the toolchain we want.
|
||||
ndk="android-ndk-${ANDROID_NDK_VERSION}"
|
||||
ndk=$ANDROID_NDK
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o $ndk.zip https://dl.google.com/android/repository/$ndk-linux.zip
|
||||
unzip -d / $ndk.zip "$ndk/source.properties" "$ndk/build/cmake/*" "$ndk/toolchains/llvm/*"
|
||||
unzip -d / $ndk.zip "$ndk/toolchains/llvm/*"
|
||||
rm $ndk.zip
|
||||
# Since it was packed as a zip file, symlinks/hardlinks got turned into
|
||||
# duplicate files. Turn them into hardlinks to save on container space.
|
||||
rdfind -makehardlinks true -makeresultsfile false /${ndk}/
|
||||
# Drop some large tools we won't use in this build.
|
||||
find /${ndk}/ -type f \( -iname '*clang-check*' -o -iname '*clang-tidy*' -o -iname '*lldb*' \) -exec rm -f {} \;
|
||||
find /${ndk}/ -type f | grep -E -i "clang-check|clang-tidy|lldb" | xargs rm -f
|
||||
|
||||
sh .gitlab-ci/container/create-android-ndk-pc.sh /$ndk zlib.pc "" "-lz" "1.2.3" $ANDROID_SDK_VERSION
|
||||
|
||||
@@ -40,19 +30,33 @@ sh .gitlab-ci/container/create-android-cross-file.sh /$ndk i686-linux-android x8
|
||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk aarch64-linux-android aarch64 armv8 $ANDROID_SDK_VERSION
|
||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk arm-linux-androideabi arm armv7hl $ANDROID_SDK_VERSION armv7a-linux-androideabi
|
||||
|
||||
# Build libdrm for the host (Debian) environment, so it's available for
|
||||
# binaries we'll run as part of the build process
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
# Not using build-libdrm.sh because we don't want its cleanup after building
|
||||
# each arch. Fetch and extract now.
|
||||
export LIBDRM_VERSION=libdrm-2.4.114
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
|
||||
tar -xf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
|
||||
|
||||
# Build libdrm for the NDK environment, so it's available when building for
|
||||
# the Android target
|
||||
for arch in \
|
||||
x86_64-linux-android \
|
||||
i686-linux-android \
|
||||
aarch64-linux-android \
|
||||
arm-linux-androideabi ; do
|
||||
EXTRA_MESON_ARGS="--cross-file=/cross_file-$arch.txt --libdir=lib/$arch -Dnouveau=disabled -Dintel=disabled" \
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
cd $LIBDRM_VERSION
|
||||
rm -rf build-$arch
|
||||
meson setup build-$arch \
|
||||
--cross-file=/cross_file-$arch.txt \
|
||||
--libdir=lib/$arch \
|
||||
-Dnouveau=disabled \
|
||||
-Dvc4=disabled \
|
||||
-Detnaviv=disabled \
|
||||
-Dfreedreno=disabled \
|
||||
-Dintel=disabled \
|
||||
-Dcairo-tests=disabled \
|
||||
-Dvalgrind=disabled
|
||||
meson install -C build-$arch
|
||||
cd ..
|
||||
done
|
||||
|
||||
rm -rf $LIBDRM_VERSION
|
||||
@@ -97,22 +101,9 @@ for arch in \
|
||||
--libdir=/usr/local/lib/${arch}
|
||||
make install
|
||||
make distclean
|
||||
|
||||
unset CC
|
||||
unset CC
|
||||
unset CXX
|
||||
unset LD
|
||||
unset RANLIB
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf $LIBELF_VERSION
|
||||
|
||||
|
||||
# Build LLVM libraries for Android only if necessary, uploading a copy to S3
|
||||
# to avoid rebuilding it in a future run if the version does not change.
|
||||
bash .gitlab-ci/container/build-android-x86_64-llvm.sh
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
apt-get purge -y $EPHEMERAL
|
||||
|
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DEBIAN_ARCH=armhf \
|
||||
. .gitlab-ci/container/debian/test-base.sh
|
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DEBIAN_ARCH="armhf" \
|
||||
. .gitlab-ci/container/debian/test-gl.sh
|
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DEBIAN_ARCH="armhf" \
|
||||
. .gitlab-ci/container/debian/test-vk.sh
|
5
.gitlab-ci/container/debian/arm32_test.sh
Normal file
5
.gitlab-ci/container/debian/arm32_test.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
arch=armhf . .gitlab-ci/container/debian/arm_test.sh
|
@@ -2,89 +2,73 @@
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
: "${LLVM_VERSION:?llvm version not set}"
|
||||
export LLVM_VERSION="${LLVM_VERSION:=15}"
|
||||
|
||||
apt-get -y install ca-certificates curl gnupg2
|
||||
apt-get -y install ca-certificates
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
|
||||
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
|
||||
|
||||
. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
EPHEMERAL=(
|
||||
libssl-dev
|
||||
)
|
||||
|
||||
DEPS=(
|
||||
apt-utils
|
||||
android-libext4-utils
|
||||
autoconf
|
||||
automake
|
||||
bc
|
||||
bison
|
||||
ccache
|
||||
cmake
|
||||
curl
|
||||
"clang-${LLVM_VERSION}"
|
||||
fastboot
|
||||
flatbuffers-compiler
|
||||
flex
|
||||
g++
|
||||
git
|
||||
glslang-tools
|
||||
kmod
|
||||
"libclang-${LLVM_VERSION}-dev"
|
||||
"libclang-cpp${LLVM_VERSION}-dev"
|
||||
"libclang-common-${LLVM_VERSION}-dev"
|
||||
libasan8
|
||||
libdrm-dev
|
||||
libelf-dev
|
||||
libexpat1-dev
|
||||
libflatbuffers-dev
|
||||
"libllvm${LLVM_VERSION}"
|
||||
libvulkan-dev
|
||||
libx11-dev
|
||||
libx11-xcb-dev
|
||||
libxcb-dri2-0-dev
|
||||
libxcb-dri3-dev
|
||||
libxcb-glx0-dev
|
||||
libxcb-present-dev
|
||||
libxcb-randr0-dev
|
||||
libxcb-shm0-dev
|
||||
libxcb-xfixes0-dev
|
||||
libxdamage-dev
|
||||
libxext-dev
|
||||
libxrandr-dev
|
||||
libxshmfence-dev
|
||||
libxtensor-dev
|
||||
libxxf86vm-dev
|
||||
libwayland-dev
|
||||
libwayland-egl-backend-dev
|
||||
"llvm-${LLVM_VERSION}-dev"
|
||||
ninja-build
|
||||
meson
|
||||
openssh-server
|
||||
pkgconf
|
||||
python3-mako
|
||||
python3-pil
|
||||
python3-pip
|
||||
python3-pycparser
|
||||
python3-requests
|
||||
python3-setuptools
|
||||
u-boot-tools
|
||||
xz-utils
|
||||
zlib1g-dev
|
||||
zstd
|
||||
)
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get -y install "${DEPS[@]}" "${EPHEMERAL[@]}"
|
||||
# Ephemeral packages (installed for this script and removed again at
|
||||
# the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
libssl-dev \
|
||||
"
|
||||
|
||||
apt-get -y install \
|
||||
${STABLE_EPHEMERAL} \
|
||||
apt-utils \
|
||||
android-libext4-utils \
|
||||
autoconf \
|
||||
automake \
|
||||
bc \
|
||||
bison \
|
||||
ccache \
|
||||
cmake \
|
||||
curl \
|
||||
debootstrap \
|
||||
fastboot \
|
||||
flex \
|
||||
g++ \
|
||||
git \
|
||||
glslang-tools \
|
||||
kmod \
|
||||
libasan8 \
|
||||
libdrm-dev \
|
||||
libelf-dev \
|
||||
libexpat1-dev \
|
||||
libvulkan-dev \
|
||||
libx11-dev \
|
||||
libx11-xcb-dev \
|
||||
libxcb-dri2-0-dev \
|
||||
libxcb-dri3-dev \
|
||||
libxcb-glx0-dev \
|
||||
libxcb-present-dev \
|
||||
libxcb-randr0-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxdamage-dev \
|
||||
libxext-dev \
|
||||
libxrandr-dev \
|
||||
libxshmfence-dev \
|
||||
libxxf86vm-dev \
|
||||
libwayland-dev \
|
||||
libwayland-egl-backend-dev \
|
||||
llvm-${LLVM_VERSION}-dev \
|
||||
ninja-build \
|
||||
meson \
|
||||
openssh-server \
|
||||
pkgconf \
|
||||
python3-mako \
|
||||
python3-pil \
|
||||
python3-pip \
|
||||
python3-requests \
|
||||
python3-setuptools \
|
||||
u-boot-tools \
|
||||
xz-utils \
|
||||
zlib1g-dev \
|
||||
zstd
|
||||
|
||||
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
@@ -97,16 +81,6 @@ arch=armhf
|
||||
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
||||
. .gitlab-ci/container/build-llvm-spirv.sh
|
||||
|
||||
. .gitlab-ci/container/build-libclc.sh
|
||||
|
||||
. .gitlab-ci/container/install-meson.sh
|
||||
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
|
||||
. .gitlab-ci/container/build-bindgen.sh
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
||||
apt-get purge -y $STABLE_EPHEMERAL
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DEBIAN_ARCH=arm64 \
|
||||
. .gitlab-ci/container/debian/test-base.sh
|
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DEBIAN_ARCH="arm64" \
|
||||
. .gitlab-ci/container/debian/test-gl.sh
|
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DEBIAN_ARCH="arm64" \
|
||||
. .gitlab-ci/container/debian/test-vk.sh
|
5
.gitlab-ci/container/debian/arm64_test.sh
Normal file
5
.gitlab-ci/container/debian/arm64_test.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
arch=arm64 . .gitlab-ci/container/debian/arm_test.sh
|
47
.gitlab-ci/container/debian/arm_test.sh
Normal file
47
.gitlab-ci/container/debian/arm_test.sh
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2154 # arch is assigned in previous scripts
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BASE_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
############### Install packages for baremetal testing
|
||||
apt-get install -y ca-certificates
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
cpio \
|
||||
curl \
|
||||
fastboot \
|
||||
netcat-openbsd \
|
||||
openssh-server \
|
||||
procps \
|
||||
python3-distutils \
|
||||
python3-minimal \
|
||||
python3-serial \
|
||||
rsync \
|
||||
snmp \
|
||||
zstd
|
||||
|
||||
# setup SNMPv2 SMI MIB
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
https://raw.githubusercontent.com/net-snmp/net-snmp/master/mibs/SNMPv2-SMI.txt \
|
||||
-o /usr/share/snmp/mibs/SNMPv2-SMI.txt
|
||||
|
||||
. .gitlab-ci/container/baremetal_build.sh
|
||||
|
||||
mkdir -p /baremetal-files/jetson-nano/boot/
|
||||
ln -s \
|
||||
/baremetal-files/Image \
|
||||
/baremetal-files/tegra210-p3450-0000.dtb \
|
||||
/baremetal-files/jetson-nano/boot/
|
||||
|
||||
mkdir -p /baremetal-files/jetson-tk1/boot/
|
||||
ln -s \
|
||||
/baremetal-files/zImage \
|
||||
/baremetal-files/tegra124-jetson-tk1.dtb \
|
||||
/baremetal-files/jetson-tk1/boot/
|
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
arch=armhf . .gitlab-ci/container/debian/baremetal_arm_test.sh
|
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
arch=arm64 . .gitlab-ci/container/debian/baremetal_arm_test.sh
|
@@ -1,56 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2154 # arch is assigned in previous scripts
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BASE_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
############### Install packages for baremetal testing
|
||||
DEPS=(
|
||||
cpio
|
||||
curl
|
||||
fastboot
|
||||
netcat-openbsd
|
||||
openssh-server
|
||||
procps
|
||||
python3-distutils
|
||||
python3-filelock
|
||||
python3-fire
|
||||
python3-minimal
|
||||
python3-serial
|
||||
rsync
|
||||
snmp
|
||||
zstd
|
||||
)
|
||||
|
||||
apt-get install -y ca-certificates
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
|
||||
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove "${DEPS[@]}"
|
||||
|
||||
# setup SNMPv2 SMI MIB
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
https://raw.githubusercontent.com/net-snmp/net-snmp/master/mibs/SNMPv2-SMI.txt \
|
||||
-o /usr/share/snmp/mibs/SNMPv2-SMI.txt
|
||||
|
||||
. .gitlab-ci/container/baremetal_build.sh
|
||||
|
||||
mkdir -p /baremetal-files/jetson-nano/boot/
|
||||
ln -s \
|
||||
/baremetal-files/Image \
|
||||
/baremetal-files/tegra210-p3450-0000.dtb \
|
||||
/baremetal-files/jetson-nano/boot/
|
||||
|
||||
mkdir -p /baremetal-files/jetson-tk1/boot/
|
||||
ln -s \
|
||||
/baremetal-files/zImage \
|
||||
/baremetal-files/tegra124-jetson-tk1.dtb \
|
||||
/baremetal-files/jetson-tk1/boot/
|
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Check to see if we need a separate repo to install LLVM.
|
||||
|
||||
case "${FDO_DISTRIBUTION_VERSION%-*},${LLVM_VERSION}" in
|
||||
bookworm,15)
|
||||
NEED_LLVM_REPO="false"
|
||||
;;
|
||||
*)
|
||||
NEED_LLVM_REPO="true"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$NEED_LLVM_REPO" = "true" ]; then
|
||||
curl --fail -s https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
||||
export LLVM_APT_REPO="deb [trusted=yes] https://apt.llvm.org/${FDO_DISTRIBUTION_VERSION%-*}/ llvm-toolchain-${FDO_DISTRIBUTION_VERSION%-*}-${LLVM_VERSION} main"
|
||||
echo "$LLVM_APT_REPO" | tee /etc/apt/sources.list.d/llvm.list
|
||||
fi
|
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
arch=ppc64el
|
||||
|
||||
|
@@ -1,20 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
arch=s390x
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
EPHEMERAL=(
|
||||
libssl-dev
|
||||
)
|
||||
STABLE_EPHEMERAL="libssl-dev"
|
||||
|
||||
apt-get -y install "${EPHEMERAL[@]}"
|
||||
apt-get -y install "$STABLE_EPHEMERAL"
|
||||
|
||||
. .gitlab-ci/container/build-mold.sh
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
||||
apt-get purge -y "$STABLE_EPHEMERAL"
|
||||
|
||||
. .gitlab-ci/container/cross_build.sh
|
||||
|
@@ -1,227 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BASE_TAG
|
||||
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
uncollapsed_section_start debian_setup "Base Debian system setup"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get install -y curl ca-certificates gnupg2 software-properties-common
|
||||
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
|
||||
|
||||
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
|
||||
|
||||
: "${LLVM_VERSION:?llvm version not set!}"
|
||||
|
||||
. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
EPHEMERAL=(
|
||||
autoconf
|
||||
automake
|
||||
bc
|
||||
bison
|
||||
bzip2
|
||||
ccache
|
||||
cmake
|
||||
"clang-${LLVM_VERSION}"
|
||||
dpkg-dev
|
||||
flex
|
||||
glslang-tools
|
||||
g++
|
||||
libasound2-dev
|
||||
libcap-dev
|
||||
"libclang-cpp${LLVM_VERSION}-dev"
|
||||
"libclang-rt-${LLVM_VERSION}-dev"
|
||||
libdrm-dev
|
||||
libegl-dev
|
||||
libelf-dev
|
||||
libepoxy-dev
|
||||
libexpat1-dev
|
||||
libgbm-dev
|
||||
libgles2-mesa-dev
|
||||
liblz4-dev
|
||||
libpciaccess-dev
|
||||
libssl-dev
|
||||
libvulkan-dev
|
||||
libudev-dev
|
||||
libwaffle-dev
|
||||
libwayland-dev
|
||||
libx11-xcb-dev
|
||||
libxcb-dri2-0-dev
|
||||
libxcb-dri3-dev
|
||||
libxcb-present-dev
|
||||
libxfixes-dev
|
||||
libxcb-ewmh-dev
|
||||
libxext-dev
|
||||
libxkbcommon-dev
|
||||
libxrandr-dev
|
||||
libxrender-dev
|
||||
libzstd-dev
|
||||
"llvm-${LLVM_VERSION}-dev"
|
||||
make
|
||||
meson
|
||||
openssh-server
|
||||
patch
|
||||
pkgconf
|
||||
protobuf-compiler
|
||||
python3-dev
|
||||
python3-pip
|
||||
python3-setuptools
|
||||
python3-wheel
|
||||
wayland-protocols
|
||||
xz-utils
|
||||
)
|
||||
|
||||
DEPS=(
|
||||
apt-utils
|
||||
clinfo
|
||||
curl
|
||||
git
|
||||
git-lfs
|
||||
inetutils-syslogd
|
||||
iptables
|
||||
jq
|
||||
kmod
|
||||
libasan8
|
||||
libcap2
|
||||
libdrm2
|
||||
libegl1
|
||||
libepoxy0
|
||||
libexpat1
|
||||
libfdt1
|
||||
"libclang-common-${LLVM_VERSION}-dev"
|
||||
"libclang-cpp${LLVM_VERSION}"
|
||||
"libllvm${LLVM_VERSION}"
|
||||
liblz4-1
|
||||
libpng16-16
|
||||
libpython3.11
|
||||
libubsan1
|
||||
libvulkan1
|
||||
libwayland-client0
|
||||
libwayland-server0
|
||||
libxcb-ewmh2
|
||||
libxcb-randr0
|
||||
libxcb-shm0
|
||||
libxcb-xfixes0
|
||||
libxkbcommon0
|
||||
libxrandr2
|
||||
libxrender1
|
||||
ocl-icd-libopencl1
|
||||
pciutils
|
||||
python3-lxml
|
||||
python3-mako
|
||||
python3-numpy
|
||||
python3-packaging
|
||||
python3-pil
|
||||
python3-renderdoc
|
||||
python3-requests
|
||||
python3-simplejson
|
||||
python3-six
|
||||
python3-yaml
|
||||
socat
|
||||
spirv-tools
|
||||
sysvinit-core
|
||||
vulkan-tools
|
||||
waffle-utils
|
||||
weston
|
||||
xwayland
|
||||
xinit
|
||||
xserver-xorg-video-amdgpu
|
||||
xserver-xorg-video-ati
|
||||
xauth
|
||||
xvfb
|
||||
zlib1g
|
||||
zstd
|
||||
)
|
||||
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
|
||||
apt-get install --purge -y \
|
||||
sysvinit-core libelogind0
|
||||
|
||||
apt-get install -y --no-remove "${DEPS[@]}"
|
||||
|
||||
apt-get install -y --no-install-recommends "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
# Needed for ci-fairy, this revision is able to upload files to MinIO
|
||||
# and doesn't depend on git
|
||||
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
# Needed for manipulation with traces yaml files.
|
||||
pip3 install --break-system-packages yq
|
||||
|
||||
section_end debian_setup
|
||||
|
||||
############### Download prebuilt kernel
|
||||
|
||||
if [ "$DEBIAN_ARCH" = amd64 ]; then
|
||||
uncollapsed_section_start kernel "Downloading kernel for crosvm"
|
||||
export KERNEL_IMAGE_NAME=bzImage
|
||||
mkdir -p /kernel
|
||||
# shellcheck disable=SC2153 # KERNEL_IMAGE_BASE is set in the root .gitlab-ci.yml file
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "/kernel/${KERNEL_IMAGE_NAME}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${KERNEL_IMAGE_NAME}"
|
||||
section_end kernel
|
||||
fi
|
||||
|
||||
############### Build mold
|
||||
|
||||
. .gitlab-ci/container/build-mold.sh
|
||||
|
||||
############### Build LLVM-SPIRV translator
|
||||
|
||||
. .gitlab-ci/container/build-llvm-spirv.sh
|
||||
|
||||
############### Build libclc
|
||||
|
||||
. .gitlab-ci/container/build-libclc.sh
|
||||
|
||||
############### Build Wayland
|
||||
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
||||
############### Install Rust toolchain
|
||||
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
|
||||
############### Build Crosvm
|
||||
|
||||
# crosvm build fails on ARMv7 due to Xlib type-size issues
|
||||
if [ "$DEBIAN_ARCH" != "armhf" ]; then
|
||||
. .gitlab-ci/container/build-crosvm.sh
|
||||
fi
|
||||
|
||||
############### Build dEQP runner
|
||||
|
||||
. .gitlab-ci/container/build-deqp-runner.sh
|
||||
|
||||
############### Build apitrace
|
||||
|
||||
. .gitlab-ci/container/build-apitrace.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
||||
|
||||
# Properly uninstall rustup including cargo and init scripts on shells
|
||||
rustup self uninstall -y
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
||||
section_end debian_cleanup
|
@@ -1,131 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
uncollapsed_section_start debian_setup "Base Debian system setup"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
: "${LLVM_VERSION:?llvm version not set!}"
|
||||
|
||||
apt-get install -y libelogind0 # this interfere with systemd deps, install separately
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
EPHEMERAL=(
|
||||
bzip2
|
||||
ccache
|
||||
"clang-${LLVM_VERSION}"
|
||||
cmake
|
||||
dpkg-dev
|
||||
g++
|
||||
glslang-tools
|
||||
libasound2-dev
|
||||
libcap-dev
|
||||
"libclang-cpp${LLVM_VERSION}-dev"
|
||||
libdrm-dev
|
||||
libgles2-mesa-dev
|
||||
libgtest-dev
|
||||
libpciaccess-dev
|
||||
libpng-dev
|
||||
libudev-dev
|
||||
libvulkan-dev
|
||||
libwaffle-dev
|
||||
libwayland-dev
|
||||
libx11-xcb-dev
|
||||
libxcb-dri2-0-dev
|
||||
libxcb-dri3-dev
|
||||
libxcb-present-dev
|
||||
libxfixes-dev
|
||||
libxkbcommon-dev
|
||||
libxrandr-dev
|
||||
libxrender-dev
|
||||
"llvm-${LLVM_VERSION}-dev"
|
||||
"lld-${LLVM_VERSION}"
|
||||
make
|
||||
meson
|
||||
ocl-icd-opencl-dev
|
||||
patch
|
||||
pkgconf
|
||||
python3-distutils
|
||||
xz-utils
|
||||
)
|
||||
|
||||
DEPS=(
|
||||
)
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
|
||||
$EXTRA_LOCAL_PACKAGES
|
||||
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
section_end debian_setup
|
||||
|
||||
############### Build ANGLE
|
||||
|
||||
if [ "$DEBIAN_ARCH" == "arm64" ]; then
|
||||
ANGLE_TARGET=linux \
|
||||
. .gitlab-ci/container/build-angle.sh
|
||||
fi
|
||||
|
||||
############### Build piglit
|
||||
|
||||
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
|
||||
-DPIGLIT_USE_GBM=ON
|
||||
-DPIGLIT_USE_WAYLAND=ON
|
||||
-DPIGLIT_USE_X11=ON
|
||||
-DPIGLIT_BUILD_GLX_TESTS=ON
|
||||
-DPIGLIT_BUILD_EGL_TESTS=ON
|
||||
-DPIGLIT_BUILD_WGL_TESTS=OFF
|
||||
-DPIGLIT_BUILD_GL_TESTS=ON
|
||||
-DPIGLIT_BUILD_GLES1_TESTS=ON
|
||||
-DPIGLIT_BUILD_GLES2_TESTS=ON
|
||||
-DPIGLIT_BUILD_GLES3_TESTS=ON
|
||||
-DPIGLIT_BUILD_CL_TESTS=ON
|
||||
-DPIGLIT_BUILD_VK_TESTS=ON
|
||||
-DPIGLIT_BUILD_DMA_BUF_TESTS=ON" \
|
||||
. .gitlab-ci/container/build-piglit.sh
|
||||
|
||||
############### Build dEQP GL
|
||||
|
||||
DEQP_API=tools \
|
||||
DEQP_TARGET=surfaceless \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
DEQP_API=GL \
|
||||
DEQP_TARGET=surfaceless \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
DEQP_API=GLES \
|
||||
DEQP_TARGET=surfaceless \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
rm -rf /VK-GL-CTS
|
||||
|
||||
############### Build validation layer for zink
|
||||
|
||||
. .gitlab-ci/container/build-vulkan-validation.sh
|
||||
|
||||
############### Build nine tests
|
||||
|
||||
. .gitlab-ci/container/build-ninetests.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
||||
section_end debian_cleanup
|
||||
|
||||
############### Remove unused packages
|
||||
|
||||
. .gitlab-ci/container/strip-rootfs.sh
|
@@ -1,154 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# The relative paths in this file only become valid at runtime.
|
||||
# shellcheck disable=SC1091
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
uncollapsed_section_start debian_setup "Base Debian system setup"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
EPHEMERAL=(
|
||||
ccache
|
||||
cmake
|
||||
dpkg-dev
|
||||
g++
|
||||
glslang-tools
|
||||
libexpat1-dev
|
||||
gnupg2
|
||||
libdrm-dev
|
||||
libgbm-dev
|
||||
libgles2-mesa-dev
|
||||
liblz4-dev
|
||||
libpciaccess-dev
|
||||
libudev-dev
|
||||
libvulkan-dev
|
||||
libwaffle-dev
|
||||
libx11-xcb-dev
|
||||
libxcb-dri2-0-dev
|
||||
libxcb-ewmh-dev
|
||||
libxcb-keysyms1-dev
|
||||
libxkbcommon-dev
|
||||
libxrandr-dev
|
||||
libxrender-dev
|
||||
libzstd-dev
|
||||
meson
|
||||
p7zip
|
||||
patch
|
||||
pkgconf
|
||||
python3-dev
|
||||
python3-distutils
|
||||
python3-pip
|
||||
python3-setuptools
|
||||
python3-wheel
|
||||
xz-utils
|
||||
)
|
||||
|
||||
DEPS=(
|
||||
libfontconfig1
|
||||
libglu1-mesa
|
||||
)
|
||||
|
||||
if [ "$DEBIAN_ARCH" != "armhf" ]; then
|
||||
# Wine isn't available on 32-bit ARM
|
||||
EPHEMERAL+=(
|
||||
wine64-tools
|
||||
)
|
||||
DEPS+=(
|
||||
wine
|
||||
wine64
|
||||
)
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove --no-install-recommends \
|
||||
"${DEPS[@]}" "${EPHEMERAL[@]}" "${EXTRA_LOCAL_PACKAGES:-}"
|
||||
|
||||
############### Building ...
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
section_end debian_setup
|
||||
|
||||
############### Build piglit replayer
|
||||
|
||||
if [ "$DEBIAN_ARCH" != "armhf" ]; then
|
||||
# We don't run any _piglit_ Vulkan tests in the containers.
|
||||
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
|
||||
-DPIGLIT_USE_GBM=OFF
|
||||
-DPIGLIT_USE_WAYLAND=OFF
|
||||
-DPIGLIT_USE_X11=OFF
|
||||
-DPIGLIT_BUILD_GLX_TESTS=OFF
|
||||
-DPIGLIT_BUILD_EGL_TESTS=OFF
|
||||
-DPIGLIT_BUILD_WGL_TESTS=OFF
|
||||
-DPIGLIT_BUILD_GL_TESTS=OFF
|
||||
-DPIGLIT_BUILD_GLES1_TESTS=OFF
|
||||
-DPIGLIT_BUILD_GLES2_TESTS=OFF
|
||||
-DPIGLIT_BUILD_GLES3_TESTS=OFF
|
||||
-DPIGLIT_BUILD_CL_TESTS=OFF
|
||||
-DPIGLIT_BUILD_VK_TESTS=OFF
|
||||
-DPIGLIT_BUILD_DMA_BUF_TESTS=OFF" \
|
||||
PIGLIT_BUILD_TARGETS="piglit_replayer" \
|
||||
. .gitlab-ci/container/build-piglit.sh
|
||||
fi
|
||||
|
||||
############### Build dEQP VK
|
||||
|
||||
DEQP_API=tools \
|
||||
DEQP_TARGET=default \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
if [ "$DEBIAN_ARCH" == "amd64" ]; then
|
||||
DEQP_API=VK-main \
|
||||
DEQP_TARGET=default \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
fi
|
||||
|
||||
DEQP_API=VK \
|
||||
DEQP_TARGET=default \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
rm -rf /VK-GL-CTS
|
||||
|
||||
############### Build Fossilize
|
||||
|
||||
if [ "$DEBIAN_ARCH" != "armhf" ]; then
|
||||
. .gitlab-ci/container/build-fossilize.sh
|
||||
fi
|
||||
|
||||
############### Build gfxreconstruct
|
||||
|
||||
# gfxreconstruct thinks that ARMv7-on-AArch64 is cross-compilation
|
||||
if [ "$DEBIAN_ARCH" != "armhf" ]; then
|
||||
. .gitlab-ci/container/build-gfxreconstruct.sh
|
||||
fi
|
||||
|
||||
############### Build VKD3D-Proton
|
||||
|
||||
# Wine isn't available on 32-bit ARM
|
||||
if [ "$DEBIAN_ARCH" != "armhf" ]; then
|
||||
uncollapsed_section_switch proton "Installing Proton (Wine/D3DVK emulation)"
|
||||
. .gitlab-ci/container/setup-wine.sh "/vkd3d-proton-wine64"
|
||||
. .gitlab-ci/container/build-vkd3d-proton.sh
|
||||
fi
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
||||
section_end debian_cleanup
|
||||
|
||||
############### Remove unused packages
|
||||
|
||||
. .gitlab-ci/container/strip-rootfs.sh
|
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
arch=i386
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user