Compare commits
250 Commits
mesa-25.0.
...
mesa-23.1.
Author | SHA1 | Date | |
---|---|---|---|
|
be4f7fb656 | ||
|
aa234e276e | ||
|
34936765d4 | ||
|
752c2f6643 | ||
|
baba0ca1f6 | ||
|
0c447913c0 | ||
|
c7f257a09c | ||
|
8d8c01f671 | ||
|
eaf658e3f4 | ||
|
fb1c2a3dcd | ||
|
3e9b9fdc77 | ||
|
4e4604521e | ||
|
266e8c80b4 | ||
|
05e349fdc8 | ||
|
bd01721da2 | ||
|
ad8e43e36c | ||
|
e70c232a01 | ||
|
68e639c56c | ||
|
bc403d5f4f | ||
|
4563390f4e | ||
|
43f7453327 | ||
|
1f5edc9bdd | ||
|
f4b0904fde | ||
|
1ec1c1ad17 | ||
|
2fd8179668 | ||
|
4d9874ce8b | ||
|
892a2ddd34 | ||
|
057c71bc42 | ||
|
f3fb0dd9a5 | ||
|
4c4780997e | ||
|
84380a2d37 | ||
|
8ae31e30d9 | ||
|
2511e5857c | ||
|
4f1de84cbd | ||
|
430124f005 | ||
|
f07e8d0a36 | ||
|
9a1bc5e34a | ||
|
6e3d86c809 | ||
|
bbe4e42945 | ||
|
0de2d41055 | ||
|
566a97ce4a | ||
|
46fa88e80a | ||
|
1d92d341a7 | ||
|
5b220799d5 | ||
|
94fddc4324 | ||
|
30ed088664 | ||
|
8b8fd81906 | ||
|
f4fc26abdf | ||
|
fa4bf92733 | ||
|
bd9518ceb5 | ||
|
79377dae8c | ||
|
d8b3feeb8a | ||
|
95354d8285 | ||
|
67ccf01ff5 | ||
|
5b037aaac4 | ||
|
fca009ad9a | ||
|
1aaef5b067 | ||
|
b21db0bb8d | ||
|
0c6903846f | ||
|
6d9fdc7faa | ||
|
e7c6e9e359 | ||
|
67e01cb74a | ||
|
3274e60161 | ||
|
571992af74 | ||
|
b189a72fe4 | ||
|
1122231f95 | ||
|
3410e08f53 | ||
|
1bdaca4da9 | ||
|
fc4592aef5 | ||
|
e363ab4607 | ||
|
cc3914c472 | ||
|
79f41a1f3f | ||
|
0e6d046f2d | ||
|
fd6968991a | ||
|
84889a982c | ||
|
61b937290e | ||
|
88f1aac5b2 | ||
|
788cfe061b | ||
|
4514207d25 | ||
|
e561939b05 | ||
|
a72e0e57eb | ||
|
53efaeca18 | ||
|
d4b5487508 | ||
|
4e2e63ee00 | ||
|
6ad6513226 | ||
|
e2ccae5fae | ||
|
b4f9c82d5d | ||
|
2be3b5f78d | ||
|
8bddabbf53 | ||
|
45540ed389 | ||
|
69b024168d | ||
|
cd65f4b40a | ||
|
ec208bcb48 | ||
|
0d37bf2a31 | ||
|
865ff2c5ba | ||
|
0d879e5bbd | ||
|
91859a9a54 | ||
|
192de0108c | ||
|
8dbb8a42da | ||
|
731681db4b | ||
|
46d57d5de9 | ||
|
2d24f535ae | ||
|
664eada4e9 | ||
|
ff08a6b402 | ||
|
4b36d85fad | ||
|
9ecc019d4d | ||
|
f24980f741 | ||
|
78f568bdc6 | ||
|
ddd39dbf89 | ||
|
3a9a3356d3 | ||
|
b1c12c5eef | ||
|
9ebda0a63c | ||
|
2236dd6d55 | ||
|
bed64b7062 | ||
|
1314f03123 | ||
|
4811f46d83 | ||
|
d04b95b27e | ||
|
e206603259 | ||
|
ca6ceb4396 | ||
|
7ddbf31e62 | ||
|
72d641acf7 | ||
|
4cc6a3f481 | ||
|
a2a577ea17 | ||
|
75b3939cf7 | ||
|
93f4b5667c | ||
|
40cdd22a1f | ||
|
b44e6d297f | ||
|
ef41157341 | ||
|
ec55e467f5 | ||
|
b7fb9937a2 | ||
|
025b6a79c6 | ||
|
aa48b8dc8d | ||
|
49d09360b5 | ||
|
a1016ce65c | ||
|
34a8362025 | ||
|
372e70b03b | ||
|
55dc3b5009 | ||
|
e6d8483846 | ||
|
67f32f8ac8 | ||
|
68a35bad86 | ||
|
1f92626c0b | ||
|
a59f776b74 | ||
|
834a080732 | ||
|
1a81041677 | ||
|
29aa8c52b3 | ||
|
e56bc0410a | ||
|
a6383b1099 | ||
|
6a43c3f8ca | ||
|
1ec333e6b6 | ||
|
b918a421d8 | ||
|
51a0b242c0 | ||
|
dba29a33a1 | ||
|
0bd99d6943 | ||
|
089e14d4e9 | ||
|
be2ee5a9db | ||
|
e9e9347e04 | ||
|
b339c26987 | ||
|
cc73ff80af | ||
|
f655af3782 | ||
|
d912fa4e4f | ||
|
d6761f54b5 | ||
|
3b465a15bb | ||
|
3546d51b0b | ||
|
4b6649c163 | ||
|
df6085eb9c | ||
|
c7e678b302 | ||
|
ba5c0f0ffd | ||
|
0b47ece7ae | ||
|
49eb067746 | ||
|
cec5bf6040 | ||
|
b8a7fba41f | ||
|
38da1ae68a | ||
|
3556a3e600 | ||
|
b9e8c2443b | ||
|
5db4186d97 | ||
|
72d01ab287 | ||
|
555679c071 | ||
|
e694097441 | ||
|
3697d19ecf | ||
|
316c217cd9 | ||
|
6ae14d1808 | ||
|
b920bab497 | ||
|
5d5d1a17fc | ||
|
7dc2f320f3 | ||
|
8184c0335a | ||
|
31170a8586 | ||
|
6f9c1af4a0 | ||
|
32c5980e63 | ||
|
cf9829388a | ||
|
c09f63087b | ||
|
1ae2c1ae9c | ||
|
c3f69d784e | ||
|
7830c29f6e | ||
|
c39e3319ca | ||
|
839320beaa | ||
|
aac9dd69da | ||
|
9c24784b7c | ||
|
475cc6a516 | ||
|
aa348a35ec | ||
|
d6d94ccb59 | ||
|
fc2d749a10 | ||
|
bf988cdafa | ||
|
9d8fdeb296 | ||
|
c90c223c98 | ||
|
f2911b79e5 | ||
|
0a0822e601 | ||
|
3eeb4bedfa | ||
|
0ffe4381b1 | ||
|
27404a8617 | ||
|
846080db5d | ||
|
e6eb4df338 | ||
|
db5c94d170 | ||
|
808a95d24a | ||
|
612e6e6038 | ||
|
599749570c | ||
|
e5df9a1d74 | ||
|
eb3df9b189 | ||
|
de36799f15 | ||
|
8687ef15a3 | ||
|
61cfafda57 | ||
|
0cd5d68618 | ||
|
ad7cbe2590 | ||
|
3c2be41e1c | ||
|
27dd6245d3 | ||
|
907621dc09 | ||
|
596b623059 | ||
|
d7acb8f043 | ||
|
1ec9bcd844 | ||
|
f4f4e8186f | ||
|
cdedebf839 | ||
|
3daf2038d1 | ||
|
279c4822c5 | ||
|
2fe4eaa3d0 | ||
|
06d86757d5 | ||
|
4ce4823f4e | ||
|
72969b2c87 | ||
|
d43aff3a21 | ||
|
7809a85f14 | ||
|
bf6c8ee864 | ||
|
1becf6be48 | ||
|
4ed3b1ae6b | ||
|
14df131f8f | ||
|
204995f16f | ||
|
f3969bf7df | ||
|
61d1cdba6e | ||
|
3b6c72fa75 | ||
|
46ff518ebf | ||
|
acce8ed144 | ||
|
f53f445b97 | ||
|
117b967321 |
@@ -1,2 +0,0 @@
|
||||
# Vendored code
|
||||
src/amd/vulkan/radix_sort/*
|
@@ -1,10 +0,0 @@
|
||||
# The following files are opted into `ninja clang-format` and
|
||||
# enforcement in the CI.
|
||||
|
||||
src/gallium/drivers/i915
|
||||
src/gallium/drivers/r300/compiler/*
|
||||
src/gallium/targets/teflon/**/*
|
||||
src/amd/vulkan/**/*
|
||||
src/amd/compiler/**/*
|
||||
src/egl/**/*
|
||||
src/etnaviv/isa/**/*
|
@@ -1,70 +0,0 @@
|
||||
# List of commits to ignore when using `git blame`.
|
||||
# Enable with:
|
||||
# git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
#
|
||||
# Per git-blame(1):
|
||||
# Ignore revisions listed in the file, one unabbreviated object name
|
||||
# per line, in git-blame. Whitespace and comments beginning with # are
|
||||
# ignored.
|
||||
#
|
||||
# Please keep these in chronological order :)
|
||||
#
|
||||
# You can add a new commit with the following command:
|
||||
# git log -1 --pretty=format:'%n# %s%n%H%n' >> .git-blame-ignore-revs $COMMIT
|
||||
|
||||
# pvr: Fix clang-format error.
|
||||
0ad5b0a74ef73f5fcbe1406ad9d57fe5dc00a5b1
|
||||
|
||||
# panfrost: Fix up some formatting for clang-format
|
||||
a4705afe63412498d13ded73cba969c66be67907
|
||||
|
||||
# asahi: clang-format the world again
|
||||
26c51bb8d8a33098b1990425a391f56ffba5728c
|
||||
|
||||
# perfetto: Add a .clang-format for the directory.
|
||||
da78d5d729b1800136dd713b68492cb339993f4a
|
||||
|
||||
# panfrost/winsys: Clang-format
|
||||
c90f036516a5376002be6550a917e8bad6a8a3b8
|
||||
|
||||
# panfrost: Re-run clang-format
|
||||
4ccf174009af6732cbffa5d8ebb4687da7517505
|
||||
|
||||
# panvk: Clang-format
|
||||
c7bf3b69ebc8f2252dbf724a4de638e6bb2ac402
|
||||
|
||||
# pan/mdg: Fix icky formatting
|
||||
133af0d6c945d3aaca8989edd15283a2b7dcc6c7
|
||||
|
||||
# mapi: clang-format _glapi_add_dispatch()
|
||||
30332529663268a6406e910848e906e725e6fda7
|
||||
|
||||
# radv: reformat according to its .clang-format
|
||||
8b319c6db8bd93603b18bd783eb75225fcfd51b7
|
||||
|
||||
# aco: reformat according to its .clang-format
|
||||
6b21653ab4d3a67e711fe10e3d403128b6d26eb2
|
||||
|
||||
# egl: re-format using clang-format
|
||||
2f670d89db038d5a29f6b72732fd7ad63dfaf4c6
|
||||
|
||||
# panfrost: clang-format the tree
|
||||
0afd691f29683f6e9dde60f79eca094373521806
|
||||
|
||||
# aco: Format.
|
||||
1e2639026fec7069806449f9ba2a124ce4eb5569
|
||||
|
||||
# radv: Format.
|
||||
59c501ca353f8ec9d2717c98af2bfa1a1dbf4d75
|
||||
|
||||
# pvr: clang-format fixes
|
||||
953c04ebd39c52d457301bdd8ac803949001da2d
|
||||
|
||||
# freedreno: Re-indent
|
||||
2d439343ea1aee146d4ce32800992cd389bd505d
|
||||
|
||||
# ir3: Reformat source with clang-format
|
||||
177138d8cb0b4f6a42ef0a1f8593e14d79f17c54
|
||||
|
||||
# ir3: reformat after refactoring in previous commit
|
||||
8ae5b27ee0331a739d14b42e67586784d6840388
|
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/
|
||||
|
405
.gitlab-ci.yml
405
.gitlab-ci.yml
@@ -1,180 +1,66 @@
|
||||
# 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
|
||||
VALVE_INFRA_VANGOGH_JOB_PRIORITY: "" # 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
|
||||
# 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:
|
||||
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
|
||||
LAVA_JOB_PRIORITY: 40
|
||||
- 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
|
||||
|
||||
LAVA_JOB_PRIORITY: 50
|
||||
- when: always
|
||||
|
||||
variables:
|
||||
FDO_UPSTREAM_REPO: mesa/mesa
|
||||
MESA_TEMPLATES_COMMIT: &ci-templates-commit e195d80f35b45cc73668be3767b923fd76c70ed5
|
||||
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
|
||||
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
|
||||
CI_JOB_JWT_FILE: /minio_jwt
|
||||
MINIO_HOST: s3.freedesktop.org
|
||||
# per-pipeline artifact storage on MinIO
|
||||
PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/${S3_ARTIFACTS_BUCKET}/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
|
||||
PIPELINE_ARTIFACTS_BASE: ${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
|
||||
# per-job artifact storage on MinIO
|
||||
JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
|
||||
# reference images stored for traces
|
||||
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${S3_HOST}/${S3_TRACIE_RESULTS_BUCKET}/$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
|
||||
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
|
||||
JOB_PRIORITY: 50
|
||||
DATA_STORAGE_PATH: data_storage
|
||||
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${MINIO_HOST}/mesa-tracie-results/$FDO_UPSTREAM_REPO"
|
||||
# Individual CI farm status, set to "offline" to disable jobs
|
||||
# running on a particular CI farm (ie. for outages, etc):
|
||||
FD_FARM: "online"
|
||||
COLLABORA_FARM: "online"
|
||||
MICROSOFT_FARM: "online"
|
||||
LIMA_FARM: "online"
|
||||
IGALIA_FARM: "online"
|
||||
ANHOLT_FARM: "online"
|
||||
VALVE_FARM: "online"
|
||||
AUSTRIANCODER_FARM: "online" # only etnaviv GPUs
|
||||
|
||||
default:
|
||||
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"
|
||||
chmod +x ${SCRIPTS_DIR}/setup-test-env.sh &&
|
||||
. ${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:
|
||||
max: 1
|
||||
# Ignore runner_unsupported, stale_schedule, archived_failure, or
|
||||
# unmet_prerequisites
|
||||
when:
|
||||
- api_failure
|
||||
- runner_system_failure
|
||||
- script_failure
|
||||
- job_execution_timeout
|
||||
- scheduler_failure
|
||||
- data_integrity_failure
|
||||
- unknown_failure
|
||||
|
||||
stages:
|
||||
- sanity
|
||||
- container
|
||||
- git-archive
|
||||
- build-for-tests
|
||||
- build-only
|
||||
- code-validation
|
||||
- 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:
|
||||
- project: 'freedesktop/ci-templates'
|
||||
@@ -192,84 +78,91 @@ include:
|
||||
- local: '.gitlab-ci/container/gitlab-ci.yml'
|
||||
- local: '.gitlab-ci/build/gitlab-ci.yml'
|
||||
- local: '.gitlab-ci/test/gitlab-ci.yml'
|
||||
- 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'
|
||||
|
||||
stages:
|
||||
- sanity
|
||||
- container
|
||||
- git-archive
|
||||
- build-x86_64
|
||||
- build-misc
|
||||
- lint
|
||||
- amd
|
||||
- intel
|
||||
- nouveau
|
||||
- arm
|
||||
- broadcom
|
||||
- freedreno
|
||||
- etnaviv
|
||||
- software-renderer
|
||||
- layered-backends
|
||||
- deploy
|
||||
|
||||
|
||||
# Rules applied to every job in the pipeline
|
||||
.common-rules:
|
||||
# YAML anchors for rule conditions
|
||||
# --------------------------------
|
||||
.rules-anchors:
|
||||
rules:
|
||||
- if: *is-fork-push
|
||||
when: manual
|
||||
# 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
|
||||
|
||||
.never-post-merge-rules:
|
||||
|
||||
# When to automatically run the CI for build jobs
|
||||
.build-rules:
|
||||
rules:
|
||||
- if: *is-post-merge
|
||||
when: never
|
||||
|
||||
|
||||
.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
|
||||
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/**/*
|
||||
# If any files affecting the pipeline are changed, build/test jobs run
|
||||
# automatically once all dependency jobs have passed
|
||||
- changes: &all_paths
|
||||
- VERSION
|
||||
- bin/git_sha1_gen.py
|
||||
- bin/install_megadrivers.py
|
||||
- bin/symbols-check.py
|
||||
# GitLab CI
|
||||
- .gitlab-ci.yml
|
||||
- .gitlab-ci/**/*
|
||||
# Meson
|
||||
- meson*
|
||||
- build-support/**/*
|
||||
- subprojects/**/*
|
||||
# Source code
|
||||
- include/**/*
|
||||
- src/**/*
|
||||
when: on_success
|
||||
# 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
|
||||
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
|
||||
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
|
||||
# Otherwise, build/test jobs won't run because no rule matched.
|
||||
|
||||
|
||||
.ci-deqp-artifacts:
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
|
||||
name: "mesa_${CI_JOB_NAME}"
|
||||
when: always
|
||||
untracked: false
|
||||
paths:
|
||||
@@ -278,7 +171,34 @@ include:
|
||||
- artifacts
|
||||
- _build/meson-logs/*.txt
|
||||
- _build/meson-logs/strace
|
||||
- _build/.ninja_log
|
||||
|
||||
.container-rules:
|
||||
rules:
|
||||
# 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:
|
||||
- .gitlab-ci.yml
|
||||
- .gitlab-ci/**/*
|
||||
when: on_success
|
||||
# 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: on_success
|
||||
# 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
|
||||
# Allow triggering jobs manually in other cases if any files affecting the
|
||||
# pipeline were changed
|
||||
- changes:
|
||||
*all_paths
|
||||
when: manual
|
||||
# Otherwise, container jobs won't run because no rule matched.
|
||||
|
||||
# Git archive
|
||||
|
||||
@@ -294,12 +214,11 @@ make git archive:
|
||||
script:
|
||||
# Compactify the .git directory
|
||||
- git gc --aggressive
|
||||
# Download & cache the perfetto subproject as well.
|
||||
- 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 .
|
||||
|
||||
- ci-fairy s3cp --token-file "${S3_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
|
||||
- ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$MINIO_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
|
||||
|
||||
|
||||
# Sanity checks of MR settings and commit logs
|
||||
sanity:
|
||||
@@ -309,67 +228,13 @@ sanity:
|
||||
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
|
||||
tags:
|
||||
- placeholder-job
|
||||
|
||||
|
||||
mr-label-maker-test:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: sanity
|
||||
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: rustfmt
|
||||
optional: true
|
||||
- job: yaml-toml-shell-py-test
|
||||
optional: true
|
||||
|
@@ -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,
|
@@ -2,16 +2,6 @@
|
||||
# non-zero-length and not starting with '#', will regex match to
|
||||
# delete lines from the test list. Be careful.
|
||||
|
||||
# This test checks the driver's reported conformance version against the
|
||||
# version of the CTS we're running. This check fails every few months
|
||||
# and everyone has to go and bump the number in every driver.
|
||||
# Running this check only makes sense while preparing a conformance
|
||||
# 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,49 +29,6 @@ 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
|
||||
# Reads the front buffer but it doesn't have to.
|
||||
# https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/755
|
||||
glx-swap-copy
|
||||
|
@@ -1,7 +0,0 @@
|
||||
# Unlike zink which does support it, ANGLE relies on a waiver to not implement
|
||||
# capturing individual array elements (see waivers.xml and gles3-waivers.txt in the CTS)
|
||||
dEQP-GLES3.functional.transform_feedback.array_element.*
|
||||
dEQP-GLES3.functional.transform_feedback.random.*
|
||||
dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.*_array_element
|
||||
dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.*.array.*
|
||||
KHR-GLES31.core.program_interface_query.transform-feedback-types
|
@@ -2,118 +2,65 @@ 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: {{ timeout_first_console_activity_minutes | default(0, true) }}
|
||||
seconds: {{ timeout_first_console_activity_seconds | default(0, true) }}
|
||||
retries: {{ 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: {{ timeout_console_activity_minutes | default(0, true) }}
|
||||
seconds: {{ timeout_console_activity_seconds | default(0, true) }}
|
||||
retries: {{ timeout_console_activity_retries }}
|
||||
|
||||
minutes: {{ timeout_minutes }}
|
||||
retries: {{ timeout_retries }}
|
||||
boot_cycle:
|
||||
minutes: {{ timeout_boot_minutes | default(0, true) }}
|
||||
seconds: {{ timeout_boot_seconds | default(0, true) }}
|
||||
minutes: {{ timeout_boot_minutes }}
|
||||
retries: {{ timeout_boot_retries }}
|
||||
|
||||
overall: # Maximum time the job can take, not overrideable by the "continue" deployment
|
||||
minutes: {{ timeout_overall_minutes | default(0, true) }}
|
||||
seconds: {{ timeout_overall_seconds | default(0, true) }}
|
||||
minutes: {{ timeout_overall_minutes }}
|
||||
retries: 0
|
||||
# no retries possible here
|
||||
|
||||
watchdogs:
|
||||
boot:
|
||||
minutes: {{ timeout_boot_wd_minutes | default(0, true) }}
|
||||
seconds: {{ timeout_boot_wd_seconds | default(0, true) }}
|
||||
retries: {{ timeout_boot_wd_retries | default(0, true) }}
|
||||
|
||||
console_patterns:
|
||||
session_end:
|
||||
regex: >-
|
||||
{{ session_end_regex }}
|
||||
{% if session_reboot_regex %}
|
||||
session_reboot:
|
||||
regex: >-
|
||||
{{ session_reboot_regex }}
|
||||
{% endif %}
|
||||
job_success:
|
||||
regex: >-
|
||||
{{ job_success_regex }}
|
||||
{% if job_warn_regex %}
|
||||
job_warn:
|
||||
regex: >-
|
||||
{{ job_warn_regex }}
|
||||
{% endif %}
|
||||
|
||||
{% if boot_wd_start_regex and boot_wd_stop_regex %}
|
||||
watchdogs:
|
||||
boot:
|
||||
start:
|
||||
regex: >-
|
||||
{{ boot_wd_start_regex }}
|
||||
reset:
|
||||
regex: >-
|
||||
{{ boot_wd_reset_regex | default(boot_wd_start_regex, true) }}
|
||||
stop:
|
||||
regex: >-
|
||||
{{ boot_wd_stop_regex }}
|
||||
{% endif %}
|
||||
|
||||
# Environment to deploy
|
||||
deployment:
|
||||
# Initial boot
|
||||
start:
|
||||
storage:
|
||||
http:
|
||||
- path: "/b2c-extra-args"
|
||||
data: >
|
||||
b2c.pipefail 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.run_service="--privileged --tls-verify=false --pid=host docker://{{ '{{' }} fdo_proxy_registry }}/gfx-ci/ci-tron/telegraf:latest" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
|
||||
b2c.run="-ti --tls-verify=false docker://{{ '{{' }} fdo_proxy_registry }}/gfx-ci/ci-tron/machine-registration:latest check"
|
||||
b2c.run="-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 | replace('"', '\\\"') }}"
|
||||
kernel:
|
||||
{% if kernel_url %}
|
||||
url: '{{ 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
|
||||
cmdline: >
|
||||
SALAD.machine_id={{ '{{' }} machine_id }}
|
||||
console={{ '{{' }} local_tty_device }},115200
|
||||
b2c.cache_device=auto b2c.ntp_peer=10.42.0.1
|
||||
b2c.extra_args_url={{ '{{' }} job.http.url }}/b2c-extra-args
|
||||
{% if kernel_cmdline_extras is defined %}
|
||||
{{ 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 }}/mupuf/valve-infra/telegraf-container:latest" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
|
||||
b2c.container="-ti --tls-verify=false docker://{{ '{{' }} fdo_proxy_registry }}/mupuf/valve-infra/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 initramfs_url or firmware_url %}
|
||||
initramfs:
|
||||
{% if firmware_url %}
|
||||
- url: '{{ firmware_url }}'
|
||||
{% endif %}
|
||||
{% if initramfs_url %}
|
||||
- url: '{{ initramfs_url }}'
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
url: '{{ initramfs_url }}'
|
||||
|
||||
{% if dtb_url %}
|
||||
dtb:
|
||||
url: '{{ dtb_url }}'
|
||||
{% if dtb_match %}
|
||||
format:
|
||||
archive:
|
||||
match: "{{ dtb_match }}"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@@ -22,34 +22,86 @@
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
from argparse import ArgumentParser
|
||||
from os import environ, path
|
||||
import json
|
||||
|
||||
|
||||
# Pass all the environment variables prefixed by B2C_
|
||||
values = {
|
||||
key.removeprefix("B2C_").lower(): environ[key]
|
||||
for key in environ if key.startswith("B2C_")
|
||||
}
|
||||
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(values['job_template'])),
|
||||
env = Environment(loader=FileSystemLoader(path.dirname(args.template)),
|
||||
trim_blocks=True, lstrip_blocks=True)
|
||||
|
||||
template = env.get_template(path.basename(values['job_template']))
|
||||
template = env.get_template(path.basename(args.template))
|
||||
|
||||
values['ci_job_id'] = environ['CI_JOB_ID']
|
||||
values['ci_runner_description'] = environ['CI_RUNNER_DESCRIPTION']
|
||||
values['job_volume_exclusions'] = [excl for excl in values['job_volume_exclusions'].split(",") if excl]
|
||||
values['working_dir'] = environ['CI_PROJECT_DIR']
|
||||
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'] = environ['IMAGE_UNDER_TEST']
|
||||
values['local_container'] = values['local_container'].replace(
|
||||
'registry.freedesktop.org',
|
||||
'{{ fdo_proxy_registry }}'
|
||||
)
|
||||
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 'kernel_cmdline_extras' not in values:
|
||||
values['kernel_cmdline_extras'] = ''
|
||||
if 'B2C_KERNEL_CMDLINE_EXTRAS' in environ:
|
||||
values['cmdline_extras'] = environ['B2C_KERNEL_CMDLINE_EXTRAS']
|
||||
|
||||
with open(path.splitext(path.basename(values['job_template']))[0], "w") as f:
|
||||
f.write(template.render(values))
|
||||
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
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
if [ -z "$BM_POE_INTERFACE" ]; then
|
||||
echo "Must supply the PoE Interface to power down"
|
||||
@@ -12,6 +11,7 @@ if [ -z "$BM_POE_ADDRESS" ]; then
|
||||
fi
|
||||
|
||||
SNMP_KEY="1.3.6.1.4.1.9.9.402.1.2.1.1.1.$BM_POE_INTERFACE"
|
||||
SNMP_ON="i 1"
|
||||
SNMP_OFF="i 4"
|
||||
|
||||
snmpset -v2c -r 3 -t 30 -cmesaci "$BM_POE_ADDRESS" "$SNMP_KEY" $SNMP_OFF
|
||||
snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
if [ -z "$BM_POE_INTERFACE" ]; then
|
||||
echo "Must supply the PoE Interface to power up"
|
||||
@@ -17,6 +16,6 @@ SNMP_KEY="1.3.6.1.4.1.9.9.402.1.2.1.1.1.$BM_POE_INTERFACE"
|
||||
SNMP_ON="i 1"
|
||||
SNMP_OFF="i 4"
|
||||
|
||||
snmpset -v2c -r 3 -t 10 -cmesaci "$BM_POE_ADDRESS" "$SNMP_KEY" $SNMP_OFF
|
||||
snmpset -v2c -r 3 -t 10 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF
|
||||
sleep 3s
|
||||
snmpset -v2c -r 3 -t 10 -cmesaci "$BM_POE_ADDRESS" "$SNMP_KEY" $SNMP_ON
|
||||
snmpset -v2c -r 3 -t 10 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_ON
|
||||
|
@@ -1,7 +1,4 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
|
||||
# shellcheck disable=SC2034
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
# Boot script for Chrome OS devices attached to a servo debug connector, using
|
||||
# NFS and TFTP to boot.
|
||||
@@ -9,7 +6,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 +46,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.
|
||||
@@ -88,42 +80,24 @@ mkdir -p /nfs/results
|
||||
|
||||
rm -rf /tftp/*
|
||||
if echo "$BM_KERNEL" | grep -q http; then
|
||||
apt-get install -y curl
|
||||
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
|
||||
cp $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
|
||||
|
@@ -1,77 +1,61 @@
|
||||
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright © 2020 Google LLC
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the next
|
||||
# paragraph) shall be included in all copies or substantial portions of the
|
||||
# Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
import argparse
|
||||
import datetime
|
||||
import math
|
||||
import os
|
||||
import queue
|
||||
import re
|
||||
import sys
|
||||
|
||||
from custom_logger import CustomLogger
|
||||
from serial_buffer import SerialBuffer
|
||||
import sys
|
||||
import threading
|
||||
|
||||
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,9 +63,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
|
||||
# direct-to-netboot firmware on cheza.
|
||||
@@ -91,17 +72,6 @@ class CrosServoRun:
|
||||
bootloader_done = True
|
||||
break
|
||||
|
||||
# The Cheza firmware seems to occasionally get stuck looping in
|
||||
# this error state during TFTP booting, possibly based on amount of
|
||||
# network traffic around it, but it'll usually recover after a
|
||||
# reboot. Currently mostly visible on google-freedreno-cheza-14.
|
||||
if re.search("R8152: Bulk read error 0xffffffbf", line):
|
||||
tftp_failures += 1
|
||||
if tftp_failures >= 10:
|
||||
self.print_error(
|
||||
"Detected intermittent tftp failure, restarting run.")
|
||||
return 1
|
||||
|
||||
# If the board has a netboot firmware and we made it to booting the
|
||||
# kernel, proceed to processing of the test run.
|
||||
if re.search("Booting Linux", line):
|
||||
@@ -113,30 +83,41 @@ class CrosServoRun:
|
||||
# in the farm.
|
||||
if re.search("POWER_GOOD not seen in time", line):
|
||||
self.print_error(
|
||||
"Detected intermittent poweron failure, abandoning run.")
|
||||
return 1
|
||||
"Detected intermittent poweron failure, restarting run...")
|
||||
return 2
|
||||
|
||||
if not bootloader_done:
|
||||
self.print_error("Failed to make it through bootloader, abandoning run.")
|
||||
return 1
|
||||
print("Failed to make it through bootloader, restarting run...")
|
||||
return 2
|
||||
|
||||
self.logger.create_job_phase("test")
|
||||
tftp_failures = 0
|
||||
for line in self.cpu_ser.lines(timeout=self.test_timeout, phase="test"):
|
||||
if re.search("---. end Kernel panic", line):
|
||||
return 1
|
||||
|
||||
# The Cheza firmware seems to occasionally get stuck looping in
|
||||
# this error state during TFTP booting, possibly based on amount of
|
||||
# network traffic around it, but it'll usually recover after a
|
||||
# reboot.
|
||||
if re.search("R8152: Bulk read error 0xffffffbf", line):
|
||||
tftp_failures += 1
|
||||
if tftp_failures >= 100:
|
||||
self.print_error(
|
||||
"Detected intermittent tftp failure, restarting run...")
|
||||
return 2
|
||||
|
||||
# There are very infrequent bus errors during power management transitions
|
||||
# on cheza, which we don't expect to be the case on future boards.
|
||||
if re.search("Kernel panic - not syncing: Asynchronous SError Interrupt", line):
|
||||
self.print_error(
|
||||
"Detected cheza power management bus error, abandoning run.")
|
||||
return 1
|
||||
"Detected cheza power management bus error, restarting run...")
|
||||
return 2
|
||||
|
||||
# If the network device dies, it's probably not graphics's fault, just try again.
|
||||
if re.search("NETDEV WATCHDOG", line):
|
||||
self.print_error(
|
||||
"Detected network device failure, abandoning run.")
|
||||
return 1
|
||||
"Detected network device failure, restarting run...")
|
||||
return 2
|
||||
|
||||
# These HFI response errors started appearing with the introduction
|
||||
# of piglit runs. CosmicPenguin says:
|
||||
@@ -149,34 +130,28 @@ class CrosServoRun:
|
||||
# break many tests after that, just restart the whole run.
|
||||
if re.search("a6xx_hfi_send_msg.*Unexpected message id .* on the response queue", line):
|
||||
self.print_error(
|
||||
"Detected cheza power management bus error, abandoning run.")
|
||||
return 1
|
||||
"Detected cheza power management bus error, restarting run...")
|
||||
return 2
|
||||
|
||||
if re.search("coreboot.*bootblock starting", line):
|
||||
self.print_error(
|
||||
"Detected spontaneous reboot, abandoning run.")
|
||||
return 1
|
||||
"Detected spontaneous reboot, restarting run...")
|
||||
return 2
|
||||
|
||||
if re.search("arm-smmu 5040000.iommu: TLB sync timed out -- SMMU may be deadlocked", line):
|
||||
self.print_error("Detected cheza MMU fail, abandoning run.")
|
||||
return 1
|
||||
self.print_error("Detected cheza MMU fail, restarting run...")
|
||||
return 2
|
||||
|
||||
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")
|
||||
return 1
|
||||
return 2
|
||||
|
||||
|
||||
def main():
|
||||
@@ -189,17 +164,16 @@ 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)
|
||||
retval = servo.run()
|
||||
while True:
|
||||
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()
|
||||
# power down the CPU on the device
|
||||
servo.ec_write("power off\n")
|
||||
servo.close()
|
||||
|
||||
sys.exit(retval)
|
||||
if retval != 2:
|
||||
sys.exit(retval)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@@ -7,4 +7,4 @@ if [ -z "$relay" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$CI_PROJECT_DIR"/install/bare-metal/eth008-power-relay.py "$ETH_HOST" "$ETH_PORT" off "$relay"
|
||||
$CI_PROJECT_DIR/install/bare-metal/eth008-power-relay.py $ETH_HOST $ETH_PORT off $relay
|
||||
|
@@ -7,6 +7,6 @@ if [ -z "$relay" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$CI_PROJECT_DIR"/install/bare-metal/eth008-power-relay.py "$ETH_HOST" "$ETH_PORT" off "$relay"
|
||||
$CI_PROJECT_DIR/install/bare-metal/eth008-power-relay.py $ETH_HOST $ETH_PORT off $relay
|
||||
sleep 5
|
||||
"$CI_PROJECT_DIR"/install/bare-metal/eth008-power-relay.py "$ETH_HOST" "$ETH_PORT" on "$relay"
|
||||
$CI_PROJECT_DIR/install/bare-metal/eth008-power-relay.py $ETH_HOST $ETH_PORT on $relay
|
||||
|
@@ -5,27 +5,26 @@ set -e
|
||||
STRINGS=$(mktemp)
|
||||
ERRORS=$(mktemp)
|
||||
|
||||
trap 'rm $STRINGS; rm $ERRORS;' EXIT
|
||||
trap "rm $STRINGS; rm $ERRORS;" EXIT
|
||||
|
||||
FILE=$1
|
||||
shift 1
|
||||
|
||||
while getopts "f:e:" opt; do
|
||||
case $opt in
|
||||
f) echo "$OPTARG" >> "$STRINGS";;
|
||||
e) echo "$OPTARG" >> "$STRINGS" ; echo "$OPTARG" >> "$ERRORS";;
|
||||
*) exit
|
||||
f) echo "$OPTARG" >> $STRINGS;;
|
||||
e) echo "$OPTARG" >> $STRINGS ; echo "$OPTARG" >> $ERRORS;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND -1))
|
||||
|
||||
echo "Waiting for $FILE to say one of following strings"
|
||||
cat "$STRINGS"
|
||||
cat $STRINGS
|
||||
|
||||
while ! grep -E -wf "$STRINGS" "$FILE"; do
|
||||
while ! egrep -wf $STRINGS $FILE; do
|
||||
sleep 2
|
||||
done
|
||||
|
||||
if grep -E -wf "$ERRORS" "$FILE"; then
|
||||
if egrep -wf $ERRORS $FILE; then
|
||||
exit 1
|
||||
fi
|
||||
|
@@ -1,14 +1,11 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
|
||||
# shellcheck disable=SC2034
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
. "$SCRIPTS_DIR"/setup-test-env.sh
|
||||
|
||||
BM=$CI_PROJECT_DIR/install/bare-metal
|
||||
CI_COMMON=$CI_PROJECT_DIR/install/common
|
||||
|
||||
if [ -z "$BM_SERIAL" ] && [ -z "$BM_SERIAL_SCRIPT" ]; then
|
||||
if [ -z "$BM_SERIAL" -a -z "$BM_SERIAL_SCRIPT" ]; then
|
||||
echo "Must set BM_SERIAL OR BM_SERIAL_SCRIPT in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "BM_SERIAL:"
|
||||
echo " This is the serial device to talk to for waiting for fastboot to be ready and logging from the kernel."
|
||||
@@ -55,8 +52,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.
|
||||
@@ -89,42 +84,36 @@ else
|
||||
fi
|
||||
|
||||
pushd rootfs
|
||||
find -H . | \
|
||||
grep -E -v "external/(openglcts|vulkancts|amber|glslang|spirv-tools)" |
|
||||
grep -E -v "traces-db|apitrace|renderdoc" | \
|
||||
grep -E -v $EXCLUDE_FILTER | \
|
||||
find -H | \
|
||||
egrep -v "external/(openglcts|vulkancts|amber|glslang|spirv-tools)" |
|
||||
egrep -v "traces-db|apitrace|renderdoc" | \
|
||||
egrep -v $EXCLUDE_FILTER | \
|
||||
cpio -H newc -o | \
|
||||
xz --check=crc32 -T4 - > $CI_PROJECT_DIR/rootfs.cpio.gz
|
||||
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
|
||||
apt-get install -y curl
|
||||
|
||||
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
|
||||
cat $BM_KERNEL $BM_DTB > Image.gz-dtb
|
||||
cp $BM_DTB dtb
|
||||
fi
|
||||
|
||||
export PATH=$BM:$PATH
|
||||
@@ -150,12 +139,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"
|
||||
|
@@ -51,8 +51,8 @@ class FastbootRun:
|
||||
try:
|
||||
return subprocess.call(cmd, shell=True, timeout=timeout)
|
||||
except subprocess.TimeoutExpired:
|
||||
self.print_error("timeout, abandoning run.")
|
||||
return 1
|
||||
self.print_error("timeout, restarting run...")
|
||||
return 2
|
||||
|
||||
def run(self):
|
||||
if ret := self.logged_system(self.powerup):
|
||||
@@ -60,20 +60,20 @@ class FastbootRun:
|
||||
|
||||
fastboot_ready = False
|
||||
for line in self.ser.lines(timeout=2 * 60, phase="bootloader"):
|
||||
if re.search("[Ff]astboot: [Pp]rocessing commands", line) or \
|
||||
if re.search("fastboot: processing commands", line) or \
|
||||
re.search("Listening for fastboot command on", line):
|
||||
fastboot_ready = True
|
||||
break
|
||||
|
||||
if re.search("data abort", line):
|
||||
self.print_error(
|
||||
"Detected crash during boot, abandoning run.")
|
||||
return 1
|
||||
"Detected crash during boot, restarting run...")
|
||||
return 2
|
||||
|
||||
if not fastboot_ready:
|
||||
self.print_error(
|
||||
"Failed to get to fastboot prompt, abandoning run.")
|
||||
return 1
|
||||
"Failed to get to fastboot prompt, restarting run...")
|
||||
return 2
|
||||
|
||||
if ret := self.logged_system(self.fastboot):
|
||||
return ret
|
||||
@@ -81,7 +81,7 @@ class FastbootRun:
|
||||
print_more_lines = -1
|
||||
for line in self.ser.lines(timeout=self.test_timeout, phase="test"):
|
||||
if print_more_lines == 0:
|
||||
return 1
|
||||
return 2
|
||||
if print_more_lines > 0:
|
||||
print_more_lines -= 1
|
||||
|
||||
@@ -92,20 +92,20 @@ class FastbootRun:
|
||||
# when if we see a reboot after we got past fastboot.
|
||||
if re.search("PON REASON", line):
|
||||
self.print_error(
|
||||
"Detected spontaneous reboot, abandoning run.")
|
||||
return 1
|
||||
"Detected spontaneous reboot, restarting run...")
|
||||
return 2
|
||||
|
||||
# db820c sometimes wedges around iommu fault recovery
|
||||
if re.search("watchdog: BUG: soft lockup - CPU.* stuck", line):
|
||||
self.print_error(
|
||||
"Detected kernel soft lockup, abandoning run.")
|
||||
return 1
|
||||
"Detected kernel soft lockup, restarting run...")
|
||||
return 2
|
||||
|
||||
# If the network device dies, it's probably not graphics's fault, just try again.
|
||||
if re.search("NETDEV WATCHDOG", line):
|
||||
self.print_error(
|
||||
"Detected network device failure, abandoning run.")
|
||||
return 1
|
||||
"Detected network device failure, restarting run...")
|
||||
return 2
|
||||
|
||||
# A3xx recovery doesn't quite work. Sometimes the GPU will get
|
||||
# wedged and recovery will fail (because power can't be reset?)
|
||||
@@ -115,20 +115,20 @@ class FastbootRun:
|
||||
# of the hang. Once a hang happens, it's pretty chatty.
|
||||
if "[drm:adreno_recover] *ERROR* gpu hw init failed: -22" in line:
|
||||
self.print_error(
|
||||
"Detected GPU hang, abandoning run.")
|
||||
"Detected GPU hang, restarting run...")
|
||||
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.")
|
||||
return 1
|
||||
"Reached the end of the CPU serial log without finding a result, restarting run...")
|
||||
return 2
|
||||
|
||||
|
||||
def main():
|
||||
@@ -147,8 +147,13 @@ def main():
|
||||
|
||||
fastboot = FastbootRun(args, args.test_timeout * 60)
|
||||
|
||||
retval = fastboot.run()
|
||||
fastboot.close()
|
||||
while True:
|
||||
retval = fastboot.run()
|
||||
fastboot.close()
|
||||
if retval != 2:
|
||||
break
|
||||
|
||||
fastboot = FastbootRun(args, args.test_timeout * 60)
|
||||
|
||||
fastboot.logged_system(args.powerdown)
|
||||
|
||||
|
@@ -7,4 +7,4 @@ if [ -z "$relay" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$CI_PROJECT_DIR"/install/bare-metal/google-power-relay.py off "$relay"
|
||||
$CI_PROJECT_DIR/install/bare-metal/google-power-relay.py off $relay
|
||||
|
@@ -7,6 +7,6 @@ if [ -z "$relay" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$CI_PROJECT_DIR"/install/bare-metal/google-power-relay.py off "$relay"
|
||||
$CI_PROJECT_DIR/install/bare-metal/google-power-relay.py off $relay
|
||||
sleep 5
|
||||
"$CI_PROJECT_DIR"/install/bare-metal/google-power-relay.py on "$relay"
|
||||
$CI_PROJECT_DIR/install/bare-metal/google-power-relay.py on $relay
|
||||
|
@@ -10,7 +10,8 @@ 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.`expr 48 + $BM_POE_INTERFACE`"
|
||||
SNMP_ON="i 1"
|
||||
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.`expr 48 + $BM_POE_INTERFACE`"
|
||||
SNMP_ON="i 1"
|
||||
SNMP_OFF="i 2"
|
||||
|
||||
|
@@ -1,8 +1,4 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC1091
|
||||
# shellcheck disable=SC2034
|
||||
# shellcheck disable=SC2059
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
. "$SCRIPTS_DIR"/setup-test-env.sh
|
||||
|
||||
@@ -12,7 +8,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 +56,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 +66,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
|
||||
|
||||
@@ -89,6 +87,7 @@ date +'%F %T'
|
||||
|
||||
# If BM_BOOTFS is an URL, download it
|
||||
if echo $BM_BOOTFS | grep -q http; then
|
||||
apt-get install -y curl
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}$BM_BOOTFS" -o /tmp/bootfs.tar
|
||||
BM_BOOTFS=/tmp/bootfs.tar
|
||||
@@ -97,50 +96,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 +144,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
|
||||
ATTEMPTS=10
|
||||
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 +179,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
|
||||
@@ -67,10 +61,8 @@ class PoERun:
|
||||
"Something wrong; couldn't detect the boot start up sequence")
|
||||
return 2
|
||||
|
||||
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
|
||||
@@ -79,30 +71,24 @@ class PoERun:
|
||||
return 1
|
||||
|
||||
if re.search("nouveau 57000000.gpu: bus: MMIO read of 00000000 FAULT at 137000", line):
|
||||
self.print_error("nouveau jetson boot bug, abandoning run.")
|
||||
return 1
|
||||
self.print_error("nouveau jetson boot bug, retrying.")
|
||||
return 2
|
||||
|
||||
# network fail on tk1
|
||||
if re.search("NETDEV WATCHDOG:.* transmit queue 0 timed out", line):
|
||||
self.print_error("nouveau jetson tk1 network fail, abandoning run.")
|
||||
return 1
|
||||
self.print_error("nouveau jetson tk1 network fail, retrying.")
|
||||
return 2
|
||||
|
||||
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")
|
||||
return 1
|
||||
return 2
|
||||
|
||||
|
||||
def main():
|
||||
@@ -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)
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
#!/bin/bash
|
||||
|
||||
rootfs_dst=$1
|
||||
|
||||
@@ -13,17 +12,21 @@ 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 "$SCRIPTS_DIR/setup-test-env.sh" "$rootfs_dst/"
|
||||
|
||||
set +x
|
||||
|
||||
# Pass through relevant env vars from the gitlab job to the baremetal init script
|
||||
"$CI_COMMON"/generate-env.sh > $rootfs_dst/set-job-env-vars.sh
|
||||
chmod +x $rootfs_dst/set-job-env-vars.sh
|
||||
echo "Variables passed through:"
|
||||
"$CI_COMMON"/generate-env.sh | tee $rootfs_dst/set-job-env-vars.sh
|
||||
cat $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()
|
||||
|
3
.gitlab-ci/build/compiler-wrapper-clang++.sh
Executable file
3
.gitlab-ci/build/compiler-wrapper-clang++.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
_COMPILER=clang++
|
||||
. compiler-wrapper.sh
|
3
.gitlab-ci/build/compiler-wrapper-clang.sh
Executable file
3
.gitlab-ci/build/compiler-wrapper-clang.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
_COMPILER=clang
|
||||
. compiler-wrapper.sh
|
3
.gitlab-ci/build/compiler-wrapper-g++.sh
Executable file
3
.gitlab-ci/build/compiler-wrapper-g++.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
_COMPILER=g++
|
||||
. compiler-wrapper.sh
|
3
.gitlab-ci/build/compiler-wrapper-gcc.sh
Executable file
3
.gitlab-ci/build/compiler-wrapper-gcc.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
_COMPILER=gcc
|
||||
. compiler-wrapper.sh
|
21
.gitlab-ci/build/compiler-wrapper.sh
Executable file
21
.gitlab-ci/build/compiler-wrapper.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
if command -V ccache >/dev/null 2>/dev/null; then
|
||||
CCACHE=ccache
|
||||
else
|
||||
CCACHE=
|
||||
fi
|
||||
|
||||
if [ "$(ps -p $(ps -p $PPID -o ppid --no-headers) -o comm --no-headers)" != ninja ]; then
|
||||
# Not invoked by ninja (e.g. for a 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
@@ -1,35 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2035
|
||||
# shellcheck disable=SC2061
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
#!/bin/sh
|
||||
|
||||
while true; do
|
||||
devcds=$(find /sys/devices/virtual/devcoredump/ -name data 2>/dev/null)
|
||||
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
|
||||
fi
|
||||
done
|
||||
i915_error_states=$(find /sys/devices/ -path */drm/card*/error)
|
||||
for i in $i915_error_states; do
|
||||
tmpfile=$(mktemp)
|
||||
cp "$i" "$tmpfile"
|
||||
filesize=$(stat --printf="%s" "$tmpfile")
|
||||
# Does the file contain "No error state collected" ?
|
||||
if [ "$filesize" = 25 ]; then
|
||||
rm "$tmpfile"
|
||||
else
|
||||
echo "Found an i915 error state at $i size=$filesize."
|
||||
if cp "$tmpfile" $RESULTS_DIR/first.i915_error_state; then
|
||||
rm "$tmpfile"
|
||||
echo 1 > "$i"
|
||||
echo "Saved to the job artifacts at /first.i915_error_state"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
done
|
||||
sleep 10
|
||||
done
|
||||
|
@@ -1,138 +1,125 @@
|
||||
#!/bin/bash
|
||||
|
||||
VARS=(
|
||||
ACO_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
|
||||
S3_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_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
|
||||
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
|
||||
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
|
||||
S3_HOST
|
||||
S3_RESULTS_UPLOAD
|
||||
NIR_DEBUG
|
||||
PAN_I_WANT_A_BROKEN_VULKAN_DRIVER
|
||||
PAN_MESA_DEBUG
|
||||
PANVK_DEBUG
|
||||
PIGLIT_FRACTION
|
||||
PIGLIT_NO_WINDOW
|
||||
PIGLIT_OPTIONS
|
||||
PIGLIT_PLATFORM
|
||||
PIGLIT_PROFILES
|
||||
PIGLIT_REPLAY_ANGLE_TAG
|
||||
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_PERFTEST
|
||||
SKQP_ASSETS_DIR
|
||||
SKQP_BACKENDS
|
||||
STORAGE_FORK_HOST_PATH
|
||||
STORAGE_MAINLINE_HOST_PATH
|
||||
TU_DEBUG
|
||||
USE_ANGLE
|
||||
VIRGL_HOST_API
|
||||
VIRGL_RENDER_SERVER
|
||||
WAFFLE_PLATFORM
|
||||
VK_DRIVER
|
||||
ZINK_DESCRIPTORS
|
||||
ZINK_DEBUG
|
||||
LVP_POISON_MEMORY
|
||||
|
||||
# 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
|
||||
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_URL \
|
||||
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 \
|
||||
MESA_SPIRV_LOG_LEVEL \
|
||||
MINIO_HOST \
|
||||
MINIO_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 \
|
||||
VIRGL_HOST_API \
|
||||
WAFFLE_PLATFORM \
|
||||
VK_CPU \
|
||||
VK_DRIVER \
|
||||
VK_ICD_FILENAMES \
|
||||
VKD3D_PROTON_RESULTS \
|
||||
ZINK_DESCRIPTORS \
|
||||
LVP_POISON_MEMORY \
|
||||
; do
|
||||
if [ -n "${!var+x}" ]; then
|
||||
echo "export $var=${!var@Q}"
|
||||
fi
|
||||
|
@@ -7,14 +7,12 @@ 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
|
||||
mount -t tmpfs -o noexec,nodev,nosuid tmpfs /dev/shm
|
||||
mount -t tmpfs tmpfs /tmp
|
||||
|
||||
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||
@@ -22,4 +20,4 @@ echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||
|
||||
# Set the time so we can validate certificates before we fetch anything;
|
||||
# however as not all DUTs have network, make this non-fatal.
|
||||
for _ in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done || true
|
||||
for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done || true
|
||||
|
@@ -1,13 +1,4 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC1090
|
||||
# shellcheck disable=SC1091
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
# shellcheck disable=SC2155
|
||||
|
||||
# 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,
|
||||
@@ -42,18 +33,14 @@ trap cleanup INT TERM EXIT
|
||||
BACKGROUND_PIDS=
|
||||
|
||||
|
||||
for path in '/dut-env-vars.sh' '/set-job-env-vars.sh' './set-job-env-vars.sh'; do
|
||||
# Second-stage init, used to set up devices and our job environment before
|
||||
# running tests.
|
||||
|
||||
for path in '/set-job-env-vars.sh' './set-job-env-vars.sh'; do
|
||||
[ -f "$path" ] && source "$path"
|
||||
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
|
||||
@@ -63,7 +50,7 @@ set -ex
|
||||
|
||||
# Set up ZRAM
|
||||
HWCI_ZRAM_SIZE=2G
|
||||
if /sbin/zramctl --find --size $HWCI_ZRAM_SIZE -a zstd; then
|
||||
if zramctl --find --size $HWCI_ZRAM_SIZE -a zstd; then
|
||||
mkswap /dev/zram0
|
||||
swapon /dev/zram0
|
||||
echo "zram: $HWCI_ZRAM_SIZE activated"
|
||||
@@ -80,22 +67,18 @@ fi
|
||||
#
|
||||
if [ "$HWCI_KVM" = "true" ]; then
|
||||
unset KVM_KERNEL_MODULE
|
||||
{
|
||||
grep -qs '\bvmx\b' /proc/cpuinfo && KVM_KERNEL_MODULE=kvm_intel
|
||||
} || {
|
||||
grep -qs '\bsvm\b' /proc/cpuinfo && KVM_KERNEL_MODULE=kvm_amd
|
||||
grep -qs '\bvmx\b' /proc/cpuinfo && KVM_KERNEL_MODULE=kvm_intel || {
|
||||
grep -qs '\bsvm\b' /proc/cpuinfo && KVM_KERNEL_MODULE=kvm_amd
|
||||
}
|
||||
|
||||
{
|
||||
[ -z "${KVM_KERNEL_MODULE}" ] && \
|
||||
echo "WARNING: Failed to detect CPU virtualization extensions"
|
||||
} || \
|
||||
[ -z "${KVM_KERNEL_MODULE}" ] && \
|
||||
echo "WARNING: Failed to detect CPU virtualization extensions" || \
|
||||
modprobe ${KVM_KERNEL_MODULE}
|
||||
|
||||
mkdir -p /lava-files
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "/lava-files/${KERNEL_IMAGE_NAME}" \
|
||||
"${KERNEL_IMAGE_BASE}/amd64/${KERNEL_IMAGE_NAME}"
|
||||
"${KERNEL_IMAGE_BASE_URL}/${KERNEL_IMAGE_NAME}"
|
||||
fi
|
||||
|
||||
# Fix prefix confusion: the build installs to $CI_PROJECT_DIR, but we expect
|
||||
@@ -104,53 +87,31 @@ ln -sf $CI_PROJECT_DIR/install /install
|
||||
export LD_LIBRARY_PATH=/install/lib
|
||||
export LIBGL_DRIVERS_PATH=/install/lib/dri
|
||||
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22495#note_1876691
|
||||
# The navi21 boards seem to have trouble with ld.so.cache, so try explicitly
|
||||
# telling it to look in /usr/local/lib.
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
|
||||
|
||||
# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
|
||||
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
|
||||
|
||||
# Disable GPU frequency scaling
|
||||
DEVFREQ_GOVERNOR=$(find /sys/devices -name governor | grep gpu || true)
|
||||
DEVFREQ_GOVERNOR=`find /sys/devices -name governor | grep gpu || true`
|
||||
test -z "$DEVFREQ_GOVERNOR" || echo performance > $DEVFREQ_GOVERNOR || true
|
||||
|
||||
# Disable CPU frequency scaling
|
||||
echo performance | tee -a /sys/devices/system/cpu/cpufreq/policy*/scaling_governor || true
|
||||
|
||||
# Disable GPU runtime power management
|
||||
GPU_AUTOSUSPEND=$(find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1)
|
||||
GPU_AUTOSUSPEND=`find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1`
|
||||
test -z "$GPU_AUTOSUSPEND" || echo -1 > $GPU_AUTOSUSPEND || true
|
||||
# Lock Intel GPU frequency to 70% of the maximum allowed by hardware
|
||||
# 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
|
||||
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
|
||||
echo "launch kdl.sh!"
|
||||
$KDL_PATH &
|
||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
||||
else
|
||||
echo "kdl.sh not found!"
|
||||
./intel-gpu-freq.sh -s 70% --cpu-set-max 65% -g all -d
|
||||
fi
|
||||
|
||||
# Increase freedreno hangcheck timer because it's right at the edge of the
|
||||
@@ -161,14 +122,8 @@ 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 &
|
||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
||||
fi
|
||||
|
||||
ARCH=$(uname -m)
|
||||
export VK_DRIVER_FILES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json"
|
||||
/capture-devcoredump.sh &
|
||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
||||
|
||||
# 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
|
||||
@@ -177,11 +132,12 @@ 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.
|
||||
for _ in 1 2 3 4 5; do
|
||||
for i in 1 2 3 4 5; do
|
||||
if [ -e /xorg-started ]; then
|
||||
break
|
||||
fi
|
||||
@@ -203,24 +159,22 @@ 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
|
||||
@@ -228,9 +182,9 @@ set -x
|
||||
cleanup
|
||||
|
||||
# upload artifacts
|
||||
if [ -n "$S3_RESULTS_UPLOAD" ]; then
|
||||
if [ -n "$MINIO_RESULTS_UPLOAD" ]; then
|
||||
tar --zstd -cf results.tar.zst results/;
|
||||
ci-fairy s3cp --token-file "${S3_JWT_FILE}" results.tar.zst https://"$S3_RESULTS_UPLOAD"/results.tar.zst;
|
||||
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" results.tar.zst https://"$MINIO_RESULTS_UPLOAD"/results.tar.zst;
|
||||
fi
|
||||
|
||||
# We still need to echo the hwci: mesa message, as some scripts rely on it, such
|
||||
@@ -238,12 +192,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
|
||||
|
@@ -1,14 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2013
|
||||
# shellcheck disable=SC2015
|
||||
# shellcheck disable=SC2034
|
||||
# shellcheck disable=SC2046
|
||||
# shellcheck disable=SC2059
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
# shellcheck disable=SC2154
|
||||
# shellcheck disable=SC2155
|
||||
# shellcheck disable=SC2162
|
||||
# shellcheck disable=SC2229
|
||||
#!/bin/sh
|
||||
#
|
||||
# This is an utility script to manage Intel GPU frequencies.
|
||||
# It can be used for debugging performance problems or trying to obtain a stable
|
||||
@@ -203,7 +193,7 @@ compute_freq_set() {
|
||||
val=${FREQ_RPn}
|
||||
;;
|
||||
*%)
|
||||
val=$((${1%?} * FREQ_RP0 / 100))
|
||||
val=$((${1%?} * ${FREQ_RP0} / 100))
|
||||
# Adjust freq to comply with 50 MHz increments
|
||||
val=$((val / 50 * 50))
|
||||
;;
|
||||
@@ -252,12 +242,12 @@ set_freq_max() {
|
||||
|
||||
[ -z "${DRY_RUN}" ] || return 0
|
||||
|
||||
if ! printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path max) \
|
||||
$(print_freq_sysfs_path boost) > /dev/null;
|
||||
then
|
||||
printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path max) \
|
||||
$(print_freq_sysfs_path boost) > /dev/null
|
||||
[ $? -eq 0 ] || {
|
||||
log ERROR "Failed to set GPU max frequency"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
@@ -282,11 +272,11 @@ set_freq_min() {
|
||||
|
||||
[ -z "${DRY_RUN}" ] || return 0
|
||||
|
||||
if ! printf "%s" ${SET_MIN_FREQ} > $(print_freq_sysfs_path min);
|
||||
then
|
||||
printf "%s" ${SET_MIN_FREQ} > $(print_freq_sysfs_path min)
|
||||
[ $? -eq 0 ] || {
|
||||
log ERROR "Failed to set GPU min frequency"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
@@ -505,7 +495,7 @@ compute_cpu_freq_set() {
|
||||
val=${CPU_FREQ_cpuinfo_min}
|
||||
;;
|
||||
*%)
|
||||
val=$((${1%?} * CPU_FREQ_cpuinfo_max / 100))
|
||||
val=$((${1%?} * ${CPU_FREQ_cpuinfo_max} / 100))
|
||||
;;
|
||||
*[!0-9]*)
|
||||
log ERROR "Cannot set CPU freq to invalid value: %s" "$1"
|
||||
@@ -548,11 +538,11 @@ set_cpu_freq_max() {
|
||||
local pstate_info=$(printf "${CPU_PSTATE_SYSFS_PATTERN}" max_perf_pct)
|
||||
[ -e "${pstate_info}" ] && {
|
||||
log INFO "Setting intel_pstate max perf to %s" "${target_freq}%"
|
||||
if ! printf "%s" "${target_freq}" > "${pstate_info}";
|
||||
then
|
||||
printf "%s" "${target_freq}" > "${pstate_info}"
|
||||
[ $? -eq 0 ] || {
|
||||
log ERROR "Failed to set intel_pstate max perf"
|
||||
res=1
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
local cpu_index
|
||||
@@ -560,17 +550,16 @@ 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
|
||||
|
||||
if ! printf "%s" ${target_freq} > $(print_cpu_freq_sysfs_path scaling_max ${cpu_index});
|
||||
then
|
||||
printf "%s" ${target_freq} > $(print_cpu_freq_sysfs_path scaling_max ${cpu_index})
|
||||
[ $? -eq 0 ] || {
|
||||
res=1
|
||||
log ERROR "Failed to set CPU%s max scaling frequency" ${cpu_index}
|
||||
fi
|
||||
}
|
||||
done
|
||||
|
||||
return ${res}
|
||||
|
@@ -1,18 +0,0 @@
|
||||
#!/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
|
||||
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 i in 1 2 3 4 5; do
|
||||
if [ -e "${_FLAG_FILE}" ]; then
|
||||
break
|
||||
fi
|
||||
sleep 5
|
||||
done
|
@@ -0,0 +1,174 @@
|
||||
From bf8ada0d15f94824ee1643d4e17a66dffdbaf2e5 Mon Sep 17 00:00:00 2001
|
||||
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
||||
Date: Fri, 26 Aug 2022 18:24:27 +0200
|
||||
Subject: [PATCH 1/2] Allow running on Android from the command line
|
||||
|
||||
For testing the Android EGL platform without having to go via the
|
||||
Android activity manager, build deqp-egl.
|
||||
|
||||
Tests that render to native windows are unsupported, as command line
|
||||
programs cannot create windows on Android.
|
||||
|
||||
$ cmake -S . -B build/ -DDEQP_TARGET=android -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror -DANDROID_NDK_PATH=./android-ndk-r21d -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28 -DGLCTS_GTF_TARGET=gles32 -G Ninja
|
||||
$ ninja -C build modules/egl/deqp-egl
|
||||
|
||||
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
||||
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
|
||||
---
|
||||
CMakeLists.txt | 36 ++-----------------
|
||||
.../android/tcuAndroidNativeActivity.cpp | 36 ++++++++++---------
|
||||
.../platform/android/tcuAndroidPlatform.cpp | 12 ++++++-
|
||||
3 files changed, 33 insertions(+), 51 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1ff2bb9..8c76abb 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -249,7 +249,7 @@ include_directories(
|
||||
external/vulkancts/framework/vulkan/generated/vulkan
|
||||
)
|
||||
|
||||
-if (DE_OS_IS_ANDROID OR DE_OS_IS_IOS)
|
||||
+if (DE_OS_IS_IOS)
|
||||
# On Android deqp modules are compiled as libraries and linked into final .so
|
||||
set(DEQP_MODULE_LIBRARIES )
|
||||
set(DEQP_MODULE_ENTRY_POINTS )
|
||||
@@ -293,7 +293,7 @@ macro (add_deqp_module MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
|
||||
set(DEQP_MODULE_LIBRARIES ${DEQP_MODULE_LIBRARIES} PARENT_SCOPE)
|
||||
set(DEQP_MODULE_ENTRY_POINTS ${DEQP_MODULE_ENTRY_POINTS} PARENT_SCOPE)
|
||||
|
||||
- if (NOT DE_OS_IS_ANDROID AND NOT DE_OS_IS_IOS)
|
||||
+ if (NOT DE_OS_IS_IOS)
|
||||
# Executable target
|
||||
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
|
||||
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
|
||||
@@ -367,37 +367,7 @@ add_subdirectory(external/vulkancts/vkscpc)
|
||||
add_subdirectory(external/openglcts)
|
||||
|
||||
# Single-binary targets
|
||||
-if (DE_OS_IS_ANDROID)
|
||||
- include_directories(executor)
|
||||
- include_directories(${PROJECT_BINARY_DIR}/external/vulkancts/framework/vulkan)
|
||||
-
|
||||
- set(DEQP_SRCS
|
||||
- framework/platform/android/tcuAndroidMain.cpp
|
||||
- framework/platform/android/tcuAndroidJNI.cpp
|
||||
- framework/platform/android/tcuAndroidPlatformCapabilityQueryJNI.cpp
|
||||
- framework/platform/android/tcuTestLogParserJNI.cpp
|
||||
- ${DEQP_MODULE_ENTRY_POINTS}
|
||||
- )
|
||||
-
|
||||
- set(DEQP_LIBS
|
||||
- tcutil-platform
|
||||
- xecore
|
||||
- ${DEQP_MODULE_LIBRARIES}
|
||||
- )
|
||||
-
|
||||
- add_library(deqp SHARED ${DEQP_SRCS})
|
||||
- target_link_libraries(deqp ${DEQP_LIBS})
|
||||
-
|
||||
- # Separate out the debug information because it's enormous
|
||||
- add_custom_command(TARGET deqp POST_BUILD
|
||||
- COMMAND ${CMAKE_STRIP} --only-keep-debug -o $<TARGET_FILE:deqp>.debug $<TARGET_FILE:deqp>
|
||||
- COMMAND ${CMAKE_STRIP} -g $<TARGET_FILE:deqp>)
|
||||
-
|
||||
- # Needed by OpenGL CTS that defines its own activity but depends on
|
||||
- # common Android support code.
|
||||
- target_include_directories(deqp PRIVATE framework/platform/android)
|
||||
-
|
||||
-elseif (DE_OS_IS_IOS)
|
||||
+if (DE_OS_IS_IOS)
|
||||
# Code sign identity
|
||||
set(DEQP_IOS_CODE_SIGN_IDENTITY "drawElements" CACHE STRING "Code sign identity for iOS build")
|
||||
|
||||
diff --git a/framework/platform/android/tcuAndroidNativeActivity.cpp b/framework/platform/android/tcuAndroidNativeActivity.cpp
|
||||
index 6f8cd8f..b83e30f 100644
|
||||
--- a/framework/platform/android/tcuAndroidNativeActivity.cpp
|
||||
+++ b/framework/platform/android/tcuAndroidNativeActivity.cpp
|
||||
@@ -116,23 +116,25 @@ namespace Android
|
||||
NativeActivity::NativeActivity (ANativeActivity* activity)
|
||||
: m_activity(activity)
|
||||
{
|
||||
- activity->instance = (void*)this;
|
||||
- activity->callbacks->onStart = onStartCallback;
|
||||
- activity->callbacks->onResume = onResumeCallback;
|
||||
- activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
|
||||
- activity->callbacks->onPause = onPauseCallback;
|
||||
- activity->callbacks->onStop = onStopCallback;
|
||||
- activity->callbacks->onDestroy = onDestroyCallback;
|
||||
- activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
|
||||
- activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
|
||||
- activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
|
||||
- activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
|
||||
- activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
|
||||
- activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
|
||||
- activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
|
||||
- activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
|
||||
- activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
|
||||
- activity->callbacks->onLowMemory = onLowMemoryCallback;
|
||||
+ if (activity) {
|
||||
+ activity->instance = (void*)this;
|
||||
+ activity->callbacks->onStart = onStartCallback;
|
||||
+ activity->callbacks->onResume = onResumeCallback;
|
||||
+ activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
|
||||
+ activity->callbacks->onPause = onPauseCallback;
|
||||
+ activity->callbacks->onStop = onStopCallback;
|
||||
+ activity->callbacks->onDestroy = onDestroyCallback;
|
||||
+ activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
|
||||
+ activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
|
||||
+ activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
|
||||
+ activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
|
||||
+ activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
|
||||
+ activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
|
||||
+ activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
|
||||
+ activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
|
||||
+ activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
|
||||
+ activity->callbacks->onLowMemory = onLowMemoryCallback;
|
||||
+ }
|
||||
}
|
||||
|
||||
NativeActivity::~NativeActivity (void)
|
||||
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
|
||||
index 69ab384..d7288f6 100644
|
||||
--- a/framework/platform/android/tcuAndroidPlatform.cpp
|
||||
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
|
||||
@@ -22,6 +22,7 @@
|
||||
*//*--------------------------------------------------------------------*/
|
||||
|
||||
#include "tcuAndroidPlatform.hpp"
|
||||
+#include "tcuAndroidNativeActivity.hpp"
|
||||
#include "tcuAndroidUtil.hpp"
|
||||
#include "gluRenderContext.hpp"
|
||||
#include "egluNativeDisplay.hpp"
|
||||
@@ -170,7 +171,7 @@ eglu::NativeWindow* NativeWindowFactory::createWindow (const eglu::WindowParams&
|
||||
Window* window = m_windowRegistry.tryAcquireWindow();
|
||||
|
||||
if (!window)
|
||||
- throw ResourceError("Native window is not available", DE_NULL, __FILE__, __LINE__);
|
||||
+ throw NotSupportedError("Native window is not available", DE_NULL, __FILE__, __LINE__);
|
||||
|
||||
return new NativeWindow(window, params.width, params.height, format);
|
||||
}
|
||||
@@ -286,6 +287,9 @@ static size_t getTotalSystemMemory (ANativeActivity* activity)
|
||||
|
||||
try
|
||||
{
|
||||
+ if (!activity)
|
||||
+ throw tcu::InternalError("No activity (running from command line?");
|
||||
+
|
||||
const size_t totalMemory = getTotalAndroidSystemMemory(activity);
|
||||
print("Device has %.2f MiB of system memory\n", static_cast<double>(totalMemory) / static_cast<double>(MiB));
|
||||
return totalMemory;
|
||||
@@ -382,3 +386,9 @@ bool Platform::hasDisplay (vk::wsi::Type wsiType) const
|
||||
|
||||
} // Android
|
||||
} // tcu
|
||||
+
|
||||
+tcu::Platform* createPlatform (void)
|
||||
+{
|
||||
+ tcu::Android::NativeActivity activity(NULL);
|
||||
+ return new tcu::Android::Platform(activity);
|
||||
+}
|
||||
--
|
||||
2.39.1
|
||||
|
@@ -0,0 +1,161 @@
|
||||
From 6d99990e93869e361035b7c06c05183041dec8b4 Mon Sep 17 00:00:00 2001
|
||||
From: Ricardo Garcia <rgarcia@igalia.com>
|
||||
Date: Mon, 20 Feb 2023 13:57:53 +0100
|
||||
Subject: [PATCH] Fix build for the surfaceless and null-WS target platforms
|
||||
|
||||
Both platforms should not be considered for building Vulkan Video, which
|
||||
is only available in the normal Linux and Win32 targets, and their
|
||||
createLibrary platform methods do not take a library type argument.
|
||||
|
||||
No test results should be affected by these changes.
|
||||
|
||||
Components: Framework
|
||||
VK-GL-CTS issue: 4295
|
||||
|
||||
Change-Id: I4de5b42685899099a9cfcf7da64fe299fef61ffc
|
||||
---
|
||||
external/vulkancts/framework/vulkan/vkPlatform.hpp | 2 +-
|
||||
.../vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp | 2 +-
|
||||
external/vulkancts/modules/vulkan/video/CMakeLists.txt | 2 +-
|
||||
.../modules/vulkan/video/vktVideoSessionNvUtils.cpp | 2 +-
|
||||
external/vulkancts/modules/vulkan/vktTestPackage.cpp | 2 +-
|
||||
external/vulkancts/vkscpc/vkscpc.cpp | 2 +-
|
||||
external/vulkancts/vkscserver/vksServices.cpp | 2 +-
|
||||
framework/delibs/debase/deDefs.h | 6 ++++++
|
||||
framework/platform/CMakeLists.txt | 1 +
|
||||
targets/nullws/nullws.cmake | 1 +
|
||||
10 files changed, 15 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/external/vulkancts/framework/vulkan/vkPlatform.hpp b/external/vulkancts/framework/vulkan/vkPlatform.hpp
|
||||
index bec39d326..7574166b9 100644
|
||||
--- a/external/vulkancts/framework/vulkan/vkPlatform.hpp
|
||||
+++ b/external/vulkancts/framework/vulkan/vkPlatform.hpp
|
||||
@@ -399,7 +399,7 @@ public:
|
||||
|
||||
Platform (void) {}
|
||||
~Platform (void) {}
|
||||
-#if (DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_UNIX)
|
||||
+#ifdef DE_PLATFORM_USE_LIBRARY_TYPE
|
||||
virtual Library* createLibrary (LibraryType libraryType = LIBRARY_TYPE_VULKAN, const char* libraryPath = DE_NULL) const = 0;
|
||||
#else
|
||||
virtual Library* createLibrary (const char* libraryPath = DE_NULL) const = 0;
|
||||
diff --git a/external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp b/external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp
|
||||
index 5f6d884f4..af6bf6938 100644
|
||||
--- a/external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp
|
||||
+++ b/external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
tcu::TestLog& log = m_context.getTestContext().getLog();
|
||||
const deUint32 apiVersion = m_context.getUsedApiVersion();
|
||||
const vk::Platform& platform = m_context.getTestContext().getPlatform().getVulkanPlatform();
|
||||
-#if (DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_UNIX)
|
||||
+#ifdef DE_PLATFORM_USE_LIBRARY_TYPE
|
||||
de::MovePtr<vk::Library> vkLibrary = de::MovePtr<vk::Library>(platform.createLibrary(vk::Platform::LibraryType::LIBRARY_TYPE_VULKAN, m_context.getTestContext().getCommandLine().getVkLibraryPath()));
|
||||
#else
|
||||
de::MovePtr<vk::Library> vkLibrary = de::MovePtr<vk::Library>(platform.createLibrary(m_context.getTestContext().getCommandLine().getVkLibraryPath()));
|
||||
diff --git a/external/vulkancts/modules/vulkan/video/CMakeLists.txt b/external/vulkancts/modules/vulkan/video/CMakeLists.txt
|
||||
index 464adb1e2..f9a2044e7 100644
|
||||
--- a/external/vulkancts/modules/vulkan/video/CMakeLists.txt
|
||||
+++ b/external/vulkancts/modules/vulkan/video/CMakeLists.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
include_directories(..)
|
||||
-if (DE_OS_IS_WIN32 OR DE_OS_IS_UNIX)
|
||||
+if ((DE_OS_IS_WIN32 OR DE_OS_IS_UNIX) AND NOT DEQP_USE_SURFACELESS AND NOT DEQP_USE_NULLWS)
|
||||
include_directories(${FFMPEG_INCLUDE_PATH})
|
||||
add_compile_definitions(DE_BUILD_VIDEO)
|
||||
endif()
|
||||
diff --git a/external/vulkancts/modules/vulkan/video/vktVideoSessionNvUtils.cpp b/external/vulkancts/modules/vulkan/video/vktVideoSessionNvUtils.cpp
|
||||
index 00491930c..9323278be 100644
|
||||
--- a/external/vulkancts/modules/vulkan/video/vktVideoSessionNvUtils.cpp
|
||||
+++ b/external/vulkancts/modules/vulkan/video/vktVideoSessionNvUtils.cpp
|
||||
@@ -148,7 +148,7 @@ private:
|
||||
};
|
||||
|
||||
NvFunctions::NvFunctions (const vk::Platform& platform)
|
||||
-#ifdef DE_BUILD_VIDEO
|
||||
+#ifdef DE_PLATFORM_USE_LIBRARY_TYPE
|
||||
: m_library (de::MovePtr<vk::Library>(platform.createLibrary(vk::Platform::LIBRARY_TYPE_VULKAN_VIDEO_DECODE_PARSER, DE_NULL)))
|
||||
#else
|
||||
: m_library (de::MovePtr<vk::Library>(platform.createLibrary()))
|
||||
diff --git a/external/vulkancts/modules/vulkan/vktTestPackage.cpp b/external/vulkancts/modules/vulkan/vktTestPackage.cpp
|
||||
index 959a9d368..cac454c71 100644
|
||||
--- a/external/vulkancts/modules/vulkan/vktTestPackage.cpp
|
||||
+++ b/external/vulkancts/modules/vulkan/vktTestPackage.cpp
|
||||
@@ -204,7 +204,7 @@ static void restoreStandardOutput () { qpRedirectOut(openWrite, open
|
||||
|
||||
static MovePtr<vk::Library> createLibrary (tcu::TestContext& testCtx)
|
||||
{
|
||||
-#if (DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_UNIX)
|
||||
+#ifdef DE_PLATFORM_USE_LIBRARY_TYPE
|
||||
return MovePtr<vk::Library>(testCtx.getPlatform().getVulkanPlatform().createLibrary(vk::Platform::LIBRARY_TYPE_VULKAN, testCtx.getCommandLine().getVkLibraryPath()));
|
||||
#else
|
||||
return MovePtr<vk::Library>(testCtx.getPlatform().getVulkanPlatform().createLibrary(testCtx.getCommandLine().getVkLibraryPath()));
|
||||
diff --git a/external/vulkancts/vkscpc/vkscpc.cpp b/external/vulkancts/vkscpc/vkscpc.cpp
|
||||
index 55b5665c8..91725633a 100644
|
||||
--- a/external/vulkancts/vkscpc/vkscpc.cpp
|
||||
+++ b/external/vulkancts/vkscpc/vkscpc.cpp
|
||||
@@ -288,7 +288,7 @@ int main (int argc, char** argv)
|
||||
tcu::DirArchive archive {""};
|
||||
tcu::TestLog log { cmdLine.getOption<opt::LogFile>().c_str() }; log.supressLogging(true);
|
||||
de::SharedPtr<tcu::Platform> platform {createPlatform()};
|
||||
-#if (DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_UNIX)
|
||||
+#ifdef DE_PLATFORM_USE_LIBRARY_TYPE
|
||||
de::SharedPtr<vk::Library> library {platform->getVulkanPlatform().createLibrary(vk::Platform::LIBRARY_TYPE_VULKAN, DE_NULL)};
|
||||
#else
|
||||
de::SharedPtr<vk::Library> library {platform->getVulkanPlatform().createLibrary(DE_NULL)};
|
||||
diff --git a/external/vulkancts/vkscserver/vksServices.cpp b/external/vulkancts/vkscserver/vksServices.cpp
|
||||
index 461c7a349..fe1160edc 100644
|
||||
--- a/external/vulkancts/vkscserver/vksServices.cpp
|
||||
+++ b/external/vulkancts/vkscserver/vksServices.cpp
|
||||
@@ -163,7 +163,7 @@ VkscServer* createServerVKSC(const std::string& logFile)
|
||||
tcu::DirArchive archive {""};
|
||||
tcu::TestLog log { logFile.c_str() }; log.supressLogging(true);
|
||||
tcu::Platform* platform {createPlatform()};
|
||||
-#if (DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_UNIX)
|
||||
+#ifdef DE_PLATFORM_USE_LIBRARY_TYPE
|
||||
vk::Library* library {platform->getVulkanPlatform().createLibrary(vk::Platform::LIBRARY_TYPE_VULKAN, DE_NULL)};
|
||||
#else
|
||||
vk::Library* library {platform->getVulkanPlatform().createLibrary(DE_NULL)};
|
||||
diff --git a/framework/delibs/debase/deDefs.h b/framework/delibs/debase/deDefs.h
|
||||
index 39cd65d0b..2885fe5c5 100644
|
||||
--- a/framework/delibs/debase/deDefs.h
|
||||
+++ b/framework/delibs/debase/deDefs.h
|
||||
@@ -101,6 +101,12 @@
|
||||
# error Unknown operating system.
|
||||
#endif
|
||||
|
||||
+#if ((DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_UNIX)) && !defined(DEQP_SURFACELESS) && !defined(NULLWS)
|
||||
+# define DE_PLATFORM_USE_LIBRARY_TYPE 1
|
||||
+#else
|
||||
+# undef DE_PLATFORM_USE_LIBRARY_TYPE
|
||||
+#endif
|
||||
+
|
||||
/* CPUs */
|
||||
#define DE_CPU_VANILLA 0
|
||||
#define DE_CPU_X86 1
|
||||
diff --git a/framework/platform/CMakeLists.txt b/framework/platform/CMakeLists.txt
|
||||
index 00c53e3c9..b2a1d57b6 100644
|
||||
--- a/framework/platform/CMakeLists.txt
|
||||
+++ b/framework/platform/CMakeLists.txt
|
||||
@@ -113,6 +113,7 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
|
||||
endif()
|
||||
|
||||
elseif (DE_OS_IS_UNIX AND DEQP_USE_SURFACELESS)
|
||||
+ add_definitions(-DDEQP_SURFACELESS=1)
|
||||
set(TCUTIL_PLATFORM_SRCS
|
||||
surfaceless/tcuSurfacelessPlatform.hpp
|
||||
surfaceless/tcuSurfacelessPlatform.cpp
|
||||
diff --git a/targets/nullws/nullws.cmake b/targets/nullws/nullws.cmake
|
||||
index 81a7f9ea2..5f6f9b773 100644
|
||||
--- a/targets/nullws/nullws.cmake
|
||||
+++ b/targets/nullws/nullws.cmake
|
||||
@@ -1,6 +1,7 @@
|
||||
message("*** Using nullws target")
|
||||
set(DEQP_TARGET_NAME "nullws")
|
||||
|
||||
+set(DEQP_USE_NULLWS ON)
|
||||
add_definitions(-DNULLWS)
|
||||
|
||||
find_library(GLES2_LIBRARY NAMES libGLESv2 GLESv2)
|
||||
--
|
||||
2.39.1
|
||||
|
@@ -0,0 +1,27 @@
|
||||
From c2d5252f4a8be94720235feb9e358ecb0a2e8e11 Mon Sep 17 00:00:00 2001
|
||||
From: Helen Koike <helen.koike@collabora.com>
|
||||
Date: Tue, 27 Sep 2022 12:35:22 -0300
|
||||
Subject: [PATCH 2/2] Android prints to stdout instead of logcat
|
||||
|
||||
Signed-off-by: Helen Koike <helen.koike@collabora.com>
|
||||
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
|
||||
---
|
||||
framework/qphelper/qpDebugOut.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/framework/qphelper/qpDebugOut.c b/framework/qphelper/qpDebugOut.c
|
||||
index 6579e9f..c200c6f 100644
|
||||
--- a/framework/qphelper/qpDebugOut.c
|
||||
+++ b/framework/qphelper/qpDebugOut.c
|
||||
@@ -98,7 +98,7 @@ void qpDiev (const char* format, va_list args)
|
||||
}
|
||||
|
||||
/* print() implementation. */
|
||||
-#if (DE_OS == DE_OS_ANDROID)
|
||||
+#if (0)
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
--
|
||||
2.39.1
|
||||
|
@@ -1,81 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# ALPINE_X86_64_BUILD_TAG
|
||||
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
EPHEMERAL=(
|
||||
)
|
||||
|
||||
|
||||
DEPS=(
|
||||
bash
|
||||
bison
|
||||
ccache
|
||||
"clang${LLVM_VERSION}-dev"
|
||||
cmake
|
||||
clang-dev
|
||||
coreutils
|
||||
curl
|
||||
flex
|
||||
gcc
|
||||
g++
|
||||
git
|
||||
gettext
|
||||
glslang
|
||||
graphviz
|
||||
linux-headers
|
||||
"llvm${LLVM_VERSION}-static"
|
||||
"llvm${LLVM_VERSION}-dev"
|
||||
meson
|
||||
mold
|
||||
musl-dev
|
||||
expat-dev
|
||||
elfutils-dev
|
||||
libclc-dev
|
||||
libdrm-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===5.1.1 hawkmoth===0.16.0
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.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
|
@@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This is a ci-templates build script to generate a container for LAVA SSH client.
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
EPHEMERAL=(
|
||||
)
|
||||
|
||||
# We only need these very basic packages to run the tests.
|
||||
DEPS=(
|
||||
openssh-client # for ssh
|
||||
iputils # for ping
|
||||
bash
|
||||
curl
|
||||
)
|
||||
|
||||
|
||||
apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
apk del "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
72
.gitlab-ci/container/alpine/x86_build.sh
Normal file
72
.gitlab-ci/container/alpine/x86_build.sh
Normal file
@@ -0,0 +1,72 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
|
||||
EPHEMERAL="
|
||||
autoconf
|
||||
automake
|
||||
bzip2
|
||||
cmake
|
||||
git
|
||||
libtool
|
||||
libepoxy-dev
|
||||
libtbb-dev
|
||||
make
|
||||
openssl-dev
|
||||
unzip
|
||||
xz
|
||||
zstd-dev
|
||||
"
|
||||
|
||||
apk add \
|
||||
bash \
|
||||
bison \
|
||||
ccache \
|
||||
clang-dev \
|
||||
coreutils \
|
||||
curl \
|
||||
flex \
|
||||
gcc \
|
||||
g++ \
|
||||
gettext \
|
||||
glslang \
|
||||
linux-headers \
|
||||
llvm15-dev \
|
||||
meson \
|
||||
expat-dev \
|
||||
elfutils-dev \
|
||||
libselinux-dev \
|
||||
libva-dev \
|
||||
libpciaccess-dev \
|
||||
zlib-dev \
|
||||
python3-dev \
|
||||
py3-mako \
|
||||
py3-ply \
|
||||
vulkan-headers \
|
||||
spirv-tools-dev \
|
||||
util-macros \
|
||||
$EPHEMERAL
|
||||
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
||||
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
|
||||
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
apk del $EPHEMERAL
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
69
.gitlab-ci/container/arm.config
Normal file
69
.gitlab-ci/container/arm.config
Normal file
@@ -0,0 +1,69 @@
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_ZRAM_MEMORY_TRACKING=y
|
||||
CONFIG_ZRAM_WRITEBACK=y
|
||||
CONFIG_ZRAM=y
|
||||
CONFIG_ZSMALLOC_STAT=y
|
||||
|
||||
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
|
||||
CONFIG_BLK_DEV_INITRD=n
|
||||
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
CONFIG_DEVFREQ_GOV_USERSPACE=y
|
||||
CONFIG_DEVFREQ_GOV_PASSIVE=y
|
||||
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
|
||||
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_ETNAVIV=y
|
||||
CONFIG_DRM_ROCKCHIP=y
|
||||
CONFIG_DRM_PANFROST=y
|
||||
CONFIG_DRM_LIMA=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_PWM_CROS_EC=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
|
||||
CONFIG_ROCKCHIP_CDN_DP=n
|
||||
|
||||
CONFIG_SPI_ROCKCHIP=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
CONFIG_PHY_ROCKCHIP_DP=y
|
||||
CONFIG_DWMAC_ROCKCHIP=y
|
||||
|
||||
CONFIG_MFD_RK808=y
|
||||
CONFIG_REGULATOR_RK808=y
|
||||
CONFIG_RTC_DRV_RK808=y
|
||||
CONFIG_COMMON_CLK_RK808=y
|
||||
|
||||
CONFIG_REGULATOR_FAN53555=y
|
||||
CONFIG_REGULATOR=y
|
||||
|
||||
CONFIG_REGULATOR_VCTRL=y
|
||||
|
||||
CONFIG_KASAN=n
|
||||
CONFIG_KASAN_INLINE=n
|
||||
CONFIG_STACKTRACE=n
|
||||
|
||||
CONFIG_TMPFS=y
|
||||
|
||||
CONFIG_PROVE_LOCKING=n
|
||||
CONFIG_DEBUG_LOCKDEP=n
|
||||
CONFIG_SOFTLOCKUP_DETECTOR=n
|
||||
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=n
|
||||
|
||||
CONFIG_FW_LOADER_COMPRESS=y
|
||||
|
||||
CONFIG_USB_USBNET=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_RTL8152=y
|
||||
CONFIG_USB_NET_AX8817X=y
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
||||
|
||||
# TK1
|
||||
CONFIG_ARM_TEGRA_DEVFREQ=y
|
||||
|
||||
# 32-bit build failure
|
||||
CONFIG_DRM_MSM=n
|
186
.gitlab-ci/container/arm64.config
Normal file
186
.gitlab-ci/container/arm64.config
Normal file
@@ -0,0 +1,186 @@
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_ZRAM_MEMORY_TRACKING=y
|
||||
CONFIG_ZRAM_WRITEBACK=y
|
||||
CONFIG_ZRAM=y
|
||||
CONFIG_ZSMALLOC_STAT=y
|
||||
|
||||
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
|
||||
CONFIG_BLK_DEV_INITRD=n
|
||||
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
CONFIG_DEVFREQ_GOV_USERSPACE=y
|
||||
CONFIG_DEVFREQ_GOV_PASSIVE=y
|
||||
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_ROCKCHIP=y
|
||||
CONFIG_DRM_PANFROST=y
|
||||
CONFIG_DRM_LIMA=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_DRM_PANEL_EDP=y
|
||||
CONFIG_DRM_MSM=y
|
||||
CONFIG_DRM_ETNAVIV=y
|
||||
CONFIG_DRM_I2C_ADV7511=y
|
||||
CONFIG_PWM_CROS_EC=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
|
||||
CONFIG_ROCKCHIP_CDN_DP=n
|
||||
|
||||
CONFIG_SPI_ROCKCHIP=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
CONFIG_PHY_ROCKCHIP_DP=y
|
||||
CONFIG_DWMAC_ROCKCHIP=y
|
||||
CONFIG_STMMAC_ETH=y
|
||||
CONFIG_TYPEC_FUSB302=y
|
||||
CONFIG_TYPEC=y
|
||||
CONFIG_TYPEC_TCPM=y
|
||||
|
||||
# MSM platform bits
|
||||
|
||||
# For CONFIG_QCOM_LMH
|
||||
CONFIG_OF=y
|
||||
|
||||
CONFIG_QCOM_COMMAND_DB=y
|
||||
CONFIG_QCOM_RPMHPD=y
|
||||
CONFIG_QCOM_RPMPD=y
|
||||
CONFIG_QCOM_OCMEM=y
|
||||
CONFIG_SDM_GPUCC_845=y
|
||||
CONFIG_SDM_VIDEOCC_845=y
|
||||
CONFIG_SDM_DISPCC_845=y
|
||||
CONFIG_SDM_LPASSCC_845=y
|
||||
CONFIG_SDM_CAMCC_845=y
|
||||
CONFIG_RESET_QCOM_PDC=y
|
||||
CONFIG_DRM_TI_SN65DSI86=y
|
||||
CONFIG_I2C_QCOM_GENI=y
|
||||
CONFIG_SPI_QCOM_GENI=y
|
||||
CONFIG_PHY_QCOM_QUSB2=y
|
||||
CONFIG_PHY_QCOM_QMP=y
|
||||
CONFIG_QCOM_CLK_APCC_MSM8996=y
|
||||
CONFIG_QCOM_LLCC=y
|
||||
CONFIG_QCOM_LMH=y
|
||||
CONFIG_QCOM_SPMI_TEMP_ALARM=y
|
||||
CONFIG_QCOM_WDT=y
|
||||
CONFIG_POWER_RESET_QCOM_PON=y
|
||||
CONFIG_RTC_DRV_PM8XXX=y
|
||||
CONFIG_INTERCONNECT=y
|
||||
CONFIG_INTERCONNECT_QCOM=y
|
||||
CONFIG_INTERCONNECT_QCOM_MSM8996=y
|
||||
CONFIG_INTERCONNECT_QCOM_SDM845=y
|
||||
CONFIG_INTERCONNECT_QCOM_MSM8916=y
|
||||
CONFIG_INTERCONNECT_QCOM_OSM_L3=y
|
||||
CONFIG_INTERCONNECT_QCOM_SC7180=y
|
||||
CONFIG_CRYPTO_DEV_QCOM_RNG=y
|
||||
CONFIG_SC_DISPCC_7180=y
|
||||
CONFIG_SC_GPUCC_7180=y
|
||||
CONFIG_QCOM_SPMI_ADC5=y
|
||||
CONFIG_DRM_PARADE_PS8640=y
|
||||
CONFIG_PHY_QCOM_USB_HS=y
|
||||
|
||||
# db410c ethernet
|
||||
CONFIG_USB_RTL8152=y
|
||||
# db820c ethernet
|
||||
CONFIG_ATL1C=y
|
||||
# Chromebooks ethernet
|
||||
CONFIG_USB_ONBOARD_HUB=y
|
||||
|
||||
CONFIG_ARCH_ALPINE=n
|
||||
CONFIG_ARCH_BCM2835=n
|
||||
CONFIG_ARCH_BCM_IPROC=n
|
||||
CONFIG_ARCH_BERLIN=n
|
||||
CONFIG_ARCH_BRCMSTB=n
|
||||
CONFIG_ARCH_EXYNOS=n
|
||||
CONFIG_ARCH_K3=n
|
||||
CONFIG_ARCH_LAYERSCAPE=n
|
||||
CONFIG_ARCH_LG1K=n
|
||||
CONFIG_ARCH_HISI=n
|
||||
CONFIG_ARCH_MVEBU=n
|
||||
CONFIG_ARCH_SEATTLE=n
|
||||
CONFIG_ARCH_SYNQUACER=n
|
||||
CONFIG_ARCH_RENESAS=n
|
||||
CONFIG_ARCH_R8A774A1=n
|
||||
CONFIG_ARCH_R8A774C0=n
|
||||
CONFIG_ARCH_R8A7795=n
|
||||
CONFIG_ARCH_R8A7796=n
|
||||
CONFIG_ARCH_R8A77965=n
|
||||
CONFIG_ARCH_R8A77970=n
|
||||
CONFIG_ARCH_R8A77980=n
|
||||
CONFIG_ARCH_R8A77990=n
|
||||
CONFIG_ARCH_R8A77995=n
|
||||
CONFIG_ARCH_STRATIX10=n
|
||||
CONFIG_ARCH_TEGRA=n
|
||||
CONFIG_ARCH_SPRD=n
|
||||
CONFIG_ARCH_THUNDER=n
|
||||
CONFIG_ARCH_THUNDER2=n
|
||||
CONFIG_ARCH_UNIPHIER=n
|
||||
CONFIG_ARCH_VEXPRESS=n
|
||||
CONFIG_ARCH_XGENE=n
|
||||
CONFIG_ARCH_ZX=n
|
||||
CONFIG_ARCH_ZYNQMP=n
|
||||
|
||||
# Strip out some stuff we don't need for graphics testing, to reduce
|
||||
# the build.
|
||||
CONFIG_CAN=n
|
||||
CONFIG_WIRELESS=n
|
||||
CONFIG_RFKILL=n
|
||||
CONFIG_WLAN=n
|
||||
|
||||
CONFIG_REGULATOR_FAN53555=y
|
||||
CONFIG_REGULATOR=y
|
||||
|
||||
CONFIG_REGULATOR_VCTRL=y
|
||||
|
||||
CONFIG_KASAN=n
|
||||
CONFIG_KASAN_INLINE=n
|
||||
CONFIG_STACKTRACE=n
|
||||
|
||||
CONFIG_TMPFS=y
|
||||
|
||||
CONFIG_PROVE_LOCKING=n
|
||||
CONFIG_DEBUG_LOCKDEP=n
|
||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
|
||||
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
|
||||
CONFIG_FW_LOADER_COMPRESS=y
|
||||
CONFIG_FW_LOADER_USER_HELPER=n
|
||||
|
||||
CONFIG_USB_USBNET=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_RTL8152=y
|
||||
CONFIG_USB_NET_AX8817X=y
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
||||
|
||||
# For amlogic
|
||||
CONFIG_MESON_GXL_PHY=y
|
||||
CONFIG_MDIO_BUS_MUX_MESON_G12A=y
|
||||
CONFIG_DRM_MESON=y
|
||||
|
||||
# For Mediatek
|
||||
CONFIG_DRM_MEDIATEK=y
|
||||
CONFIG_PWM_MEDIATEK=y
|
||||
CONFIG_DRM_MEDIATEK_HDMI=y
|
||||
CONFIG_GNSS=y
|
||||
CONFIG_GNSS_MTK_SERIAL=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_MTK=y
|
||||
CONFIG_MTK_DEVAPC=y
|
||||
CONFIG_PWM_MTK_DISP=y
|
||||
CONFIG_MTK_CMDQ=y
|
||||
|
||||
# For nouveau. Note that DRM must be a module so that it's loaded after NFS is up to provide the firmware.
|
||||
CONFIG_ARCH_TEGRA=y
|
||||
CONFIG_DRM_NOUVEAU=m
|
||||
CONFIG_DRM_TEGRA=m
|
||||
CONFIG_R8169=y
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_DRM_TEGRA_STAGING=y
|
||||
CONFIG_TEGRA_HOST1X=y
|
||||
CONFIG_ARM_TEGRA_DEVFREQ=y
|
||||
CONFIG_TEGRA_SOCTHERM=y
|
||||
CONFIG_DRM_TEGRA_DEBUG=y
|
||||
CONFIG_PWM_TEGRA=y
|
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
# Fetch the arm-built rootfs image and unpack it in our x86_64 container (saves
|
||||
# Fetch the arm-built rootfs image and unpack it in our x86 container (saves
|
||||
# network transfer, disk usage, and runtime on test jobs)
|
||||
|
||||
# shellcheck disable=SC2154 # arch is assigned in previous scripts
|
||||
@@ -24,21 +24,21 @@ if [[ $arch == "arm64" ]]; then
|
||||
pushd /baremetal-files
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${KERNEL_IMAGE_BASE}"/arm64/Image
|
||||
-O "${ARTIFACTS_URL}"/Image
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${KERNEL_IMAGE_BASE}"/arm64/Image.gz
|
||||
-O "${ARTIFACTS_URL}"/Image.gz
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${KERNEL_IMAGE_BASE}"/arm64/cheza-kernel
|
||||
-O "${ARTIFACTS_URL}"/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"
|
||||
|
||||
for DTB in $DEVICE_TREES; do
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${KERNEL_IMAGE_BASE}/arm64/$DTB"
|
||||
-O "${ARTIFACTS_URL}/$DTB"
|
||||
done
|
||||
|
||||
popd
|
||||
@@ -47,7 +47,7 @@ elif [[ $arch == "armhf" ]]; then
|
||||
pushd /baremetal-files
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${KERNEL_IMAGE_BASE}"/armhf/zImage
|
||||
-O "${ARTIFACTS_URL}"/zImage
|
||||
|
||||
DEVICE_TREES=""
|
||||
DEVICE_TREES="$DEVICE_TREES imx6q-cubox-i.dtb"
|
||||
@@ -55,7 +55,7 @@ elif [[ $arch == "armhf" ]]; then
|
||||
|
||||
for DTB in $DEVICE_TREES; do
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${KERNEL_IMAGE_BASE}/armhf/$DTB"
|
||||
-O "${ARTIFACTS_URL}/$DTB"
|
||||
done
|
||||
|
||||
popd
|
||||
|
@@ -1,119 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
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
|
||||
|
||||
# Install some dependencies needed to build LLVM
|
||||
EPHEMERAL=(
|
||||
ninja-build
|
||||
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
|
||||
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
|
||||
rm "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
|
||||
fi
|
||||
|
||||
rm -rf "$LLVM_INSTALL_PREFIX"
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
@@ -1,103 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -uex
|
||||
|
||||
uncollapsed_section_start angle "Building angle"
|
||||
|
||||
ANGLE_REV="76025caa1a059f464a2b0e8f879dbd4746f092b9"
|
||||
SCRIPTS_DIR="$(pwd)/.gitlab-ci"
|
||||
ANGLE_PATCH_DIR="${SCRIPTS_DIR}/container/patches"
|
||||
|
||||
# DEPOT tools
|
||||
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot-tools
|
||||
export PATH=/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
|
||||
|
||||
angle_patch_files=(
|
||||
build-angle_deps_Make-more-sources-conditional.patch
|
||||
)
|
||||
for patch in "${angle_patch_files[@]}"; do
|
||||
echo "Apply patch to ANGLE from ${patch}"
|
||||
GIT_COMMITTER_DATE="$(LC_TIME=C date -d@0)" git am < "${ANGLE_PATCH_DIR}/${patch}"
|
||||
done
|
||||
|
||||
{
|
||||
echo "ANGLE base version $ANGLE_REV"
|
||||
echo "The following local patches are applied on top:"
|
||||
git log --reverse --oneline $ANGLE_REV.. --format='- %s'
|
||||
} > /angle/version
|
||||
|
||||
# source preparation
|
||||
gclient config --name REPLACE-WITH-A-DOT --unmanaged \
|
||||
--custom-var='angle_enable_cl=False' \
|
||||
--custom-var='angle_enable_cl_testing=False' \
|
||||
--custom-var='angle_enable_vulkan_validation_layers=False' \
|
||||
--custom-var='angle_enable_wgpu=False' \
|
||||
--custom-var='build_allow_regenerate=False' \
|
||||
--custom-var='build_angle_deqp_tests=False' \
|
||||
--custom-var='build_angle_perftests=False' \
|
||||
--custom-var='build_with_catapult=False' \
|
||||
--custom-var='build_with_swiftshader=False' \
|
||||
https://chromium.googlesource.com/angle/angle.git
|
||||
sed -e 's/REPLACE-WITH-A-DOT/./;' -i .gclient
|
||||
gclient sync -j"${FDO_CI_CONCURRENT:-4}"
|
||||
|
||||
mkdir -p out/Release
|
||||
echo '
|
||||
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_use_custom_libvulkan=false
|
||||
angle_egl_extension="so.1"
|
||||
angle_glesv2_extension="so.2"
|
||||
build_angle_deqp_tests=false
|
||||
dcheck_always_on=true
|
||||
enable_expensive_dchecks=false
|
||||
is_debug=false
|
||||
' > out/Release/args.gn
|
||||
|
||||
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
||||
build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
|
||||
fi
|
||||
|
||||
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 libGLESv2
|
||||
|
||||
rm -f out/Release/libvulkan.so* out/Release/*.so.TOC
|
||||
cp out/Release/lib*.so* /angle/
|
||||
ln -s libEGL.so.1 /angle/libEGL.so
|
||||
ln -s libGLESv2.so.2 /angle/libGLESv2.so
|
||||
|
||||
rm -rf out
|
||||
|
||||
popd
|
||||
rm -rf /depot-tools
|
||||
rm -rf /angle-build
|
||||
|
||||
section_end angle
|
@@ -1,23 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/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_GL_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
set -ex
|
||||
|
||||
set -uex
|
||||
|
||||
uncollapsed_section_start apitrace "Building apitrace"
|
||||
|
||||
APITRACE_VERSION="0a6506433e1f9f7b69757b4e5730326970c4321a"
|
||||
APITRACE_VERSION="790380e05854d5c9d315555444ffcc7acb8f4037"
|
||||
|
||||
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 +17,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,41 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/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=2118fbb57ca26b495a9aa407845c7729d697a24b
|
||||
CROSVM_VERSION=00af43e1b565e1ae0047ba84b970da5e089e4f48
|
||||
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=57a2b82e0958f08d02ade8400786e1ca0935c9b1
|
||||
VIRGLRENDERER_VERSION=fc2ad36998f8af8ea3cc68fb9c747dfec9cb4635
|
||||
rm -rf third_party/virglrenderer
|
||||
git clone --single-branch -b main --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
|
||||
git clone --single-branch -b master --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 install -C build
|
||||
meson build/ -Drender-server-worker=process -Dvenus-experimental=true $EXTRA_MESON_ARGS
|
||||
ninja -C build install
|
||||
popd
|
||||
|
||||
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.65.1 \
|
||||
${EXTRA_CARGO_ARGS:-}
|
||||
--version 0.63.0 \
|
||||
$EXTRA_CARGO_ARGS
|
||||
|
||||
CROSVM_USE_SYSTEM_MINIGBM=1 CROSVM_USE_SYSTEM_VIRGLRENDERER=1 RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
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
|
||||
#!/bin/sh
|
||||
# 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
|
||||
|
340
.gitlab-ci/container/build-deqp.sh
Executable file → Normal file
340
.gitlab-ci/container/build-deqp.sh
Executable file → Normal file
@@ -1,321 +1,119 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/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_TEST_GL_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -ue -o pipefail
|
||||
|
||||
# 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=a9988483c0864d7190e5e6264ccead95423dfd00
|
||||
DEQP_VK_VERSION=1.4.1.1
|
||||
DEQP_GL_VERSION=4.6.5.0
|
||||
DEQP_GLES_VERSION=3.2.11.0
|
||||
|
||||
# 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
|
||||
# directory `$OLDPWD/.gitlab-ci/container/patches/` listed in cts_patch_files).
|
||||
# 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 :)
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
main_cts_patch_files=(
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
vk_cts_commits_to_backport=(
|
||||
)
|
||||
|
||||
# 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
|
||||
)
|
||||
|
||||
if [ "${DEQP_TARGET}" = 'android' ]; then
|
||||
gl_cts_patch_files+=(
|
||||
build-deqp-gl_Allow-running-on-Android-from-the-command-line.patch
|
||||
build-deqp-gl_Android-prints-to-stdout-instead-of-logcat.patch
|
||||
)
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
||||
set -ex
|
||||
|
||||
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
|
||||
git clone \
|
||||
https://github.com/KhronosGroup/VK-GL-CTS.git \
|
||||
-b vulkan-cts-1.3.5.0 \
|
||||
--depth 1 \
|
||||
/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
|
||||
git fetch origin main
|
||||
if ! git merge-base --is-ancestor "$DEQP_MAIN_COMMIT" origin/main; then
|
||||
echo "VK-GL-CTS commit $DEQP_MAIN_COMMIT is not a commit from the main branch."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
cts_commits_to_backport=()
|
||||
|
||||
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"
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 $PATCH_URL | \
|
||||
GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am -
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"https://github.com/KhronosGroup/VK-GL-CTS/commit/$commit.patch" | git am -
|
||||
done
|
||||
|
||||
cts_patch_files="${prefix}_cts_patch_files[@]"
|
||||
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
|
||||
done
|
||||
# Fix surfaceless build.
|
||||
git am < $OLDPWD/.gitlab-ci/container/0001-Fix-build-for-the-surfaceless-and-null-WS-target-pla.patch
|
||||
|
||||
{
|
||||
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
|
||||
# Android specific patches.
|
||||
git am < $OLDPWD/.gitlab-ci/container/0001-Allow-running-on-Android-from-the-command-line.patch
|
||||
git am < $OLDPWD/.gitlab-ci/container/0002-Android-prints-to-stdout-instead-of-logcat.patch
|
||||
|
||||
# --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
|
||||
|
||||
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}
|
||||
cp /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
|
||||
cp /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
|
||||
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-x11 /deqp/modules/egl/deqp-egl
|
||||
fi
|
||||
|
||||
ninja "${deqp_build_targets[@]}"
|
||||
# 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" != tools ]; then
|
||||
# Copy out the mustpass lists we want.
|
||||
mkdir -p mustpass
|
||||
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}" = '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_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 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,40 +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/
|
||||
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "vectors.tar.zst" \
|
||||
"https://${S3_PATH_FLUSTER}/vectors.tar.zst"
|
||||
|
||||
touch /lava-files/done
|
||||
ci-fairy s3cp --token-file "${S3_JWT_FILE}" /lava-files/done "https://${S3_PATH_FLUSTER}/done"
|
||||
|
||||
# Don't include the vectors in the rootfs
|
||||
rm -fr fluster/resources/*
|
||||
fi
|
||||
|
||||
mkdir -p "${ROOTFS}/usr/local/"
|
||||
mv fluster "${ROOTFS}/usr/local/"
|
||||
|
@@ -1,17 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_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
|
||||
git checkout 16fba1b8b5d9310126bb02323d7bae3227338461
|
||||
git submodule update --init
|
||||
mkdir build
|
||||
cd build
|
||||
@@ -19,5 +12,3 @@ cmake -S .. -B . -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
ninja -C . install
|
||||
cd ../..
|
||||
rm -rf Fossilize
|
||||
|
||||
section_end fossilize
|
||||
|
@@ -1,10 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start gfxreconstruct "Building gfxreconstruct"
|
||||
|
||||
GFXRECONSTRUCT_VERSION=761837794a1e57f918a85af7000b12e531b178ae
|
||||
GFXRECONSTRUCT_VERSION=5ed3caeecc46e976c4df31e263df8451ae176c26
|
||||
|
||||
git clone https://github.com/LunarG/gfxreconstruct.git \
|
||||
--single-branch \
|
||||
@@ -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
|
@@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091 # the path is created by the script
|
||||
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start kdl "Building kdl"
|
||||
|
||||
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
|
||||
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
|
||||
)
|
||||
|
||||
rm -rf ${KDL_CHECKOUT_DIR}
|
||||
|
||||
section_end kdl
|
54
.gitlab-ci/container/build-kernel.sh
Normal file
54
.gitlab-ci/container/build-kernel.sh
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -ex
|
||||
|
||||
mkdir -p kernel
|
||||
curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 ${KERNEL_URL} \
|
||||
| tar -xj --strip-components=1 -C kernel
|
||||
pushd kernel
|
||||
|
||||
# The kernel doesn't like the gold linker (or the old lld in our debians).
|
||||
# Sneak in some override symlinks during kernel build until we can update
|
||||
# debian (they'll get blown away by the rm of the kernel dir at the end).
|
||||
mkdir -p ld-links
|
||||
for i in /usr/bin/*-ld /usr/bin/ld; do
|
||||
i=$(basename $i)
|
||||
ln -sf /usr/bin/$i.bfd ld-links/$i
|
||||
done
|
||||
|
||||
NEWPATH=$(pwd)/ld-links
|
||||
export PATH=$NEWPATH:$PATH
|
||||
|
||||
KERNEL_FILENAME=$(basename $KERNEL_URL)
|
||||
export LOCALVERSION="$KERNEL_FILENAME"
|
||||
./scripts/kconfig/merge_config.sh ${DEFCONFIG} ../.gitlab-ci/container/${KERNEL_ARCH}.config
|
||||
make ${KERNEL_IMAGE_NAME}
|
||||
for image in ${KERNEL_IMAGE_NAME}; do
|
||||
cp arch/${KERNEL_ARCH}/boot/${image} /lava-files/.
|
||||
done
|
||||
|
||||
if [[ -n ${DEVICE_TREES} ]]; then
|
||||
make dtbs
|
||||
cp ${DEVICE_TREES} /lava-files/.
|
||||
fi
|
||||
|
||||
make modules
|
||||
INSTALL_MOD_PATH=/lava-files/rootfs-${DEBIAN_ARCH}/ make modules_install
|
||||
|
||||
if [[ ${DEBIAN_ARCH} = "arm64" ]]; then
|
||||
make Image.lzma
|
||||
mkimage \
|
||||
-f auto \
|
||||
-A arm \
|
||||
-O linux \
|
||||
-d arch/arm64/boot/Image.lzma \
|
||||
-C lzma\
|
||||
-b arch/arm64/boot/dts/qcom/sdm845-cheza-r3.dtb \
|
||||
/lava-files/cheza-kernel
|
||||
KERNEL_IMAGE_NAME+=" cheza-kernel"
|
||||
fi
|
||||
|
||||
popd
|
||||
rm -rf kernel
|
||||
|
@@ -1,11 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
set -uex
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start libclc "Building libclc"
|
||||
|
||||
export LLVM_CONFIG="llvm-config-${LLVM_VERSION:?"llvm unset!"}"
|
||||
LLVM_TAG="llvmorg-15.0.7"
|
||||
export LLVM_CONFIG="llvm-config-11"
|
||||
|
||||
$LLVM_CONFIG --version
|
||||
|
||||
@@ -14,12 +11,12 @@ git config --global user.name "Mesa CI"
|
||||
git clone \
|
||||
https://github.com/llvm/llvm-project \
|
||||
--depth 1 \
|
||||
-b "${LLVM_TAG}" \
|
||||
-b llvmorg-12.0.0-rc3 \
|
||||
/llvm-project
|
||||
|
||||
mkdir /libclc
|
||||
pushd /libclc
|
||||
cmake -S /llvm-project/libclc -B . -G Ninja -DLLVM_CONFIG="$LLVM_CONFIG" -DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_SPIRV=/usr/bin/llvm-spirv
|
||||
cmake -S /llvm-project/libclc -B . -G Ninja -DLLVM_CONFIG=$LLVM_CONFIG -DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_SPIRV=/usr/bin/llvm-spirv
|
||||
ninja
|
||||
ninja install
|
||||
popd
|
||||
@@ -31,5 +28,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)
|
||||
#!/bin/bash
|
||||
# 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.110
|
||||
|
||||
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 install -C build
|
||||
meson build -D vc4=false -D freedreno=false -D etnaviv=false $EXTRA_MESON_ARGS
|
||||
ninja -C build install
|
||||
cd ..
|
||||
rm -rf "$LIBDRM_VERSION"
|
||||
|
||||
section_end libdrm
|
||||
|
@@ -1,14 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
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="13.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,12 @@
|
||||
|
||||
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.10.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,28 @@
|
||||
#!/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
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
REV="631b72944f56e688f56a08d26c8a9f3988801a08"
|
||||
REV="355ad6bcb2cb3d9e030b7c6eef2b076b0dfb4d63"
|
||||
|
||||
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,16 +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.59.0
|
||||
#
|
||||
# Also, oick a specific snapshot from rustup so the compiler doesn't drift on
|
||||
# us.
|
||||
RUST_VERSION=1.59.0-2022-02-24
|
||||
|
||||
# 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
|
||||
@@ -25,7 +26,7 @@ curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
--profile minimal \
|
||||
-y
|
||||
|
||||
rustup component add clippy rustfmt
|
||||
rustup component add 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.
|
||||
@@ -36,5 +37,3 @@ linker = "arm-linux-gnueabihf-gcc"
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
linker = "aarch64-linux-gnu-gcc"
|
||||
EOF
|
||||
|
||||
section_end rust
|
||||
|
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BUILD_TAG
|
||||
|
||||
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
|
@@ -1,40 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: MIT
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright © 2022 Collabora Limited
|
||||
# Copyright (C) 2022 Collabora Limited
|
||||
# Author: Guilherme Gallo <guilherme.gallo@collabora.com>
|
||||
#
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# KERNEL_ROOTFS_TAG
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the next
|
||||
# paragraph) shall be included in all copies or substantial portions of the
|
||||
# Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
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)
|
||||
|
||||
create_gn_args() {
|
||||
# gn can be configured to cross-compile skia and its tools
|
||||
@@ -54,10 +41,24 @@ download_skia_source() {
|
||||
# Skia cloned from https://android.googlesource.com/platform/external/skqp
|
||||
# has all needed assets tracked on git-fs
|
||||
SKQP_REPO=https://android.googlesource.com/platform/external/skqp
|
||||
SKQP_BRANCH=android-cts-11.0_r7
|
||||
|
||||
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 +67,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 +95,3 @@ popd
|
||||
rm -Rf "${SKIA_DIR}"
|
||||
|
||||
set +ex
|
||||
|
||||
section_end skqp
|
||||
|
@@ -1,12 +1,7 @@
|
||||
cc = "clang"
|
||||
cxx = "clang++"
|
||||
|
||||
extra_cflags = [
|
||||
"-Wno-error",
|
||||
|
||||
"-DSK_ENABLE_DUMP_GPU",
|
||||
"-DSK_BUILD_FOR_SKQP"
|
||||
]
|
||||
extra_cflags = [ "-DSK_ENABLE_DUMP_GPU", "-DSK_BUILD_FOR_SKQP" ]
|
||||
extra_cflags_cc = [
|
||||
"-Wno-error",
|
||||
|
||||
@@ -27,18 +22,6 @@ extra_cflags_cc = [
|
||||
"-Wno-suggest-destructor-override",
|
||||
"-Wno-return-std-move-in-c++11",
|
||||
"-Wno-extra-semi-stmt",
|
||||
"-Wno-reserved-identifier",
|
||||
"-Wno-bitwise-instead-of-logical",
|
||||
"-Wno-reserved-identifier",
|
||||
"-Wno-psabi",
|
||||
"-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"
|
||||
|
@@ -1,29 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
# When changing this file, you need to bump the following
|
||||
# .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"
|
||||
|
||||
git clone \
|
||||
https://github.com/intel/libva-utils.git \
|
||||
-b 2.18.1 \
|
||||
-b 2.13.0 \
|
||||
--depth 1 \
|
||||
/va-utils
|
||||
|
||||
pushd /va-utils
|
||||
# Too old libva in Debian 11. TODO: when this PR gets in, refer to the patch.
|
||||
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 install -C build
|
||||
meson build -D tests=true -Dprefix=/va $EXTRA_MESON_ARGS
|
||||
ninja -C build install
|
||||
popd
|
||||
rm -rf /va-utils
|
||||
|
||||
section_end va-tools
|
||||
|
@@ -1,23 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start vkd3d-proton "Building vkd3d-proton"
|
||||
|
||||
VKD3D_PROTON_COMMIT="b121e6d746341e0aaba7663e3d85f3194e8e20e1"
|
||||
VKD3D_PROTON_COMMIT="507cb3195bae32395c69763afec2b1ac078d509a"
|
||||
|
||||
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" \
|
||||
@@ -38,14 +33,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,16 @@
|
||||
|
||||
# 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_TEST_GL_TAG
|
||||
|
||||
set -uex
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start vulkan-validation "Building Vulkan validation layers"
|
||||
|
||||
VALIDATION_TAG="snapshot-2024wk39"
|
||||
VALIDATION_TAG="v1.3.238"
|
||||
|
||||
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
|
||||
cmake --install build --strip
|
||||
ninja -C build install
|
||||
popd
|
||||
rm -rf Vulkan-ValidationLayers
|
||||
|
||||
section_end vulkan-validation
|
||||
|
@@ -1,36 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -uex
|
||||
set -ex
|
||||
|
||||
uncollapsed_section_start wayland "Building Wayland"
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BUILD_TAG
|
||||
# DEBIAN_TEST_ANDROID_TAG
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# FEDORA_X86_64_BUILD_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
export LIBWAYLAND_VERSION="1.21.0"
|
||||
export WAYLAND_PROTOCOLS_VERSION="1.38"
|
||||
export LIBWAYLAND_VERSION="1.18.0"
|
||||
export WAYLAND_PROTOCOLS_VERSION="1.24"
|
||||
|
||||
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 install -C _build
|
||||
meson -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true _build $EXTRA_MESON_ARGS
|
||||
ninja -C _build install
|
||||
cd ..
|
||||
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 install -C _build
|
||||
meson _build $EXTRA_MESON_ARGS
|
||||
ninja -C _build install
|
||||
cd ..
|
||||
rm -rf wayland-protocols
|
||||
|
||||
section_end wayland
|
||||
|
@@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# When changing this file, check if the *_BUIL_TAG 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,12 +1,10 @@
|
||||
#!/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
|
||||
rm -rf /root/.cargo
|
||||
# Clean up any build cache for rust.
|
||||
rm -rf /.cargo
|
||||
|
||||
if test -x /usr/bin/ccache; then
|
||||
|
@@ -13,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"
|
||||
@@ -23,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'
|
||||
|
@@ -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/pkg-config']
|
||||
|
||||
[host_machine]
|
||||
system = 'android'
|
||||
|
@@ -47,8 +47,7 @@ if [[ -n "$GCC_ARCH" ]]; then
|
||||
echo "set(CMAKE_SYSTEM_PROCESSOR arm)";
|
||||
echo "set(CMAKE_C_COMPILER /usr/lib/ccache/$GCC_ARCH-gcc)";
|
||||
echo "set(CMAKE_CXX_COMPILER /usr/lib/ccache/$GCC_ARCH-g++)";
|
||||
echo "set(CMAKE_CXX_FLAGS_INIT \"-Wno-psabi\")"; # makes ABI warnings quiet for ARMv7
|
||||
echo "set(ENV{PKG_CONFIG} \"/usr/bin/$GCC_ARCH-pkgconf\")";
|
||||
echo "set(ENV{PKG_CONFIG} \"/usr/bin/$GCC_ARCH-pkg-config\")";
|
||||
echo "set(DE_CPU $DE_CPU)";
|
||||
} > "$toolchain_file"
|
||||
fi
|
||||
|
325
.gitlab-ci/container/create-rootfs.sh
Normal file
325
.gitlab-ci/container/create-rootfs.sh
Normal file
@@ -0,0 +1,325 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2140 # ugly array, remove later
|
||||
# shellcheck disable=SC2288 # ugly array, remove later
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -ex
|
||||
|
||||
if [ $DEBIAN_ARCH = arm64 ]; then
|
||||
ARCH_PACKAGES="firmware-qcom-media
|
||||
firmware-linux-nonfree
|
||||
libfontconfig1
|
||||
libgl1
|
||||
libglu1-mesa
|
||||
libvulkan-dev
|
||||
"
|
||||
elif [ $DEBIAN_ARCH = amd64 ]; then
|
||||
# Add llvm 13 to the build image
|
||||
apt-get -y install --no-install-recommends curl gnupg2 software-properties-common
|
||||
apt-key add /llvm-snapshot.gpg.key
|
||||
add-apt-repository "deb https://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main"
|
||||
# Debian bullseye has older wine 5.0, we want >= 7.0 for traces.
|
||||
apt-key add /winehq.gpg.key
|
||||
apt-add-repository https://dl.winehq.org/wine-builds/debian/
|
||||
|
||||
|
||||
ARCH_PACKAGES="firmware-amd-graphics
|
||||
inetutils-syslogd
|
||||
iptables
|
||||
libcap2
|
||||
libfontconfig1
|
||||
libelf1
|
||||
libfdt1
|
||||
libgl1
|
||||
libglu1-mesa
|
||||
libllvm13
|
||||
libllvm11
|
||||
libva2
|
||||
libva-drm2
|
||||
libvulkan-dev
|
||||
socat
|
||||
spirv-tools
|
||||
sysvinit-core
|
||||
"
|
||||
|
||||
elif [ $DEBIAN_ARCH = armhf ]; then
|
||||
ARCH_PACKAGES="firmware-misc-nonfree
|
||||
"
|
||||
fi
|
||||
|
||||
INSTALL_CI_FAIRY_PACKAGES="git
|
||||
python3-dev
|
||||
python3-pip
|
||||
python3-setuptools
|
||||
python3-wheel
|
||||
"
|
||||
|
||||
apt-get update
|
||||
apt-get -y install --no-install-recommends \
|
||||
$ARCH_PACKAGES \
|
||||
$INSTALL_CI_FAIRY_PACKAGES \
|
||||
$EXTRA_LOCAL_PACKAGES \
|
||||
bash \
|
||||
ca-certificates \
|
||||
curl \
|
||||
firmware-realtek \
|
||||
initramfs-tools \
|
||||
jq \
|
||||
libasan6 \
|
||||
libexpat1 \
|
||||
libpng16-16 \
|
||||
libpython3.9 \
|
||||
libsensors5 \
|
||||
libvulkan1 \
|
||||
libwaffle-1-0 \
|
||||
libx11-6 \
|
||||
libx11-xcb1 \
|
||||
libxcb-dri2-0 \
|
||||
libxcb-dri3-0 \
|
||||
libxcb-glx0 \
|
||||
libxcb-present0 \
|
||||
libxcb-randr0 \
|
||||
libxcb-shm0 \
|
||||
libxcb-sync1 \
|
||||
libxcb-xfixes0 \
|
||||
libxdamage1 \
|
||||
libxext6 \
|
||||
libxfixes3 \
|
||||
libxkbcommon0 \
|
||||
libxrender1 \
|
||||
libxshmfence1 \
|
||||
libxxf86vm1 \
|
||||
netcat-openbsd \
|
||||
python3 \
|
||||
python3-lxml \
|
||||
python3-mako \
|
||||
python3-numpy \
|
||||
python3-packaging \
|
||||
python3-pil \
|
||||
python3-renderdoc \
|
||||
python3-requests \
|
||||
python3-simplejson \
|
||||
python3-yaml \
|
||||
sntp \
|
||||
strace \
|
||||
waffle-utils \
|
||||
weston \
|
||||
xinit \
|
||||
xserver-xorg-core \
|
||||
xwayland \
|
||||
zstd
|
||||
|
||||
|
||||
if [ "$DEBIAN_ARCH" = "amd64" ]; then
|
||||
# workaround wine needing 32-bit
|
||||
# https://bugs.winehq.org/show_bug.cgi?id=53393
|
||||
apt-get install -y --no-remove wine-stable-amd64 # a requirement for wine-stable
|
||||
WINE_PKG="wine-stable"
|
||||
WINE_PKG_DROP="wine-stable-i386"
|
||||
apt download "${WINE_PKG}"
|
||||
dpkg --ignore-depends="${WINE_PKG_DROP}" -i "${WINE_PKG}"*.deb
|
||||
rm "${WINE_PKG}"*.deb
|
||||
sed -i "/${WINE_PKG_DROP}/d" /var/lib/dpkg/status
|
||||
apt-get install -y --no-remove winehq-stable # symlinks-only, depends on wine-stable
|
||||
fi
|
||||
|
||||
# Needed for ci-fairy, this revision is able to upload files to
|
||||
# MinIO and doesn't depend on git
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
# Needed for manipulation with traces yaml files.
|
||||
pip3 install yq
|
||||
|
||||
apt-get purge -y \
|
||||
$INSTALL_CI_FAIRY_PACKAGES
|
||||
|
||||
passwd root -d
|
||||
chsh -s /bin/sh
|
||||
|
||||
cat > /init <<EOF
|
||||
#!/bin/sh
|
||||
export PS1=lava-shell:
|
||||
exec sh
|
||||
EOF
|
||||
chmod +x /init
|
||||
|
||||
#######################################################################
|
||||
# Strip the image to a small minimal system without removing the debian
|
||||
# toolchain.
|
||||
|
||||
# Copy timezone file and remove tzdata package
|
||||
rm -rf /etc/localtime
|
||||
cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
||||
|
||||
UNNEEDED_PACKAGES="
|
||||
libfdisk1
|
||||
"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Removing unused packages
|
||||
for PACKAGE in ${UNNEEDED_PACKAGES}
|
||||
do
|
||||
echo ${PACKAGE}
|
||||
if ! apt-get remove --purge --yes "${PACKAGE}"
|
||||
then
|
||||
echo "WARNING: ${PACKAGE} isn't installed"
|
||||
fi
|
||||
done
|
||||
|
||||
apt-get autoremove --yes || true
|
||||
|
||||
# Dropping logs
|
||||
rm -rf /var/log/*
|
||||
|
||||
# Dropping documentation, localization, i18n files, etc
|
||||
rm -rf /usr/share/doc/*
|
||||
rm -rf /usr/share/locale/*
|
||||
rm -rf /usr/share/X11/locale/*
|
||||
rm -rf /usr/share/man
|
||||
rm -rf /usr/share/i18n/*
|
||||
rm -rf /usr/share/info/*
|
||||
rm -rf /usr/share/lintian/*
|
||||
rm -rf /usr/share/common-licenses/*
|
||||
rm -rf /usr/share/mime/*
|
||||
|
||||
# Dropping reportbug scripts
|
||||
rm -rf /usr/share/bug
|
||||
|
||||
# Drop udev hwdb not required on a stripped system
|
||||
rm -rf /lib/udev/hwdb.bin /lib/udev/hwdb.d/*
|
||||
|
||||
# Drop all gconv conversions && binaries
|
||||
rm -rf usr/bin/iconv
|
||||
rm -rf usr/sbin/iconvconfig
|
||||
rm -rf usr/lib/*/gconv/
|
||||
|
||||
# Remove libusb database
|
||||
rm -rf usr/sbin/update-usbids
|
||||
rm -rf var/lib/usbutils/usb.ids
|
||||
rm -rf usr/share/misc/usb.ids
|
||||
|
||||
rm -rf /root/.pip
|
||||
|
||||
#######################################################################
|
||||
# Crush into a minimal production image to be deployed via some type of image
|
||||
# updating system.
|
||||
# IMPORTANT: The Debian system is not longer functional at this point,
|
||||
# for example, apt and dpkg will stop working
|
||||
|
||||
UNNEEDED_PACKAGES="apt libapt-pkg6.0 "\
|
||||
"ncurses-bin ncurses-base libncursesw6 libncurses6 "\
|
||||
"perl-base "\
|
||||
"debconf libdebconfclient0 "\
|
||||
"e2fsprogs e2fslibs libfdisk1 "\
|
||||
"insserv "\
|
||||
"udev "\
|
||||
"init-system-helpers "\
|
||||
"cpio "\
|
||||
"passwd "\
|
||||
"libsemanage1 libsemanage-common "\
|
||||
"libsepol1 "\
|
||||
"gpgv "\
|
||||
"hostname "\
|
||||
"adduser "\
|
||||
"debian-archive-keyring "\
|
||||
"libegl1-mesa-dev "\
|
||||
"libegl-mesa0 "\
|
||||
"libgl1-mesa-dev "\
|
||||
"libgl1-mesa-dri "\
|
||||
"libglapi-mesa "\
|
||||
"libgles2-mesa-dev "\
|
||||
"libglx-mesa0 "\
|
||||
"mesa-common-dev "\
|
||||
"gnupg2 "\
|
||||
"software-properties-common " \
|
||||
|
||||
# Removing unneeded packages
|
||||
for PACKAGE in ${UNNEEDED_PACKAGES}
|
||||
do
|
||||
echo "Forcing removal of ${PACKAGE}"
|
||||
if ! dpkg --purge --force-remove-essential --force-depends "${PACKAGE}"
|
||||
then
|
||||
echo "WARNING: ${PACKAGE} isn't installed"
|
||||
fi
|
||||
done
|
||||
|
||||
# Show what's left package-wise before dropping dpkg itself
|
||||
COLUMNS=300 dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' | sort -k1,1n
|
||||
|
||||
# Drop dpkg
|
||||
dpkg --purge --force-remove-essential --force-depends dpkg
|
||||
|
||||
# No apt or dpkg, no need for its configuration archives
|
||||
rm -rf etc/apt
|
||||
rm -rf etc/dpkg
|
||||
|
||||
# Drop directories not part of ostree
|
||||
# Note that /var needs to exist as ostree bind mounts the deployment /var over
|
||||
# it
|
||||
rm -rf var/* srv share
|
||||
|
||||
# ca-certificates are in /etc drop the source
|
||||
rm -rf usr/share/ca-certificates
|
||||
|
||||
# No need for completions
|
||||
rm -rf usr/share/bash-completion
|
||||
|
||||
# No zsh, no need for comletions
|
||||
rm -rf usr/share/zsh/vendor-completions
|
||||
|
||||
# drop gcc python helpers
|
||||
rm -rf usr/share/gcc
|
||||
|
||||
# Drop sysvinit leftovers
|
||||
rm -rf etc/init.d
|
||||
rm -rf etc/rc[0-6S].d
|
||||
|
||||
# Drop upstart helpers
|
||||
rm -rf etc/init
|
||||
|
||||
# Various xtables helpers
|
||||
rm -rf usr/lib/xtables
|
||||
|
||||
# Drop all locales
|
||||
# TODO: only remaining locale is actually "C". Should we really remove it?
|
||||
rm -rf usr/lib/locale/*
|
||||
|
||||
# partition helpers
|
||||
rm -rf usr/sbin/*fdisk
|
||||
|
||||
# local compiler
|
||||
rm -rf usr/bin/localedef
|
||||
|
||||
# Systemd dns resolver
|
||||
find usr etc -name '*systemd-resolve*' -prune -exec rm -r {} \;
|
||||
|
||||
# Systemd network configuration
|
||||
find usr etc -name '*networkd*' -prune -exec rm -r {} \;
|
||||
|
||||
# systemd ntp client
|
||||
find usr etc -name '*timesyncd*' -prune -exec rm -r {} \;
|
||||
|
||||
# systemd hw database manager
|
||||
find usr etc -name '*systemd-hwdb*' -prune -exec rm -r {} \;
|
||||
|
||||
# No need for fuse
|
||||
find usr etc -name '*fuse*' -prune -exec rm -r {} \;
|
||||
|
||||
# lsb init function leftovers
|
||||
rm -rf usr/lib/lsb
|
||||
|
||||
# Only needed when adding libraries
|
||||
rm -rf usr/sbin/ldconfig*
|
||||
|
||||
# Games, unused
|
||||
rmdir usr/games
|
||||
|
||||
# Remove pam module to authenticate against a DB
|
||||
# plus libdb-5.3.so that is only used by this pam module
|
||||
rm -rf usr/lib/*/security/pam_userdb.so
|
||||
rm -rf usr/lib/*/libdb-5.3.so
|
||||
|
||||
# remove NSS support for nis, nisplus and hesiod
|
||||
rm -rf usr/lib/*/libnss_hesiod*
|
||||
rm -rf usr/lib/*/libnss_nis*
|
@@ -1,72 +1,66 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
# 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!}"
|
||||
|
||||
# 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 \
|
||||
$STABLE_EPHEMERAL \
|
||||
curl \
|
||||
crossbuild-essential-$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
|
||||
# See the list of available architectures in https://apt.llvm.org/bullseye/dists/llvm-toolchain-bullseye-13/main/
|
||||
if [[ $arch == "s390x" ]] || [[ $arch == "i386" ]] || [[ $arch == "arm64" ]]; then
|
||||
LLVM=13
|
||||
else
|
||||
LLVM=11
|
||||
fi
|
||||
|
||||
# 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-13 libclang-cpp13
|
||||
|
||||
# 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}:$arch \
|
||||
libgcc-s1:$arch \
|
||||
libtinfo-dev:$arch \
|
||||
libz3-dev:$arch \
|
||||
llvm-${LLVM}:$arch \
|
||||
zlib1g
|
||||
fi
|
||||
|
||||
@@ -77,19 +71,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}-{dev,tools}:$arch
|
||||
dpkg -i --force-depends llvm-${LLVM}-*_${arch}.deb
|
||||
rm llvm-${LLVM}-*_${arch}.deb
|
||||
fi
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user