Compare commits
1 Commits
zink-backp
...
mesa-25.1.
Author | SHA1 | Date | |
---|---|---|---|
|
b2f79a5e1a |
@@ -74,6 +74,3 @@ c7bf3b69ebc8f2252dbf724a4de638e6bb2ac402
|
||||
|
||||
# ir3: reformat after previous commit
|
||||
7210054db8cfb445a8ccdeacfdcfecccf44fa266
|
||||
|
||||
# freedreno/a6xx: The great register renaming
|
||||
7fd99c88b9cd5c0c8c1cb3e92383acac5cb8220b
|
||||
|
2
.github/workflows/macos.yml
vendored
2
.github/workflows/macos.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
[binaries]
|
||||
llvm-config = '/usr/local/opt/llvm/bin/llvm-config'
|
||||
EOL
|
||||
$MESON_EXEC . build --native-file=native_config -Dmoltenvk-dir=$(brew --prefix molten-vk) -Dbuild-tests=true -Dgallium-drivers=swrast,zink -Dglx=${{ matrix.glx_option }}
|
||||
$MESON_EXEC . build --native-file=native_config -Dmoltenvk-dir=$(brew --prefix molten-vk) -Dbuild-tests=true -Dosmesa=true -Dgallium-drivers=swrast,zink -Dglx=${{ matrix.glx_option }}
|
||||
- name: Build
|
||||
run: $MESON_EXEC compile -C build
|
||||
- name: Test
|
||||
|
226
.gitlab-ci.yml
226
.gitlab-ci.yml
@@ -30,11 +30,11 @@ workflow:
|
||||
# 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
|
||||
# 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
|
||||
# merge pipeline
|
||||
- if: &is-merge-attempt $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
variables:
|
||||
MESA_CI_PERFORMANCE_ENABLED: 1
|
||||
@@ -45,22 +45,13 @@ workflow:
|
||||
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
|
||||
# post-merge pipeline
|
||||
- if: &is-post-merge $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "push"
|
||||
variables:
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:high
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:high-kvm
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:high-aarch64
|
||||
# Pre-merge pipeline (because merge pipelines are already caught above)
|
||||
- if: &is-merge-request $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
# Pre-merge pipeline
|
||||
- if: &is-pre-merge $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
# Push to a branch on a fork
|
||||
- if: &is-push-to-fork $CI_PROJECT_NAMESPACE != "mesa" && $CI_PIPELINE_SOURCE == "push"
|
||||
# a pipeline running within the upstream project
|
||||
- if: &is-upstream-pipeline $CI_PROJECT_PATH == $FDO_UPSTREAM_REPO
|
||||
# an MR pipeline running within the upstream project, usually true for
|
||||
# those with the Developer role or above
|
||||
- if: &is-upstream-mr-pipeline $CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
# Nightly pipeline
|
||||
- if: &is-fork-push $CI_PROJECT_NAMESPACE != "mesa" && $CI_PIPELINE_SOURCE == "push"
|
||||
# nightly pipeline
|
||||
- if: &is-scheduled-pipeline $CI_PIPELINE_SOURCE == "schedule"
|
||||
variables:
|
||||
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:low
|
||||
@@ -71,28 +62,28 @@ workflow:
|
||||
# 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 to the default branch that bypassed the CI
|
||||
- if: &is-push-to-upstream-default-branch $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||
# 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
|
||||
variables:
|
||||
JOB_PRIORITY: 70
|
||||
# Pipeline for direct pushes from release maintainer
|
||||
- if: &is-push-to-upstream-staging-branch $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME =~ /^staging\//
|
||||
# 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
|
||||
|
||||
|
||||
variables:
|
||||
FDO_UPSTREAM_REPO: mesa/mesa
|
||||
MESA_TEMPLATES_COMMIT: &ci-templates-commit c6aeb16f86e32525fa630fb99c66c4f3e62fc3cb
|
||||
MESA_TEMPLATES_COMMIT: &ci-templates-commit 48e4b6c9a2015f969fbe648999d16d5fb3eef6c4
|
||||
CI_PRE_CLONE_SCRIPT: |-
|
||||
set -o xtrace
|
||||
curl --silent --location --fail --retry-connrefused --retry 3 --retry-delay 10 \
|
||||
${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh | bash
|
||||
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}' &&
|
||||
S3_JWT_FILE_SCRIPT= &&
|
||||
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
|
||||
@@ -107,8 +98,6 @@ variables:
|
||||
S3_TRACIE_RESULTS_BUCKET: mesa-tracie-results
|
||||
S3_TRACIE_PUBLIC_BUCKET: mesa-tracie-public
|
||||
S3_TRACIE_PRIVATE_BUCKET: mesa-tracie-private
|
||||
# Base path used for various artifacts
|
||||
S3_BASE_PATH: "${S3_HOST}/${S3_KERNEL_BUCKET}"
|
||||
# per-pipeline artifact storage on MinIO
|
||||
PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/${S3_ARTIFACTS_BUCKET}/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
|
||||
# per-job artifact storage on MinIO
|
||||
@@ -133,21 +122,17 @@ variables:
|
||||
CI_TRON_JOB_PRIORITY_TAG: ci-tron:priority:low
|
||||
JOB_PRIORITY: 50
|
||||
DATA_STORAGE_PATH: data_storage
|
||||
KERNEL_IMAGE_BASE: "https://$S3_HOST/$S3_KERNEL_BUCKET/$KERNEL_REPO/$KERNEL_TAG"
|
||||
# Mesa-specific variables that shouldn't be forwarded to DUTs and crosvm
|
||||
CI_EXCLUDE_ENV_VAR_REGEX: 'SCRIPTS_DIR|RESULTS_DIR'
|
||||
|
||||
CI_TRON_JOB_TEMPLATE_PROJECT: &ci-tron-template-project gfx-ci/ci-tron
|
||||
CI_TRON_JOB_TEMPLATE_COMMIT: &ci-tron-template-commit ddadab0006e43f1365cd30779f565b444a6538ee
|
||||
CI_TRON_JOB_TEMPLATE_PROJECT_URL: "https://gitlab.freedesktop.org/$CI_TRON_JOB_TEMPLATE_PROJECT"
|
||||
|
||||
|
||||
default:
|
||||
timeout: 1m # catch any jobs which don't specify a timeout
|
||||
timeout: 1m # catch any jobs which don't specify a timeout
|
||||
id_tokens:
|
||||
S3_JWT:
|
||||
aud: https://s3.freedesktop.org
|
||||
before_script:
|
||||
- |
|
||||
if [ -z "${KERNEL_IMAGE_BASE:-}" ]; then
|
||||
export KERNEL_IMAGE_BASE="https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${EXTERNAL_KERNEL_TAG:-$KERNEL_TAG}"
|
||||
fi
|
||||
- >
|
||||
export SCRIPTS_DIR=$(mktemp -d) &&
|
||||
curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 -O --output-dir "${SCRIPTS_DIR}" "${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/setup-test-env.sh" &&
|
||||
@@ -181,41 +166,39 @@ stages:
|
||||
- build-only
|
||||
- code-validation
|
||||
- amd
|
||||
- amd-nightly
|
||||
- amd-postmerge
|
||||
- intel
|
||||
- intel-nightly
|
||||
- intel-postmerge
|
||||
- nouveau
|
||||
- nouveau-nightly
|
||||
- nouveau-postmerge
|
||||
- arm
|
||||
- arm-nightly
|
||||
- arm-postmerge
|
||||
- broadcom
|
||||
- broadcom-nightly
|
||||
- broadcom-postmerge
|
||||
- freedreno
|
||||
- freedreno-nightly
|
||||
- freedreno-postmerge
|
||||
- etnaviv
|
||||
- etnaviv-nightly
|
||||
- etnaviv-postmerge
|
||||
- software-renderer
|
||||
- software-renderer-nightly
|
||||
- software-renderer-postmerge
|
||||
- layered-backends
|
||||
- layered-backends-nightly
|
||||
- layered-backends-postmerge
|
||||
- performance
|
||||
- deploy
|
||||
|
||||
include:
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: 16bc29078de5e0a067ff84a1a199a3760d3b3811
|
||||
file:
|
||||
- '/templates/ci-fairy.yml'
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *ci-templates-commit
|
||||
file:
|
||||
- '/templates/alpine.yml'
|
||||
- '/templates/debian.yml'
|
||||
- '/templates/fedora.yml'
|
||||
- '/templates/ci-fairy.yml'
|
||||
- project: *ci-tron-template-project
|
||||
ref: *ci-tron-template-commit
|
||||
file: '/.gitlab-ci/dut.yml'
|
||||
- local: '.gitlab-ci/image-tags.yml'
|
||||
- local: '.gitlab-ci/bare-metal/gitlab-ci.yml'
|
||||
- local: '.gitlab-ci/ci-tron/gitlab-ci.yml'
|
||||
- local: '.gitlab-ci/lava/gitlab-ci.yml'
|
||||
- local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
|
||||
- local: '.gitlab-ci/container/gitlab-ci.yml'
|
||||
- local: '.gitlab-ci/build/gitlab-ci.yml'
|
||||
- local: '.gitlab-ci/test/gitlab-ci.yml'
|
||||
@@ -228,7 +211,7 @@ include:
|
||||
# Rules applied to every job in the pipeline
|
||||
.common-rules:
|
||||
rules:
|
||||
- if: *is-push-to-fork
|
||||
- if: *is-fork-push
|
||||
when: manual
|
||||
|
||||
.never-post-merge-rules:
|
||||
@@ -239,57 +222,7 @@ include:
|
||||
|
||||
# Note: make sure the branches in this list are the same as in
|
||||
# `.build-only-delayed-rules` below.
|
||||
.container-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]
|
||||
# Only rebuild containers in merge pipelines if any tags have been
|
||||
# changed, else we'll just use the already-built containers
|
||||
- if: *is-merge-attempt
|
||||
changes: &image_tags_path
|
||||
- .gitlab-ci/image-tags.yml
|
||||
when: on_success
|
||||
# Skip everything for pre-merge and merge pipelines which don't change
|
||||
# anything in the build; we only do this for marge-bot and not user
|
||||
# pipelines in a MR, because we might still need to run it to copy the
|
||||
# container into the user's namespace.
|
||||
- if: *is-merge-attempt
|
||||
when: never
|
||||
# Any MR pipeline which changes image-tags.yml needs to be able to
|
||||
# rebuild the containers
|
||||
- if: *is-merge-request
|
||||
changes: *image_tags_path
|
||||
when: manual
|
||||
# ... if the MR pipeline runs as mesa/mesa and does not need a container
|
||||
# rebuild, we can skip it
|
||||
- if: *is-upstream-mr-pipeline
|
||||
when: never
|
||||
# ... however for MRs running inside the user namespace, we may need to
|
||||
# run these jobs to copy the container images from upstream
|
||||
- if: *is-merge-request
|
||||
when: manual
|
||||
# Build everything after someone bypassed the CI
|
||||
- if: *is-push-to-upstream-default-branch
|
||||
when: on_success
|
||||
# Build everything when pushing to staging branches
|
||||
- if: *is-push-to-upstream-staging-branch
|
||||
when: on_success
|
||||
# Scheduled pipelines reuse already-built containers
|
||||
- if: *is-scheduled-pipeline
|
||||
when: never
|
||||
# Any other pipeline in the upstream should reuse already-built containers
|
||||
- if: *is-upstream-pipeline
|
||||
when: never
|
||||
# Allow building everything in fork pipelines, but build nothing unless
|
||||
# manually triggered
|
||||
- when: manual
|
||||
|
||||
# Note: make sure the branches in this list are the same as in
|
||||
# `.build-only-delayed-rules` below.
|
||||
.build-rules:
|
||||
.container+build-rules:
|
||||
rules:
|
||||
- !reference [.common-rules, rules]
|
||||
# Run when re-enabling a disabled farm, but not when disabling it
|
||||
@@ -322,20 +255,21 @@ include:
|
||||
- src/**/*
|
||||
when: on_success
|
||||
# Same as above, but for pre-merge pipelines
|
||||
- if: *is-merge-request
|
||||
changes: *all_paths
|
||||
- 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-merge-request
|
||||
- if: *is-pre-merge
|
||||
when: never
|
||||
# Build everything after someone bypassed the CI
|
||||
- if: *is-push-to-upstream-default-branch
|
||||
- if: *is-direct-push
|
||||
when: on_success
|
||||
# Build everything when pushing to staging branches
|
||||
- if: *is-push-to-upstream-staging-branch
|
||||
- if: *is-staging-push
|
||||
when: on_success
|
||||
# Build everything in scheduled pipelines
|
||||
- if: *is-scheduled-pipeline
|
||||
@@ -362,21 +296,21 @@ include:
|
||||
when: delayed
|
||||
start_in: &build-delay 5 minutes
|
||||
# Same as above, but for pre-merge pipelines
|
||||
- if: *is-merge-request
|
||||
- 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-merge-request
|
||||
- if: *is-pre-merge
|
||||
when: never
|
||||
# Build everything after someone bypassed the CI
|
||||
- if: *is-push-to-upstream-default-branch
|
||||
- if: *is-direct-push
|
||||
when: delayed
|
||||
start_in: *build-delay
|
||||
# Build everything when pushing to staging branches
|
||||
- if: *is-push-to-upstream-staging-branch
|
||||
- if: *is-staging-push
|
||||
when: delayed
|
||||
start_in: *build-delay
|
||||
# Build everything in scheduled pipelines
|
||||
@@ -387,15 +321,47 @@ include:
|
||||
# manually triggered
|
||||
- when: manual
|
||||
|
||||
|
||||
.ci-deqp-artifacts:
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
|
||||
when: always
|
||||
untracked: false
|
||||
paths:
|
||||
# Watch out! Artifacts are relative to the build dir.
|
||||
# https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
|
||||
- artifacts
|
||||
- _build/meson-logs/*.txt
|
||||
- _build/meson-logs/strace
|
||||
- _build/.ninja_log
|
||||
|
||||
# Git archive
|
||||
|
||||
make git archive:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: git-archive
|
||||
rules:
|
||||
- !reference [.scheduled_pipeline-rules, rules]
|
||||
script:
|
||||
# Compactify the .git directory
|
||||
- git gc --aggressive
|
||||
# Download & cache the perfetto subproject as well.
|
||||
- rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl --fail https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
|
||||
# compress the current folder
|
||||
- tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
|
||||
|
||||
- s3_upload ../$CI_PROJECT_NAME.tar.gz "https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/"
|
||||
|
||||
# Sanity checks of MR settings and commit logs
|
||||
sanity:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: sanity
|
||||
tags:
|
||||
- placeholder-job
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
rules:
|
||||
- if: *is-merge-request
|
||||
- if: *is-pre-merge
|
||||
when: on_success
|
||||
- when: never
|
||||
variables:
|
||||
@@ -408,14 +374,14 @@ sanity:
|
||||
image_tags=(
|
||||
ALPINE_X86_64_BUILD_TAG
|
||||
ALPINE_X86_64_LAVA_SSH_TAG
|
||||
ALPINE_X86_64_LAVA_TRIGGER_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
|
||||
FIRMWARE_TAG
|
||||
KERNEL_ROOTFS_TAG
|
||||
KERNEL_TAG
|
||||
PKG_REPO_REV
|
||||
WINDOWS_X64_BUILD_TAG
|
||||
@@ -435,3 +401,31 @@ sanity:
|
||||
reports:
|
||||
junit: check-*.xml
|
||||
|
||||
|
||||
mr-label-maker-test:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: sanity
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
rules:
|
||||
- !reference [.mr-label-maker-rules, rules]
|
||||
variables:
|
||||
GIT_STRATEGY: fetch
|
||||
timeout: 10m
|
||||
script:
|
||||
- set -eu
|
||||
- python3 -m venv .venv
|
||||
- source .venv/bin/activate
|
||||
- pip install git+https://gitlab.freedesktop.org/freedesktop/mr-label-maker
|
||||
- mr-label-maker --dry-run --mr $CI_MERGE_REQUEST_IID
|
||||
|
||||
# Jobs that need to pass before spending hardware resources on further testing
|
||||
.required-for-hardware-jobs:
|
||||
needs:
|
||||
- job: rustfmt
|
||||
optional: true
|
||||
artifacts: false
|
||||
- job: yaml-toml-shell-py-test
|
||||
optional: true
|
||||
artifacts: false
|
||||
|
@@ -4,10 +4,8 @@
|
||||
|
||||
. "${SCRIPTS_DIR}/setup-test-env.sh"
|
||||
|
||||
ci_tag_test_time_check "ANDROID_CTS_TAG"
|
||||
|
||||
export PATH=/android-tools/build-tools:/android-cts/jdk/bin/:$PATH
|
||||
export JAVA_HOME=/android-cts/jdk
|
||||
export PATH=/android-tools/android-cts/jdk/bin/:/android-tools/build-tools:$PATH
|
||||
export JAVA_HOME=/android-tools/android-cts/jdk
|
||||
|
||||
# Wait for the appops service to show up
|
||||
while [ "$($ADB shell dumpsys -l | grep appops)" = "" ] ; do sleep 1; done
|
||||
@@ -16,59 +14,31 @@ SKIP_FILE="$INSTALL/${GPU_VERSION}-android-cts-skips.txt"
|
||||
|
||||
EXCLUDE_FILTERS=""
|
||||
if [ -e "$SKIP_FILE" ]; then
|
||||
EXCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$SKIP_FILE" | sed -e 's/\s*$//g' -e 's/.*/--exclude-filter "\0" /g')"
|
||||
EXCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$SKIP_FILE" | sed -s 's/.*/--exclude-filter "\0" /g')"
|
||||
fi
|
||||
|
||||
INCLUDE_FILE="$INSTALL/${GPU_VERSION}-android-cts-include.txt"
|
||||
|
||||
if [ ! -e "$INCLUDE_FILE" ]; then
|
||||
set +x
|
||||
echo "ERROR: No include file (${GPU_VERSION}-android-cts-include.txt) found."
|
||||
echo "This means that we are running the all available CTS modules."
|
||||
echo "But the time to run it might be too long, please provide an include file instead."
|
||||
exit 1
|
||||
if [ -e "$INCLUDE_FILE" ]; then
|
||||
INCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$INCLUDE_FILE" | sed -s 's/.*/--include-filter "\0" /g')"
|
||||
else
|
||||
INCLUDE_FILTERS=$(printf -- "--include-filter %s " $ANDROID_CTS_MODULES | sed -e 's/ $//g')
|
||||
fi
|
||||
|
||||
INCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$INCLUDE_FILE" | sed -e 's/\s*$//g' -e 's/.*/--include-filter "\0" /g')"
|
||||
|
||||
if [ -n "${ANDROID_CTS_PREPARE_COMMAND:-}" ]; then
|
||||
eval "$ANDROID_CTS_PREPARE_COMMAND"
|
||||
fi
|
||||
|
||||
uncollapsed_section_switch android_cts_test "Android CTS: testing"
|
||||
|
||||
set +e
|
||||
eval "/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \
|
||||
$INCLUDE_FILTERS \
|
||||
$EXCLUDE_FILTERS
|
||||
eval "/android-tools/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \
|
||||
$EXCLUDE_FILTERS \
|
||||
$INCLUDE_FILTERS
|
||||
|
||||
SUMMARY_FILE=/android-cts/results/latest/invocation_summary.txt
|
||||
|
||||
# Parse a line like `x/y modules completed` to check that all modules completed
|
||||
COMPLETED_MODULES=$(sed -n -e '/modules completed/s/^\([0-9]\+\)\/\([0-9]\+\) .*$/\1/p' "$SUMMARY_FILE")
|
||||
AVAILABLE_MODULES=$(sed -n -e '/modules completed/s/^\([0-9]\+\)\/\([0-9]\+\) .*$/\2/p' "$SUMMARY_FILE")
|
||||
[ "$COMPLETED_MODULES" = "$AVAILABLE_MODULES" ]
|
||||
# shellcheck disable=SC2319 # False-positive see https://github.com/koalaman/shellcheck/issues/2937#issuecomment-2660891195
|
||||
MODULES_FAILED=$?
|
||||
|
||||
# Parse a line like `FAILED : x` to check that no tests failed
|
||||
[ "$(grep "^FAILED" "$SUMMARY_FILE" | tr -d ' ' | cut -d ':' -f 2)" = "0" ]
|
||||
# shellcheck disable=SC2319 # False-positive see https://github.com/koalaman/shellcheck/issues/2937#issuecomment-2660891195
|
||||
TESTS_FAILED=$?
|
||||
|
||||
[ "$MODULES_FAILED" = "0" ] && [ "$TESTS_FAILED" = "0" ]
|
||||
[ "$(grep "^FAILED" /android-tools/android-cts/results/latest/invocation_summary.txt | tr -d ' ' | cut -d ':' -f 2)" = "0" ]
|
||||
|
||||
# shellcheck disable=SC2034 # EXIT_CODE is used by the script that sources this one
|
||||
EXIT_CODE=$?
|
||||
set -e
|
||||
|
||||
mkdir "${RESULTS_DIR}/android-cts"
|
||||
cp -r "/android-cts/results/latest/" "${RESULTS_DIR}/android-cts/results"
|
||||
cp -r "/android-cts/logs/latest/" "${RESULTS_DIR}/android-cts/logs"
|
||||
section_switch cuttlefish_results "cuttlefish: gathering the results"
|
||||
|
||||
if [ -n "${ARTIFACTS_BASE_URL:-}" ]; then
|
||||
echo "============================================"
|
||||
echo "Review the Android CTS test results at: ${ARTIFACTS_BASE_URL}/results/android-cts/results/test_result.html"
|
||||
fi
|
||||
cp -r "/android-tools/android-cts/results/latest"/* $RESULTS_DIR
|
||||
cp -r "/android-tools/android-cts/logs/latest"/* $RESULTS_DIR
|
||||
|
||||
section_end android_cts_test
|
||||
section_end cuttlefish_results
|
||||
|
@@ -9,15 +9,12 @@
|
||||
$ADB shell mkdir -p /data/deqp
|
||||
$ADB push /deqp-gles/modules/egl/deqp-egl-android /data/deqp
|
||||
$ADB push /deqp-gles/mustpass/egl-main.txt.zst /data/deqp
|
||||
$ADB push /deqp-gles/modules/gles2/deqp-gles2 /data/deqp
|
||||
$ADB push /deqp-gles/mustpass/gles2-main.txt.zst /data/deqp
|
||||
$ADB push /deqp-vk/external/vulkancts/modules/vulkan/* /data/deqp
|
||||
$ADB push /deqp-vk/mustpass/vk-main.txt.zst /data/deqp
|
||||
$ADB push /deqp-tools/* /data/deqp
|
||||
$ADB push /deqp-runner/deqp-runner /data/deqp
|
||||
|
||||
$ADB push "$INSTALL/all-skips.txt" /data/deqp
|
||||
$ADB push "$INSTALL/android-skips.txt" /data/deqp
|
||||
$ADB push "$INSTALL/angle-skips.txt" /data/deqp
|
||||
if [ -e "$INSTALL/$GPU_VERSION-flakes.txt" ]; then
|
||||
$ADB push "$INSTALL/$GPU_VERSION-flakes.txt" /data/deqp
|
||||
@@ -38,28 +35,17 @@ fi
|
||||
# Default to an empty known flakes file if it doesn't exist.
|
||||
$ADB shell "touch /data/deqp/$GPU_VERSION-flakes.txt"
|
||||
|
||||
DEQP_SKIPS=""
|
||||
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
|
||||
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/$GPU_VERSION-skips.txt"
|
||||
fi
|
||||
|
||||
if [ -n "${ANGLE_TAG:-}" ]; then
|
||||
if [ -n "$ANGLE_TAG" ]; then
|
||||
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/angle-skips.txt"
|
||||
fi
|
||||
|
||||
AOSP_RESULTS=/data/deqp/results
|
||||
uncollapsed_section_switch cuttlefish_test "cuttlefish: testing"
|
||||
|
||||
# Print the detailed version with the list of backports and local patches
|
||||
{ set +x; } 2>/dev/null
|
||||
for api in vk-main vk gl gles; do
|
||||
deqp_version_log=/deqp-$api/deqp-$api-version
|
||||
if [ -r "$deqp_version_log" ]; then
|
||||
cat "$deqp_version_log"
|
||||
fi
|
||||
done
|
||||
set -x
|
||||
|
||||
set +e
|
||||
$ADB shell "mkdir ${AOSP_RESULTS}; cd ${AOSP_RESULTS}/..; \
|
||||
XDG_CACHE_HOME=/data/local/tmp \
|
||||
|
@@ -2,8 +2,6 @@
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
# shellcheck disable=SC1091 # paths only become valid at runtime
|
||||
|
||||
set -uex
|
||||
|
||||
# Set default ADB command if not set already
|
||||
|
||||
: "${ADB:=adb}"
|
||||
@@ -32,32 +30,14 @@ done
|
||||
|
||||
$ADB shell setenforce 0
|
||||
|
||||
$ADB push /android-tools/eglinfo /data
|
||||
$ADB push /android-tools/vulkaninfo /data
|
||||
# download Android Mesa from S3
|
||||
MESA_ANDROID_ARTIFACT_URL=https://${PIPELINE_ARTIFACTS_BASE}/${S3_ANDROID_ARTIFACT_NAME}.tar.zst
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -o ${S3_ANDROID_ARTIFACT_NAME}.tar.zst ${MESA_ANDROID_ARTIFACT_URL}
|
||||
mkdir /mesa-android
|
||||
tar -C /mesa-android -xvf ${S3_ANDROID_ARTIFACT_NAME}.tar.zst
|
||||
rm "${S3_ANDROID_ARTIFACT_NAME}.tar.zst" &
|
||||
|
||||
get_gles_runtime_renderer() {
|
||||
while [ "$($ADB shell XDG_CACHE_HOME=/data/local/tmp /data/eglinfo | grep 'OpenGL ES profile renderer':)" = "" ] ; do sleep 1; done
|
||||
$ADB shell XDG_CACHE_HOME=/data/local/tmp /data/eglinfo | grep 'OpenGL ES profile renderer' | head -1
|
||||
}
|
||||
|
||||
get_gles_runtime_version() {
|
||||
while [ "$($ADB shell XDG_CACHE_HOME=/data/local/tmp /data/eglinfo | grep 'OpenGL ES profile version:')" = "" ] ; do sleep 1; done
|
||||
$ADB shell XDG_CACHE_HOME=/data/local/tmp /data/eglinfo | grep 'OpenGL ES profile version:' | head -1
|
||||
}
|
||||
|
||||
get_vk_runtime_device_name() {
|
||||
$ADB shell XDG_CACHE_HOME=/data/local/tmp /data/vulkaninfo | grep deviceName | head -1
|
||||
}
|
||||
|
||||
get_vk_runtime_version() {
|
||||
$ADB shell XDG_CACHE_HOME=/data/local/tmp /data/vulkaninfo | grep driverInfo | head -1
|
||||
}
|
||||
|
||||
# Check what GLES & VK implementation is used before uploading the new libraries
|
||||
get_gles_runtime_renderer
|
||||
get_gles_runtime_version
|
||||
get_vk_runtime_device_name
|
||||
get_vk_runtime_version
|
||||
INSTALL="/mesa-android/install"
|
||||
|
||||
# replace libraries
|
||||
|
||||
@@ -83,63 +63,51 @@ $ADB shell rm -f /vendor/lib64/egl/libEGL_emulation.so*
|
||||
$ADB shell rm -f /vendor/lib64/egl/libGLESv1_CM_emulation.so*
|
||||
$ADB shell rm -f /vendor/lib64/egl/libGLESv2_emulation.so*
|
||||
|
||||
if [ -n "${ANGLE_TAG:-}" ]; then
|
||||
ANGLE_DEST_PATH=/vendor/lib64/egl
|
||||
if [ "$ANDROID_VERSION" -ge 15 ]; then
|
||||
ANGLE_DEST_PATH=/system/lib64
|
||||
fi
|
||||
|
||||
$ADB shell rm -f "$ANGLE_DEST_PATH/libEGL_angle.so"*
|
||||
$ADB shell rm -f "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"*
|
||||
$ADB shell rm -f "$ANGLE_DEST_PATH/libGLESv2_angle.so"*
|
||||
|
||||
$ADB push /angle/libEGL_angle.so "$ANGLE_DEST_PATH/libEGL_angle.so"
|
||||
$ADB push /angle/libGLESv1_CM_angle.so "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"
|
||||
$ADB push /angle/libGLESv2_angle.so "$ANGLE_DEST_PATH/libGLESv2_angle.so"
|
||||
ANGLE_DEST_PATH=/vendor/lib64/egl
|
||||
if [ "$ANDROID_VERSION" -ge 15 ]; then
|
||||
ANGLE_DEST_PATH=/system/lib64
|
||||
fi
|
||||
|
||||
# Check what GLES & VK implementation is used after uploading the new libraries
|
||||
MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION")
|
||||
get_gles_runtime_renderer
|
||||
GLES_RUNTIME_VERSION="$(get_gles_runtime_version)"
|
||||
get_vk_runtime_device_name
|
||||
VK_RUNTIME_VERSION="$(get_vk_runtime_version)"
|
||||
$ADB shell rm -f "$ANGLE_DEST_PATH/libEGL_angle.so"*
|
||||
$ADB shell rm -f "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"*
|
||||
$ADB shell rm -f "$ANGLE_DEST_PATH/libGLESv2_angle.so"*
|
||||
|
||||
if [ -n "${ANGLE_TAG:-}" ]; then
|
||||
# Note: we are injecting the ANGLE libs too, so we need to check if the
|
||||
# new ANGLE libs are being used.
|
||||
ANGLE_HASH=$(head -c 12 /angle/version)
|
||||
if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep --quiet "${ANGLE_HASH}"; then
|
||||
echo "Fatal: Android is loading a wrong version of the ANGLE libs: ${ANGLE_HASH}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
$ADB push /angle/libEGL_angle.so "$ANGLE_DEST_PATH/libEGL_angle.so"
|
||||
$ADB push /angle/libGLESv1_CM_angle.so "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"
|
||||
$ADB push /angle/libGLESv2_angle.so "$ANGLE_DEST_PATH/libGLESv2_angle.so"
|
||||
|
||||
if ! printf "%s" "$VK_RUNTIME_VERSION" | grep -Fq -- "${MESA_BUILD_VERSION}"; then
|
||||
echo "Fatal: Android is loading a wrong version of the Mesa3D Vulkan libs: ${VK_RUNTIME_VERSION}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
get_surfaceflinger_pid() {
|
||||
while [ "$($ADB shell dumpsys -l | grep 'SurfaceFlinger$')" = "" ] ; do sleep 1; done
|
||||
$ADB shell ps -A | grep -i surfaceflinger | tr -s ' ' | cut -d ' ' -f 2
|
||||
get_gles_runtime_version() {
|
||||
while [ "$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" = "" ] ; do sleep 1; done
|
||||
$ADB shell dumpsys SurfaceFlinger | grep GLES
|
||||
}
|
||||
|
||||
OLD_SF_PID=$(get_surfaceflinger_pid)
|
||||
# Check what GLES implementation is used before loading the new libraries
|
||||
get_gles_runtime_version
|
||||
|
||||
# restart Android shell, so that services use the new libraries
|
||||
$ADB shell stop
|
||||
$ADB shell start
|
||||
|
||||
# Check that SurfaceFlinger restarted, to ensure that new libraries have been picked up
|
||||
NEW_SF_PID=$(get_surfaceflinger_pid)
|
||||
# Check what GLES implementation is used after loading the new libraries
|
||||
GLES_RUNTIME_VERSION="$(get_gles_runtime_version)"
|
||||
|
||||
if [ "$OLD_SF_PID" == "$NEW_SF_PID" ]; then
|
||||
echo "Fatal: check that SurfaceFlinger restarted" 1>&2
|
||||
if [ -n "$ANGLE_TAG" ]; then
|
||||
# Note: we are injecting the ANGLE libs too, so we need to check if the
|
||||
# ANGLE libs are being used after the shell restart.
|
||||
ANGLE_HASH=$(head -c 12 /angle/version)
|
||||
if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep --quiet "${ANGLE_HASH}"; then
|
||||
echo "Fatal: Android is loading a wrong version of the ANGLE libs: ${ANGLE_HASH}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION")
|
||||
if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep --quiet "${MESA_BUILD_VERSION}$"; then
|
||||
echo "Fatal: Android is loading a wrong version of the Mesa3D GLES libs: ${GLES_RUNTIME_VERSION}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "${ANDROID_CTS_TAG:-}" ]; then
|
||||
if [ -n "$USE_ANDROID_CTS" ]; then
|
||||
# The script sets EXIT_CODE
|
||||
. "$(dirname "$0")/android-cts-runner.sh"
|
||||
else
|
||||
|
@@ -1,11 +0,0 @@
|
||||
# Skip these tests when running fractional dEQP batches, as the AHB tests are expected
|
||||
# to be handled separately in a non-fractional run within the deqp-runner suite.
|
||||
dEQP-VK.api.external.memory.android_hardware_buffer.*
|
||||
|
||||
# Skip all WSI tests: the DEQP_ANDROID_EXE build used can't create native windows, as
|
||||
# only APKs support window creation on Android.
|
||||
dEQP-VK.image.swapchain_mutable.*
|
||||
dEQP-VK.wsi.*
|
||||
|
||||
# These tests cause hangs and need to be skipped for now.
|
||||
dEQP-VK.synchronization*
|
155
.gitlab-ci/b2c/b2c.yml.jinja2.jinja2
Normal file
155
.gitlab-ci/b2c/b2c.yml.jinja2.jinja2
Normal file
@@ -0,0 +1,155 @@
|
||||
version: 1
|
||||
|
||||
# Rules to match for a machine to qualify
|
||||
target:
|
||||
id: '{{ CI_RUNNER_DESCRIPTION }}'
|
||||
|
||||
timeouts:
|
||||
|
||||
first_console_activity: # This limits the time it can take to receive the first console log
|
||||
minutes: {{ B2C_TIMEOUT_FIRST_CONSOLE_ACTIVITY_MINUTES | default(0, true) }}
|
||||
seconds: {{ B2C_TIMEOUT_FIRST_CONSOLE_ACTIVITY_SECONDS | default(0, true) }}
|
||||
retries: {{ B2C_TIMEOUT_FIRST_CONSOLE_ACTIVITY_RETRIES }}
|
||||
|
||||
console_activity: # Reset every time we receive a message from the logs
|
||||
minutes: {{ B2C_TIMEOUT_CONSOLE_ACTIVITY_MINUTES | default(0, true) }}
|
||||
seconds: {{ B2C_TIMEOUT_CONSOLE_ACTIVITY_SECONDS | default(0, true) }}
|
||||
retries: {{ B2C_TIMEOUT_CONSOLE_ACTIVITY_RETRIES }}
|
||||
|
||||
boot_cycle:
|
||||
minutes: {{ B2C_TIMEOUT_BOOT_MINUTES | default(0, true) }}
|
||||
seconds: {{ B2C_TIMEOUT_BOOT_SECONDS | default(0, true) }}
|
||||
retries: {{ B2C_TIMEOUT_BOOT_RETRIES }}
|
||||
|
||||
overall: # Maximum time the job can take, not overrideable by the "continue" deployment
|
||||
minutes: {{ B2C_TIMEOUT_OVERALL_MINUTES | default(0, true) }}
|
||||
seconds: {{ B2C_TIMEOUT_OVERALL_SECONDS | default(0, true) }}
|
||||
retries: 0
|
||||
# no retries possible here
|
||||
|
||||
watchdogs:
|
||||
boot:
|
||||
minutes: {{ B2C_TIMEOUT_BOOT_WD_MINUTES | default(0, true) }}
|
||||
seconds: {{ B2C_TIMEOUT_BOOT_WD_SECONDS | default(0, true) }}
|
||||
retries: {{ B2C_TIMEOUT_BOOT_WD_RETRIES | default(0, true) }}
|
||||
|
||||
console_patterns:
|
||||
session_end:
|
||||
regex: >-
|
||||
{{ B2C_SESSION_END_REGEX }}
|
||||
{% if B2C_SESSION_REBOOT_REGEX %}
|
||||
session_reboot:
|
||||
regex: >-
|
||||
{{ B2C_SESSION_REBOOT_REGEX }}
|
||||
{% endif %}
|
||||
job_success:
|
||||
regex: >-
|
||||
{{ B2C_JOB_SUCCESS_REGEX }}
|
||||
{% if B2C_JOB_WARN_REGEX %}
|
||||
job_warn:
|
||||
regex: >-
|
||||
{{ B2C_JOB_WARN_REGEX }}
|
||||
{% endif %}
|
||||
|
||||
{% if B2C_BOOT_WD_START_REGEX and B2C_BOOT_WD_STOP_REGEX %}
|
||||
watchdogs:
|
||||
boot:
|
||||
start:
|
||||
regex: >-
|
||||
{{ B2C_BOOT_WD_START_REGEX }}
|
||||
reset:
|
||||
regex: >-
|
||||
{{ B2C_BOOT_WD_RESET_REGEX | default(B2C_BOOT_WD_START_REGEX, true) }}
|
||||
stop:
|
||||
regex: >-
|
||||
{{ B2C_BOOT_WD_STOP_REGEX }}
|
||||
{% endif %}
|
||||
|
||||
# Environment to deploy
|
||||
deployment:
|
||||
# Initial boot
|
||||
start:
|
||||
storage:
|
||||
{% if B2C_IMAGESTORE_PLATFORM %}
|
||||
imagestore:
|
||||
public:
|
||||
# List of images that should be pulled into the image store ahead of execution
|
||||
images:
|
||||
mars:
|
||||
name: "{{ B2C_MACHINE_REGISTRATION_IMAGE }}"
|
||||
platform: "{{ B2C_IMAGESTORE_PLATFORM }}"
|
||||
tls_verify: false
|
||||
{% set machine_registration_image="{% raw %}{{ job.imagestore.public.mars.image_id }}{% endraw %}" %}
|
||||
telegraf:
|
||||
name: "{{ B2C_TELEGRAF_IMAGE }}"
|
||||
platform: "{{ B2C_IMAGESTORE_PLATFORM }}"
|
||||
tls_verify: false
|
||||
{% set telegraf_image="{% raw %}{{ job.imagestore.public.telegraf.image_id }}{% endraw %}" %}
|
||||
image_under_test:
|
||||
name: "{{ B2C_IMAGE_UNDER_TEST }}"
|
||||
platform: "{{ B2C_IMAGESTORE_PLATFORM }}"
|
||||
tls_verify: false
|
||||
{% set image_under_test="{% raw %}{{ job.imagestore.public.image_under_test.image_id }}{% endraw %}" %}
|
||||
nbd:
|
||||
storage:
|
||||
max_connections: 5
|
||||
size: 10G
|
||||
{% endif %}
|
||||
|
||||
http:
|
||||
- path: "/install.tar.zst"
|
||||
url: "{{ B2C_INSTALL_TARBALL_URL }}"
|
||||
- path: "/b2c-extra-args"
|
||||
data: >
|
||||
b2c.pipefail b2c.poweroff_delay={{ B2C_POWEROFF_DELAY }}
|
||||
b2c.minio="gateway,{{ '{{' }} minio_url }},{{ '{{' }} job_bucket_access_key }},{{ '{{' }} job_bucket_secret_key }}"
|
||||
b2c.volume="{{ '{{' }} job_bucket }}-results,mirror=gateway/{{ '{{' }} job_bucket }},pull_on=pipeline_start,push_on=changes,overwrite{% for excl in B2C_JOB_VOLUME_EXCLUSIONS.split(',') %},exclude={{ excl }}{% endfor %},remove,expiration=pipeline_end,preserve"
|
||||
{% for volume in B2C_VOLUMES %}
|
||||
b2c.volume={{ volume }}
|
||||
{% endfor %}
|
||||
b2c.run_service="--privileged --tls-verify=false --pid=host {{ B2C_TELEGRAF_IMAGE }}" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
|
||||
b2c.run="-ti --tls-verify=false {{ B2C_MACHINE_REGISTRATION_IMAGE }} {% if B2C_MARS_SETUP_TAGS %}setup --tags {{ B2C_MARS_SETUP_TAGS }}{% else %}check{% endif %}"
|
||||
b2c.run="-v {{ '{{' }} job_bucket }}-results:{{ CI_PROJECT_DIR }} -w {{ CI_PROJECT_DIR }} {% for mount_volume in B2C_MOUNT_VOLUMES %} -v {{ mount_volume }}{% endfor %} --tls-verify=false --entrypoint bash {{ B2C_IMAGE_UNDER_TEST }} -euc 'curl --fail -q {{ '{{' }} job.http.url }}/install.tar.zst | tar --zstd -x; {{ B2C_CONTAINER_CMD }}'"
|
||||
kernel:
|
||||
{% if B2C_KERNEL_URL %}
|
||||
url: '{{ B2C_KERNEL_URL }}'
|
||||
{% endif %}
|
||||
|
||||
# NOTE: b2c.cache_device should not be here, but this works around
|
||||
# a limitation of b2c which will be removed in the next release
|
||||
cmdline: >
|
||||
SALAD.machine_id={{ '{{' }} machine_id }}
|
||||
console={{ '{{' }} local_tty_device }},115200
|
||||
b2c.ntp_peer=10.42.0.1
|
||||
b2c.extra_args_url={{ '{{' }} job.http.url }}/b2c-extra-args
|
||||
{% if B2C_IMAGESTORE_PLATFORM is defined %}
|
||||
{{ '{{' }} imagestore.mount("public").nfs.to_b2c_filesystem("publicimgstore") }}
|
||||
b2c.storage="additionalimagestores=publicimgstore"
|
||||
b2c.nbd=/dev/nbd0,host=ci-gateway,port={% raw %}{{ '{{' }} job.nbd.storage.tcp_port }}{% endraw %},connections=5
|
||||
b2c.cache_device=/dev/nbd0
|
||||
{% else %}
|
||||
b2c.cache_device=auto
|
||||
{% endif %}
|
||||
{% if B2C_KERNEL_CMDLINE_EXTRAS is defined %}
|
||||
{{ B2C_KERNEL_CMDLINE_EXTRAS }}
|
||||
{% endif %}
|
||||
|
||||
{% if B2C_INITRAMFS_URL or B2C_FIRMWARE_URL %}
|
||||
initramfs:
|
||||
{% if B2C_FIRMWARE_URL %}
|
||||
- url: '{{ B2C_FIRMWARE_URL }}'
|
||||
{% endif %}
|
||||
{% if B2C_INITRAMFS_URL %}
|
||||
- url: '{{ B2C_INITRAMFS_URL }}'
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if B2C_DTB_URL %}
|
||||
dtb:
|
||||
url: '{{ B2C_DTB_URL }}'
|
||||
{% if B2C_DTB_MATCH %}
|
||||
format:
|
||||
archive:
|
||||
match: "{{ B2C_DTB_MATCH }}"
|
||||
{% endif %}
|
||||
{% endif %}
|
40
.gitlab-ci/b2c/generate_b2c.py
Executable file
40
.gitlab-ci/b2c/generate_b2c.py
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright © 2022 Valve Corporation
|
||||
#
|
||||
# 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.
|
||||
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
from os import environ, path
|
||||
|
||||
|
||||
# Pass through all the CI and B2C environment variables
|
||||
values = {
|
||||
key: environ[key]
|
||||
for key in environ if key.startswith("B2C_") or key.startswith("CI_")
|
||||
}
|
||||
|
||||
env = Environment(loader=FileSystemLoader(path.dirname(environ['B2C_JOB_TEMPLATE'])),
|
||||
trim_blocks=True, lstrip_blocks=True)
|
||||
|
||||
template = env.get_template(path.basename(environ['B2C_JOB_TEMPLATE']))
|
||||
|
||||
with open(path.splitext(path.basename(environ['B2C_JOB_TEMPLATE']))[0], "w") as f:
|
||||
f.write(template.render(values))
|
17
.gitlab-ci/bare-metal/cisco-2960-poe-off.sh
Executable file
17
.gitlab-ci/bare-metal/cisco-2960-poe-off.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
if [ -z "$BM_POE_INTERFACE" ]; then
|
||||
echo "Must supply the PoE Interface to power down"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POE_ADDRESS" ]; then
|
||||
echo "Must supply the PoE Switch host"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SNMP_KEY="1.3.6.1.4.1.9.9.402.1.2.1.1.1.$BM_POE_INTERFACE"
|
||||
SNMP_OFF="i 4"
|
||||
|
||||
snmpset -v2c -r 3 -t 30 -cmesaci "$BM_POE_ADDRESS" "$SNMP_KEY" $SNMP_OFF
|
22
.gitlab-ci/bare-metal/cisco-2960-poe-on.sh
Executable file
22
.gitlab-ci/bare-metal/cisco-2960-poe-on.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
if [ -z "$BM_POE_INTERFACE" ]; then
|
||||
echo "Must supply the PoE Interface to power up"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POE_ADDRESS" ]; then
|
||||
echo "Must supply the PoE Switch host"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
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
|
||||
sleep 3s
|
||||
snmpset -v2c -r 3 -t 10 -cmesaci "$BM_POE_ADDRESS" "$SNMP_KEY" $SNMP_ON
|
129
.gitlab-ci/bare-metal/cros-servo.sh
Executable file
129
.gitlab-ci/bare-metal/cros-servo.sh
Executable file
@@ -0,0 +1,129 @@
|
||||
#!/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.
|
||||
|
||||
# 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
|
||||
echo "Must set BM_SERIAL in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is the CPU serial device."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_SERIAL_EC" ]; then
|
||||
echo "Must set BM_SERIAL in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is the EC serial device for controlling board power"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d /nfs ]; then
|
||||
echo "NFS rootfs directory needs to be mounted at /nfs by the gitlab runner"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d /tftp ]; then
|
||||
echo "TFTP directory for this board needs to be mounted at /tftp by the gitlab runner"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# job config checks
|
||||
if [ -z "$BM_KERNEL" ]; then
|
||||
echo "Must set BM_KERNEL to your board's kernel FIT image"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_ROOTFS" ]; then
|
||||
echo "Must set BM_ROOTFS to your board's rootfs directory in the job's variables"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_CMDLINE" ]; then
|
||||
echo "Must set BM_CMDLINE to your board's kernel command line arguments"
|
||||
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.
|
||||
rm -rf results/
|
||||
mkdir -p results
|
||||
|
||||
# Create the rootfs in the NFS directory. rm to make sure it's in a pristine
|
||||
# state, since it's volume-mounted on the host.
|
||||
rsync -a --delete $BM_ROOTFS/ /nfs/
|
||||
mkdir -p /nfs/results
|
||||
. $BM/rootfs-setup.sh /nfs
|
||||
|
||||
# Put the kernel/dtb image and the boot command line in the tftp directory for
|
||||
# the board to find. 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 is a URL, fetch it
|
||||
# instead of looking in the container. Note that the kernel build should be
|
||||
# the output of:
|
||||
#
|
||||
# make Image.lzma
|
||||
#
|
||||
# mkimage \
|
||||
# -A arm64 \
|
||||
# -f auto \
|
||||
# -C lzma \
|
||||
# -d arch/arm64/boot/Image.lzma \
|
||||
# -b arch/arm64/boot/dts/qcom/sdm845-cheza-r3.dtb \
|
||||
# cheza-image.img
|
||||
|
||||
rm -rf /tftp/*
|
||||
if echo "$BM_KERNEL" | grep -q http; then
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
$BM_KERNEL -o /tftp/vmlinuz
|
||||
elif [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_KERNEL}" -o /tftp/vmlinuz
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar.zst" -o modules.tar.zst
|
||||
tar --keep-directory-symlink --zstd -xf modules.tar.zst -C "/nfs/"
|
||||
rm modules.tar.zst &
|
||||
else
|
||||
cp /baremetal-files/"$BM_KERNEL" /tftp/vmlinuz
|
||||
fi
|
||||
echo "$BM_CMDLINE" > /tftp/cmdline
|
||||
|
||||
set +e
|
||||
STRUCTURED_LOG_FILE=results/job_detail.json
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update dut_job_type "${DEVICE_TYPE}"
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update farm "${FARM}"
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --create-dut-job dut_name "${CI_RUNNER_DESCRIPTION}"
|
||||
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update-dut-time submit "${CI_JOB_STARTED_AT}"
|
||||
section_end prepare_rootfs
|
||||
|
||||
python3 $BM/cros_servo_run.py \
|
||||
--cpu $BM_SERIAL \
|
||||
--ec $BM_SERIAL_EC \
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT_MINUTES:-20}
|
||||
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
|
206
.gitlab-ci/bare-metal/cros_servo_run.py
Executable file
206
.gitlab-ci/bare-metal/cros_servo_run.py
Executable file
@@ -0,0 +1,206 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright © 2020 Google LLC
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
import argparse
|
||||
import datetime
|
||||
import math
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
from custom_logger import CustomLogger
|
||||
from serial_buffer import SerialBuffer
|
||||
|
||||
ANSI_ESCAPE="\x1b[0K"
|
||||
ANSI_COLOUR="\x1b[0;36m"
|
||||
ANSI_RESET="\x1b[0m"
|
||||
SECTION_START="start"
|
||||
SECTION_END="end"
|
||||
|
||||
class CrosServoRun:
|
||||
def __init__(self, cpu, ec, test_timeout, logger):
|
||||
self.cpu_ser = SerialBuffer(
|
||||
cpu, "results/serial.txt", ": ")
|
||||
# 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)
|
||||
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)
|
||||
self.ec_ser.serial.write(s.encode())
|
||||
|
||||
def cpu_write(self, s):
|
||||
print("> %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.
|
||||
self.ec_write("\n")
|
||||
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.
|
||||
for line in self.cpu_ser.lines(timeout=120, phase="bootloader"):
|
||||
if re.search("load_archive: loading locale_en.bin", line):
|
||||
self.cpu_write("\016")
|
||||
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):
|
||||
bootloader_done = True
|
||||
break
|
||||
|
||||
# The Cheza boards have issues with failing to bring up power to
|
||||
# the system sometimes, possibly dependent on ambient temperature
|
||||
# in the farm.
|
||||
if re.search("POWER_GOOD not seen in time", line):
|
||||
self.print_error(
|
||||
"Detected intermittent poweron failure, abandoning run.")
|
||||
return 1
|
||||
|
||||
if not bootloader_done:
|
||||
self.print_error("Failed to make it through bootloader, abandoning run.")
|
||||
return 1
|
||||
|
||||
self.logger.create_job_phase("test")
|
||||
for line in self.cpu_ser.lines(timeout=self.test_timeout, phase="test"):
|
||||
if re.search("---. end Kernel panic", line):
|
||||
return 1
|
||||
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
# These HFI response errors started appearing with the introduction
|
||||
# of piglit runs. CosmicPenguin says:
|
||||
#
|
||||
# "message ID 106 isn't a thing, so likely what happened is that we
|
||||
# got confused when parsing the HFI queue. If it happened on only
|
||||
# one run, then memory corruption could be a possible clue"
|
||||
#
|
||||
# Given that it seems to trigger randomly near a GPU fault and then
|
||||
# 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
|
||||
|
||||
if re.search("coreboot.*bootblock starting", line):
|
||||
self.print_error(
|
||||
"Detected spontaneous reboot, abandoning run.")
|
||||
return 1
|
||||
|
||||
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
|
||||
|
||||
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
|
||||
if result:
|
||||
status = result.group(1)
|
||||
exit_code = int(result.group(2))
|
||||
|
||||
if status == "pass":
|
||||
self.logger.update_dut_job("status", "pass")
|
||||
else:
|
||||
self.logger.update_status_fail("test fail")
|
||||
|
||||
self.logger.update_dut_job("exit_code", exit_code)
|
||||
return exit_code
|
||||
|
||||
self.print_error(
|
||||
"Reached the end of the CPU serial log without finding a result")
|
||||
return 1
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--cpu', type=str,
|
||||
help='CPU Serial device', required=True)
|
||||
parser.add_argument(
|
||||
'--ec', type=str, help='EC Serial device', required=True)
|
||||
parser.add_argument(
|
||||
'--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()
|
||||
|
||||
# power down the CPU on the device
|
||||
servo.ec_write("power off\n")
|
||||
logger.update_dut_time("end", None)
|
||||
servo.close()
|
||||
|
||||
sys.exit(retval)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
10
.gitlab-ci/bare-metal/eth008-power-down.sh
Executable file
10
.gitlab-ci/bare-metal/eth008-power-down.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
relay=$1
|
||||
|
||||
if [ -z "$relay" ]; then
|
||||
echo "Must supply a relay arg"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$CI_PROJECT_DIR"/install/bare-metal/eth008-power-relay.py "$ETH_HOST" "$ETH_PORT" off "$relay"
|
28
.gitlab-ci/bare-metal/eth008-power-relay.py
Executable file
28
.gitlab-ci/bare-metal/eth008-power-relay.py
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import socket
|
||||
|
||||
host = sys.argv[1]
|
||||
port = sys.argv[2]
|
||||
mode = sys.argv[3]
|
||||
relay = sys.argv[4]
|
||||
msg = None
|
||||
|
||||
if mode == "on":
|
||||
msg = b'\x20'
|
||||
else:
|
||||
msg = b'\x21'
|
||||
|
||||
msg += int(relay).to_bytes(1, 'big')
|
||||
msg += b'\x00'
|
||||
|
||||
c = socket.create_connection((host, int(port)))
|
||||
c.sendall(msg)
|
||||
|
||||
data = c.recv(1)
|
||||
c.close()
|
||||
|
||||
if data[0] == b'\x01':
|
||||
print('Command failed')
|
||||
sys.exit(1)
|
12
.gitlab-ci/bare-metal/eth008-power-up.sh
Executable file
12
.gitlab-ci/bare-metal/eth008-power-up.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
relay=$1
|
||||
|
||||
if [ -z "$relay" ]; then
|
||||
echo "Must supply a relay arg"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$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"
|
31
.gitlab-ci/bare-metal/expect-output.sh
Executable file
31
.gitlab-ci/bare-metal/expect-output.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
STRINGS=$(mktemp)
|
||||
ERRORS=$(mktemp)
|
||||
|
||||
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
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND -1))
|
||||
|
||||
echo "Waiting for $FILE to say one of following strings"
|
||||
cat "$STRINGS"
|
||||
|
||||
while ! grep -E -wf "$STRINGS" "$FILE"; do
|
||||
sleep 2
|
||||
done
|
||||
|
||||
if grep -E -wf "$ERRORS" "$FILE"; then
|
||||
exit 1
|
||||
fi
|
167
.gitlab-ci/bare-metal/fastboot.sh
Executable file
167
.gitlab-ci/bare-metal/fastboot.sh
Executable file
@@ -0,0 +1,167 @@
|
||||
#!/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
|
||||
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."
|
||||
echo "BM_SERIAL_SCRIPT:"
|
||||
echo " This is a shell script to talk to for waiting for fastboot to be ready and logging from the kernel."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POWERUP" ]; then
|
||||
echo "Must set BM_POWERUP in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is a shell script that should reset the device and begin its boot sequence"
|
||||
echo "such that it pauses at fastboot."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POWERDOWN" ]; then
|
||||
echo "Must set BM_POWERDOWN in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is a shell script that should power off the device."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_FASTBOOT_SERIAL" ]; then
|
||||
echo "Must set BM_FASTBOOT_SERIAL in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This must be the a stable-across-resets fastboot serial number."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_KERNEL" ]; then
|
||||
echo "Must set BM_KERNEL to your board's kernel vmlinuz or Image.gz in the job's variables:"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_DTB" ]; then
|
||||
echo "Must set BM_DTB to your board's DTB file in the job's variables:"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_ROOTFS" ]; then
|
||||
echo "Must set BM_ROOTFS to your board's rootfs directory in the job's variables:"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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.
|
||||
rm -rf results/
|
||||
mkdir -p results/
|
||||
|
||||
if [ -n "$BM_FASTBOOT_NFSROOT" ]; then
|
||||
# Create the rootfs in the NFS directory. rm to make sure it's in a pristine
|
||||
# state, since it's volume-mounted on the host.
|
||||
rsync -a --delete $BM_ROOTFS/ /nfs/
|
||||
mkdir -p /nfs/results
|
||||
. $BM/rootfs-setup.sh /nfs
|
||||
|
||||
# Root on NFS, no need for an inintramfs.
|
||||
rm -f rootfs.cpio.gz
|
||||
touch rootfs.cpio
|
||||
gzip rootfs.cpio
|
||||
else
|
||||
# Create the rootfs in a temp dir
|
||||
rsync -a --delete $BM_ROOTFS/ rootfs/
|
||||
. $BM/rootfs-setup.sh rootfs
|
||||
|
||||
# Finally, pack it up into a cpio rootfs. Skip the vulkan CTS since none of
|
||||
# these devices use it and it would take up space in the initrd.
|
||||
|
||||
EXCLUDE_FILTER="deqp|arb_gpu_shader5|arb_gpu_shader_fp64|arb_gpu_shader_int64|glsl-4.[0123456]0|arb_tessellation_shader"
|
||||
|
||||
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 | \
|
||||
cpio -H newc -o | \
|
||||
xz --check=crc32 -T4 - > $CI_PROJECT_DIR/rootfs.cpio.gz
|
||||
popd
|
||||
fi
|
||||
|
||||
if echo "$BM_KERNEL $BM_DTB" | grep -q http; then
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"$BM_KERNEL" -o kernel
|
||||
# FIXME: modules should be supplied too
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"$BM_DTB" -o dtb
|
||||
|
||||
cat kernel dtb > Image.gz-dtb
|
||||
|
||||
elif [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_KERNEL}" -o kernel
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar.zst" -o modules.tar.zst
|
||||
|
||||
if [ -n "$BM_DTB" ]; then
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_DTB}.dtb" -o dtb
|
||||
fi
|
||||
|
||||
cat kernel dtb > Image.gz-dtb || echo "No DTB available, using pure kernel."
|
||||
rm kernel
|
||||
tar --keep-directory-symlink --zstd -xf modules.tar.zst -C "$BM_ROOTFS/"
|
||||
rm modules.tar.zst &
|
||||
else
|
||||
cat /baremetal-files/"$BM_KERNEL" /baremetal-files/"$BM_DTB".dtb > Image.gz-dtb
|
||||
cp /baremetal-files/"$BM_DTB".dtb dtb
|
||||
fi
|
||||
|
||||
export PATH=$BM:$PATH
|
||||
|
||||
mkdir -p artifacts
|
||||
mkbootimg.py \
|
||||
--kernel Image.gz-dtb \
|
||||
--ramdisk rootfs.cpio.gz \
|
||||
--dtb dtb \
|
||||
--cmdline "$BM_CMDLINE" \
|
||||
$BM_MKBOOT_PARAMS \
|
||||
--header_version 2 \
|
||||
-o artifacts/fastboot.img
|
||||
|
||||
rm Image.gz-dtb dtb
|
||||
|
||||
# Start background command for talking to serial if we have one.
|
||||
if [ -n "$BM_SERIAL_SCRIPT" ]; then
|
||||
$BM_SERIAL_SCRIPT > results/serial-output.txt &
|
||||
|
||||
while [ ! -e results/serial-output.txt ]; do
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
section_end prepare_rootfs
|
||||
|
||||
set +e
|
||||
$BM/fastboot_run.py \
|
||||
--dev="$BM_SERIAL" \
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT_MINUTES:-20} \
|
||||
--fbserial="$BM_FASTBOOT_SERIAL" \
|
||||
--powerup="$BM_POWERUP" \
|
||||
--powerdown="$BM_POWERDOWN"
|
||||
ret=$?
|
||||
set -e
|
||||
|
||||
if [ -n "$BM_FASTBOOT_NFSROOT" ]; then
|
||||
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
|
||||
# will look for them.
|
||||
cp -Rp /nfs/results/. results/
|
||||
fi
|
||||
|
||||
exit $ret
|
159
.gitlab-ci/bare-metal/fastboot_run.py
Executable file
159
.gitlab-ci/bare-metal/fastboot_run.py
Executable file
@@ -0,0 +1,159 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright © 2020 Google LLC
|
||||
#
|
||||
# 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 subprocess
|
||||
import re
|
||||
from serial_buffer import SerialBuffer
|
||||
import sys
|
||||
import threading
|
||||
|
||||
|
||||
class FastbootRun:
|
||||
def __init__(self, args, test_timeout):
|
||||
self.powerup = args.powerup
|
||||
self.ser = SerialBuffer(
|
||||
args.dev, "results/serial-output.txt", "R SERIAL> ")
|
||||
self.fastboot = "fastboot boot -s {ser} artifacts/fastboot.img".format(
|
||||
ser=args.fbserial)
|
||||
self.test_timeout = test_timeout
|
||||
|
||||
def close(self):
|
||||
self.ser.close()
|
||||
|
||||
def print_error(self, message):
|
||||
RED = '\033[0;31m'
|
||||
NO_COLOR = '\033[0m'
|
||||
print(RED + message + NO_COLOR)
|
||||
|
||||
def logged_system(self, cmd, timeout=60):
|
||||
print("Running '{}'".format(cmd))
|
||||
try:
|
||||
return subprocess.call(cmd, shell=True, timeout=timeout)
|
||||
except subprocess.TimeoutExpired:
|
||||
self.print_error("timeout, abandoning run.")
|
||||
return 1
|
||||
|
||||
def run(self):
|
||||
if ret := self.logged_system(self.powerup):
|
||||
return ret
|
||||
|
||||
fastboot_ready = False
|
||||
for line in self.ser.lines(timeout=2 * 60, phase="bootloader"):
|
||||
if re.search("[Ff]astboot: [Pp]rocessing 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
|
||||
|
||||
if not fastboot_ready:
|
||||
self.print_error(
|
||||
"Failed to get to fastboot prompt, abandoning run.")
|
||||
return 1
|
||||
|
||||
if ret := self.logged_system(self.fastboot):
|
||||
return ret
|
||||
|
||||
print_more_lines = -1
|
||||
for line in self.ser.lines(timeout=self.test_timeout, phase="test"):
|
||||
if print_more_lines == 0:
|
||||
return 1
|
||||
if print_more_lines > 0:
|
||||
print_more_lines -= 1
|
||||
|
||||
if re.search("---. end Kernel panic", line):
|
||||
return 1
|
||||
|
||||
# The db820c boards intermittently reboot. Just restart the run
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
# A3xx recovery doesn't quite work. Sometimes the GPU will get
|
||||
# wedged and recovery will fail (because power can't be reset?)
|
||||
# This assumes that the jobs are sufficiently well-tested that GPU
|
||||
# hangs aren't always triggered, so just try again. But print some
|
||||
# more lines first so that we get better information on the cause
|
||||
# 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.")
|
||||
if print_more_lines == -1:
|
||||
print_more_lines = 30
|
||||
|
||||
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
|
||||
if result:
|
||||
status = result.group(1)
|
||||
exit_code = int(result.group(2))
|
||||
|
||||
return exit_code
|
||||
|
||||
self.print_error(
|
||||
"Reached the end of the CPU serial log without finding a result, abandoning run.")
|
||||
return 1
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
'--dev', type=str, help='Serial device (otherwise reading from serial-output.txt)')
|
||||
parser.add_argument('--powerup', type=str,
|
||||
help='shell command for rebooting', required=True)
|
||||
parser.add_argument('--powerdown', type=str,
|
||||
help='shell command for powering off', required=True)
|
||||
parser.add_argument('--fbserial', type=str,
|
||||
help='fastboot serial number of the board', required=True)
|
||||
parser.add_argument('--test-timeout', type=int,
|
||||
help='Test phase timeout (minutes)', required=True)
|
||||
args = parser.parse_args()
|
||||
|
||||
fastboot = FastbootRun(args, args.test_timeout * 60)
|
||||
|
||||
retval = fastboot.run()
|
||||
fastboot.close()
|
||||
|
||||
fastboot.logged_system(args.powerdown)
|
||||
|
||||
sys.exit(retval)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@@ -1,129 +0,0 @@
|
||||
.baremetal-test:
|
||||
extends:
|
||||
- .test
|
||||
# Cancel job if a newer commit is pushed to the same branch
|
||||
interruptible: true
|
||||
before_script:
|
||||
- !reference [.download_s3, before_script]
|
||||
variables:
|
||||
BM_ROOTFS: /rootfs-${DEBIAN_ARCH}
|
||||
artifacts:
|
||||
when: always
|
||||
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
|
||||
paths:
|
||||
- results/
|
||||
- serial*.txt
|
||||
exclude:
|
||||
- results/*.shader_cache
|
||||
reports:
|
||||
junit: results/junit.xml
|
||||
|
||||
# ARM testing of bare-metal boards attached to an x86 gitlab-runner system
|
||||
.baremetal-test-arm32-gl:
|
||||
extends:
|
||||
- .baremetal-test
|
||||
- .use-debian/baremetal_arm32_test-gl
|
||||
variables:
|
||||
DEBIAN_ARCH: armhf
|
||||
S3_ARTIFACT_NAME: mesa-arm32-default-debugoptimized
|
||||
needs:
|
||||
- job: debian/baremetal_arm32_test-gl
|
||||
optional: true
|
||||
- job: debian-arm32
|
||||
artifacts: false
|
||||
- !reference [.required-for-hardware-jobs, needs]
|
||||
|
||||
# ARM64 testing of bare-metal boards attached to an x86 gitlab-runner system
|
||||
.baremetal-test-arm64-gl:
|
||||
extends:
|
||||
- .baremetal-test
|
||||
- .use-debian/baremetal_arm64_test-gl
|
||||
variables:
|
||||
DEBIAN_ARCH: arm64
|
||||
S3_ARTIFACT_NAME: mesa-arm64-default-debugoptimized
|
||||
needs:
|
||||
- job: debian/baremetal_arm64_test-gl
|
||||
optional: true
|
||||
- job: debian-arm64
|
||||
artifacts: false
|
||||
- !reference [.required-for-hardware-jobs, needs]
|
||||
|
||||
# ARM64 testing of bare-metal boards attached to an x86 gitlab-runner system
|
||||
.baremetal-test-arm64-vk:
|
||||
extends:
|
||||
- .baremetal-test
|
||||
- .use-debian/baremetal_arm64_test-vk
|
||||
variables:
|
||||
DEBIAN_ARCH: arm64
|
||||
S3_ARTIFACT_NAME: mesa-arm64-default-debugoptimized
|
||||
needs:
|
||||
- job: debian/baremetal_arm64_test-vk
|
||||
optional: true
|
||||
- job: debian-arm64
|
||||
artifacts: false
|
||||
- !reference [.required-for-hardware-jobs, needs]
|
||||
|
||||
# ARM32/64 testing of bare-metal boards attached to an x86 gitlab-runner system, using an asan mesa build
|
||||
.baremetal-arm32-asan-test-gl:
|
||||
variables:
|
||||
S3_ARTIFACT_NAME: mesa-arm32-asan-debugoptimized
|
||||
DEQP_FORCE_ASAN: 1
|
||||
needs:
|
||||
- job: debian/baremetal_arm32_test-gl
|
||||
optional: true
|
||||
- job: debian-arm32-asan
|
||||
artifacts: false
|
||||
- !reference [.required-for-hardware-jobs, needs]
|
||||
|
||||
.baremetal-arm64-asan-test-gl:
|
||||
variables:
|
||||
S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
|
||||
DEQP_FORCE_ASAN: 1
|
||||
needs:
|
||||
- job: debian/baremetal_arm64_test-gl
|
||||
optional: true
|
||||
- job: debian-arm64-asan
|
||||
artifacts: false
|
||||
- !reference [.required-for-hardware-jobs, needs]
|
||||
|
||||
.baremetal-arm64-asan-test-vk:
|
||||
variables:
|
||||
S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
|
||||
DEQP_FORCE_ASAN: 1
|
||||
needs:
|
||||
- job: debian/baremetal_arm64_test-vk
|
||||
optional: true
|
||||
- job: debian-arm64-asan
|
||||
artifacts: false
|
||||
- !reference [.required-for-hardware-jobs, needs]
|
||||
|
||||
.baremetal-arm64-ubsan-test-gl:
|
||||
extends:
|
||||
- .baremetal-test
|
||||
- .use-debian/baremetal_arm64_test-gl
|
||||
variables:
|
||||
S3_ARTIFACT_NAME: mesa-arm64-ubsan-debugoptimized
|
||||
needs:
|
||||
- job: debian/baremetal_arm64_test-gl
|
||||
optional: true
|
||||
- job: debian-arm64-ubsan
|
||||
artifacts: false
|
||||
- !reference [.required-for-hardware-jobs, needs]
|
||||
|
||||
.baremetal-arm64-ubsan-test-vk:
|
||||
extends:
|
||||
- .baremetal-test
|
||||
- .use-debian/baremetal_arm64_test-vk
|
||||
variables:
|
||||
S3_ARTIFACT_NAME: mesa-arm64-ubsan-debugoptimized
|
||||
needs:
|
||||
- job: debian/baremetal_arm64_test-vk
|
||||
optional: true
|
||||
- job: debian-arm64-ubsan
|
||||
artifacts: false
|
||||
- !reference [.required-for-hardware-jobs, needs]
|
||||
|
||||
.baremetal-deqp-test:
|
||||
variables:
|
||||
HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
|
||||
FDO_CI_CONCURRENT: 0 # Default to number of CPUs
|
10
.gitlab-ci/bare-metal/google-power-down.sh
Executable file
10
.gitlab-ci/bare-metal/google-power-down.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
relay=$1
|
||||
|
||||
if [ -z "$relay" ]; then
|
||||
echo "Must supply a relay arg"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$CI_PROJECT_DIR"/install/bare-metal/google-power-relay.py off "$relay"
|
19
.gitlab-ci/bare-metal/google-power-relay.py
Executable file
19
.gitlab-ci/bare-metal/google-power-relay.py
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import serial
|
||||
|
||||
mode = sys.argv[1]
|
||||
relay = sys.argv[2]
|
||||
|
||||
# our relays are "off" means "board is powered".
|
||||
mode_swap = {
|
||||
"on": "off",
|
||||
"off": "on",
|
||||
}
|
||||
mode = mode_swap[mode]
|
||||
|
||||
ser = serial.Serial('/dev/ttyACM0', 115200, timeout=2)
|
||||
command = "relay {} {}\n\r".format(mode, relay)
|
||||
ser.write(command.encode())
|
||||
ser.close()
|
12
.gitlab-ci/bare-metal/google-power-up.sh
Executable file
12
.gitlab-ci/bare-metal/google-power-up.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
relay=$1
|
||||
|
||||
if [ -z "$relay" ]; then
|
||||
echo "Must supply a relay arg"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$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"
|
569
.gitlab-ci/bare-metal/mkbootimg.py
Executable file
569
.gitlab-ci/bare-metal/mkbootimg.py
Executable file
@@ -0,0 +1,569 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright 2015, The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
"""Creates the boot image."""
|
||||
from argparse import (ArgumentParser, ArgumentTypeError,
|
||||
FileType, RawDescriptionHelpFormatter)
|
||||
from hashlib import sha1
|
||||
from os import fstat
|
||||
from struct import pack
|
||||
import array
|
||||
import collections
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import tempfile
|
||||
# Constant and structure definition is in
|
||||
# system/tools/mkbootimg/include/bootimg/bootimg.h
|
||||
BOOT_MAGIC = 'ANDROID!'
|
||||
BOOT_MAGIC_SIZE = 8
|
||||
BOOT_NAME_SIZE = 16
|
||||
BOOT_ARGS_SIZE = 512
|
||||
BOOT_EXTRA_ARGS_SIZE = 1024
|
||||
BOOT_IMAGE_HEADER_V1_SIZE = 1648
|
||||
BOOT_IMAGE_HEADER_V2_SIZE = 1660
|
||||
BOOT_IMAGE_HEADER_V3_SIZE = 1580
|
||||
BOOT_IMAGE_HEADER_V3_PAGESIZE = 4096
|
||||
BOOT_IMAGE_HEADER_V4_SIZE = 1584
|
||||
BOOT_IMAGE_V4_SIGNATURE_SIZE = 4096
|
||||
VENDOR_BOOT_MAGIC = 'VNDRBOOT'
|
||||
VENDOR_BOOT_MAGIC_SIZE = 8
|
||||
VENDOR_BOOT_NAME_SIZE = BOOT_NAME_SIZE
|
||||
VENDOR_BOOT_ARGS_SIZE = 2048
|
||||
VENDOR_BOOT_IMAGE_HEADER_V3_SIZE = 2112
|
||||
VENDOR_BOOT_IMAGE_HEADER_V4_SIZE = 2128
|
||||
VENDOR_RAMDISK_TYPE_NONE = 0
|
||||
VENDOR_RAMDISK_TYPE_PLATFORM = 1
|
||||
VENDOR_RAMDISK_TYPE_RECOVERY = 2
|
||||
VENDOR_RAMDISK_TYPE_DLKM = 3
|
||||
VENDOR_RAMDISK_NAME_SIZE = 32
|
||||
VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE = 16
|
||||
VENDOR_RAMDISK_TABLE_ENTRY_V4_SIZE = 108
|
||||
# Names with special meaning, mustn't be specified in --ramdisk_name.
|
||||
VENDOR_RAMDISK_NAME_BLOCKLIST = {b'default'}
|
||||
PARSER_ARGUMENT_VENDOR_RAMDISK_FRAGMENT = '--vendor_ramdisk_fragment'
|
||||
def filesize(f):
|
||||
if f is None:
|
||||
return 0
|
||||
try:
|
||||
return fstat(f.fileno()).st_size
|
||||
except OSError:
|
||||
return 0
|
||||
def update_sha(sha, f):
|
||||
if f:
|
||||
sha.update(f.read())
|
||||
f.seek(0)
|
||||
sha.update(pack('I', filesize(f)))
|
||||
else:
|
||||
sha.update(pack('I', 0))
|
||||
def pad_file(f, padding):
|
||||
pad = (padding - (f.tell() & (padding - 1))) & (padding - 1)
|
||||
f.write(pack(str(pad) + 'x'))
|
||||
def get_number_of_pages(image_size, page_size):
|
||||
"""calculates the number of pages required for the image"""
|
||||
return (image_size + page_size - 1) // page_size
|
||||
def get_recovery_dtbo_offset(args):
|
||||
"""calculates the offset of recovery_dtbo image in the boot image"""
|
||||
num_header_pages = 1 # header occupies a page
|
||||
num_kernel_pages = get_number_of_pages(filesize(args.kernel), args.pagesize)
|
||||
num_ramdisk_pages = get_number_of_pages(filesize(args.ramdisk),
|
||||
args.pagesize)
|
||||
num_second_pages = get_number_of_pages(filesize(args.second), args.pagesize)
|
||||
dtbo_offset = args.pagesize * (num_header_pages + num_kernel_pages +
|
||||
num_ramdisk_pages + num_second_pages)
|
||||
return dtbo_offset
|
||||
def write_header_v3_and_above(args):
|
||||
if args.header_version > 3:
|
||||
boot_header_size = BOOT_IMAGE_HEADER_V4_SIZE
|
||||
else:
|
||||
boot_header_size = BOOT_IMAGE_HEADER_V3_SIZE
|
||||
args.output.write(pack(f'{BOOT_MAGIC_SIZE}s', BOOT_MAGIC.encode()))
|
||||
# kernel size in bytes
|
||||
args.output.write(pack('I', filesize(args.kernel)))
|
||||
# ramdisk size in bytes
|
||||
args.output.write(pack('I', filesize(args.ramdisk)))
|
||||
# os version and patch level
|
||||
args.output.write(pack('I', (args.os_version << 11) | args.os_patch_level))
|
||||
args.output.write(pack('I', boot_header_size))
|
||||
# reserved
|
||||
args.output.write(pack('4I', 0, 0, 0, 0))
|
||||
# version of boot image header
|
||||
args.output.write(pack('I', args.header_version))
|
||||
args.output.write(pack(f'{BOOT_ARGS_SIZE + BOOT_EXTRA_ARGS_SIZE}s',
|
||||
args.cmdline))
|
||||
if args.header_version >= 4:
|
||||
# The signature used to verify boot image v4.
|
||||
args.output.write(pack('I', BOOT_IMAGE_V4_SIGNATURE_SIZE))
|
||||
pad_file(args.output, BOOT_IMAGE_HEADER_V3_PAGESIZE)
|
||||
def write_vendor_boot_header(args):
|
||||
if filesize(args.dtb) == 0:
|
||||
raise ValueError('DTB image must not be empty.')
|
||||
if args.header_version > 3:
|
||||
vendor_ramdisk_size = args.vendor_ramdisk_total_size
|
||||
vendor_boot_header_size = VENDOR_BOOT_IMAGE_HEADER_V4_SIZE
|
||||
else:
|
||||
vendor_ramdisk_size = filesize(args.vendor_ramdisk)
|
||||
vendor_boot_header_size = VENDOR_BOOT_IMAGE_HEADER_V3_SIZE
|
||||
args.vendor_boot.write(pack(f'{VENDOR_BOOT_MAGIC_SIZE}s',
|
||||
VENDOR_BOOT_MAGIC.encode()))
|
||||
# version of boot image header
|
||||
args.vendor_boot.write(pack('I', args.header_version))
|
||||
# flash page size
|
||||
args.vendor_boot.write(pack('I', args.pagesize))
|
||||
# kernel physical load address
|
||||
args.vendor_boot.write(pack('I', args.base + args.kernel_offset))
|
||||
# ramdisk physical load address
|
||||
args.vendor_boot.write(pack('I', args.base + args.ramdisk_offset))
|
||||
# ramdisk size in bytes
|
||||
args.vendor_boot.write(pack('I', vendor_ramdisk_size))
|
||||
args.vendor_boot.write(pack(f'{VENDOR_BOOT_ARGS_SIZE}s',
|
||||
args.vendor_cmdline))
|
||||
# kernel tags physical load address
|
||||
args.vendor_boot.write(pack('I', args.base + args.tags_offset))
|
||||
# asciiz product name
|
||||
args.vendor_boot.write(pack(f'{VENDOR_BOOT_NAME_SIZE}s', args.board))
|
||||
# header size in bytes
|
||||
args.vendor_boot.write(pack('I', vendor_boot_header_size))
|
||||
# dtb size in bytes
|
||||
args.vendor_boot.write(pack('I', filesize(args.dtb)))
|
||||
# dtb physical load address
|
||||
args.vendor_boot.write(pack('Q', args.base + args.dtb_offset))
|
||||
if args.header_version > 3:
|
||||
vendor_ramdisk_table_size = (args.vendor_ramdisk_table_entry_num *
|
||||
VENDOR_RAMDISK_TABLE_ENTRY_V4_SIZE)
|
||||
# vendor ramdisk table size in bytes
|
||||
args.vendor_boot.write(pack('I', vendor_ramdisk_table_size))
|
||||
# number of vendor ramdisk table entries
|
||||
args.vendor_boot.write(pack('I', args.vendor_ramdisk_table_entry_num))
|
||||
# vendor ramdisk table entry size in bytes
|
||||
args.vendor_boot.write(pack('I', VENDOR_RAMDISK_TABLE_ENTRY_V4_SIZE))
|
||||
# bootconfig section size in bytes
|
||||
args.vendor_boot.write(pack('I', filesize(args.vendor_bootconfig)))
|
||||
pad_file(args.vendor_boot, args.pagesize)
|
||||
def write_header(args):
|
||||
if args.header_version > 4:
|
||||
raise ValueError(
|
||||
f'Boot header version {args.header_version} not supported')
|
||||
if args.header_version in {3, 4}:
|
||||
return write_header_v3_and_above(args)
|
||||
ramdisk_load_address = ((args.base + args.ramdisk_offset)
|
||||
if filesize(args.ramdisk) > 0 else 0)
|
||||
second_load_address = ((args.base + args.second_offset)
|
||||
if filesize(args.second) > 0 else 0)
|
||||
args.output.write(pack(f'{BOOT_MAGIC_SIZE}s', BOOT_MAGIC.encode()))
|
||||
# kernel size in bytes
|
||||
args.output.write(pack('I', filesize(args.kernel)))
|
||||
# kernel physical load address
|
||||
args.output.write(pack('I', args.base + args.kernel_offset))
|
||||
# ramdisk size in bytes
|
||||
args.output.write(pack('I', filesize(args.ramdisk)))
|
||||
# ramdisk physical load address
|
||||
args.output.write(pack('I', ramdisk_load_address))
|
||||
# second bootloader size in bytes
|
||||
args.output.write(pack('I', filesize(args.second)))
|
||||
# second bootloader physical load address
|
||||
args.output.write(pack('I', second_load_address))
|
||||
# kernel tags physical load address
|
||||
args.output.write(pack('I', args.base + args.tags_offset))
|
||||
# flash page size
|
||||
args.output.write(pack('I', args.pagesize))
|
||||
# version of boot image header
|
||||
args.output.write(pack('I', args.header_version))
|
||||
# os version and patch level
|
||||
args.output.write(pack('I', (args.os_version << 11) | args.os_patch_level))
|
||||
# asciiz product name
|
||||
args.output.write(pack(f'{BOOT_NAME_SIZE}s', args.board))
|
||||
args.output.write(pack(f'{BOOT_ARGS_SIZE}s', args.cmdline))
|
||||
sha = sha1()
|
||||
update_sha(sha, args.kernel)
|
||||
update_sha(sha, args.ramdisk)
|
||||
update_sha(sha, args.second)
|
||||
if args.header_version > 0:
|
||||
update_sha(sha, args.recovery_dtbo)
|
||||
if args.header_version > 1:
|
||||
update_sha(sha, args.dtb)
|
||||
img_id = pack('32s', sha.digest())
|
||||
args.output.write(img_id)
|
||||
args.output.write(pack(f'{BOOT_EXTRA_ARGS_SIZE}s', args.extra_cmdline))
|
||||
if args.header_version > 0:
|
||||
if args.recovery_dtbo:
|
||||
# recovery dtbo size in bytes
|
||||
args.output.write(pack('I', filesize(args.recovery_dtbo)))
|
||||
# recovert dtbo offset in the boot image
|
||||
args.output.write(pack('Q', get_recovery_dtbo_offset(args)))
|
||||
else:
|
||||
# Set to zero if no recovery dtbo
|
||||
args.output.write(pack('I', 0))
|
||||
args.output.write(pack('Q', 0))
|
||||
# Populate boot image header size for header versions 1 and 2.
|
||||
if args.header_version == 1:
|
||||
args.output.write(pack('I', BOOT_IMAGE_HEADER_V1_SIZE))
|
||||
elif args.header_version == 2:
|
||||
args.output.write(pack('I', BOOT_IMAGE_HEADER_V2_SIZE))
|
||||
if args.header_version > 1:
|
||||
if filesize(args.dtb) == 0:
|
||||
raise ValueError('DTB image must not be empty.')
|
||||
# dtb size in bytes
|
||||
args.output.write(pack('I', filesize(args.dtb)))
|
||||
# dtb physical load address
|
||||
args.output.write(pack('Q', args.base + args.dtb_offset))
|
||||
pad_file(args.output, args.pagesize)
|
||||
return img_id
|
||||
class AsciizBytes:
|
||||
"""Parses a string and encodes it as an asciiz bytes object.
|
||||
>>> AsciizBytes(bufsize=4)('foo')
|
||||
b'foo\\x00'
|
||||
>>> AsciizBytes(bufsize=4)('foob')
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
argparse.ArgumentTypeError: Encoded asciiz length exceeded: max 4, got 5
|
||||
"""
|
||||
def __init__(self, bufsize):
|
||||
self.bufsize = bufsize
|
||||
def __call__(self, arg):
|
||||
arg_bytes = arg.encode() + b'\x00'
|
||||
if len(arg_bytes) > self.bufsize:
|
||||
raise ArgumentTypeError(
|
||||
'Encoded asciiz length exceeded: '
|
||||
f'max {self.bufsize}, got {len(arg_bytes)}')
|
||||
return arg_bytes
|
||||
class VendorRamdiskTableBuilder:
|
||||
"""Vendor ramdisk table builder.
|
||||
Attributes:
|
||||
entries: A list of VendorRamdiskTableEntry namedtuple.
|
||||
ramdisk_total_size: Total size in bytes of all ramdisks in the table.
|
||||
"""
|
||||
VendorRamdiskTableEntry = collections.namedtuple( # pylint: disable=invalid-name
|
||||
'VendorRamdiskTableEntry',
|
||||
['ramdisk_path', 'ramdisk_size', 'ramdisk_offset', 'ramdisk_type',
|
||||
'ramdisk_name', 'board_id'])
|
||||
def __init__(self):
|
||||
self.entries = []
|
||||
self.ramdisk_total_size = 0
|
||||
self.ramdisk_names = set()
|
||||
def add_entry(self, ramdisk_path, ramdisk_type, ramdisk_name, board_id):
|
||||
# Strip any trailing null for simple comparison.
|
||||
stripped_ramdisk_name = ramdisk_name.rstrip(b'\x00')
|
||||
if stripped_ramdisk_name in VENDOR_RAMDISK_NAME_BLOCKLIST:
|
||||
raise ValueError(
|
||||
f'Banned vendor ramdisk name: {stripped_ramdisk_name}')
|
||||
if stripped_ramdisk_name in self.ramdisk_names:
|
||||
raise ValueError(
|
||||
f'Duplicated vendor ramdisk name: {stripped_ramdisk_name}')
|
||||
self.ramdisk_names.add(stripped_ramdisk_name)
|
||||
if board_id is None:
|
||||
board_id = array.array(
|
||||
'I', [0] * VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE)
|
||||
else:
|
||||
board_id = array.array('I', board_id)
|
||||
if len(board_id) != VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE:
|
||||
raise ValueError('board_id size must be '
|
||||
f'{VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE}')
|
||||
with open(ramdisk_path, 'rb') as f:
|
||||
ramdisk_size = filesize(f)
|
||||
self.entries.append(self.VendorRamdiskTableEntry(
|
||||
ramdisk_path, ramdisk_size, self.ramdisk_total_size, ramdisk_type,
|
||||
ramdisk_name, board_id))
|
||||
self.ramdisk_total_size += ramdisk_size
|
||||
def write_ramdisks_padded(self, fout, alignment):
|
||||
for entry in self.entries:
|
||||
with open(entry.ramdisk_path, 'rb') as f:
|
||||
fout.write(f.read())
|
||||
pad_file(fout, alignment)
|
||||
def write_entries_padded(self, fout, alignment):
|
||||
for entry in self.entries:
|
||||
fout.write(pack('I', entry.ramdisk_size))
|
||||
fout.write(pack('I', entry.ramdisk_offset))
|
||||
fout.write(pack('I', entry.ramdisk_type))
|
||||
fout.write(pack(f'{VENDOR_RAMDISK_NAME_SIZE}s',
|
||||
entry.ramdisk_name))
|
||||
fout.write(entry.board_id)
|
||||
pad_file(fout, alignment)
|
||||
def write_padded_file(f_out, f_in, padding):
|
||||
if f_in is None:
|
||||
return
|
||||
f_out.write(f_in.read())
|
||||
pad_file(f_out, padding)
|
||||
def parse_int(x):
|
||||
return int(x, 0)
|
||||
def parse_os_version(x):
|
||||
match = re.search(r'^(\d{1,3})(?:\.(\d{1,3})(?:\.(\d{1,3}))?)?', x)
|
||||
if match:
|
||||
a = int(match.group(1))
|
||||
b = c = 0
|
||||
if match.lastindex >= 2:
|
||||
b = int(match.group(2))
|
||||
if match.lastindex == 3:
|
||||
c = int(match.group(3))
|
||||
# 7 bits allocated for each field
|
||||
assert a < 128
|
||||
assert b < 128
|
||||
assert c < 128
|
||||
return (a << 14) | (b << 7) | c
|
||||
return 0
|
||||
def parse_os_patch_level(x):
|
||||
match = re.search(r'^(\d{4})-(\d{2})(?:-(\d{2}))?', x)
|
||||
if match:
|
||||
y = int(match.group(1)) - 2000
|
||||
m = int(match.group(2))
|
||||
# 7 bits allocated for the year, 4 bits for the month
|
||||
assert 0 <= y < 128
|
||||
assert 0 < m <= 12
|
||||
return (y << 4) | m
|
||||
return 0
|
||||
def parse_vendor_ramdisk_type(x):
|
||||
type_dict = {
|
||||
'none': VENDOR_RAMDISK_TYPE_NONE,
|
||||
'platform': VENDOR_RAMDISK_TYPE_PLATFORM,
|
||||
'recovery': VENDOR_RAMDISK_TYPE_RECOVERY,
|
||||
'dlkm': VENDOR_RAMDISK_TYPE_DLKM,
|
||||
}
|
||||
if x.lower() in type_dict:
|
||||
return type_dict[x.lower()]
|
||||
return parse_int(x)
|
||||
def get_vendor_boot_v4_usage():
|
||||
return """vendor boot version 4 arguments:
|
||||
--ramdisk_type {none,platform,recovery,dlkm}
|
||||
specify the type of the ramdisk
|
||||
--ramdisk_name NAME
|
||||
specify the name of the ramdisk
|
||||
--board_id{0..15} NUMBER
|
||||
specify the value of the board_id vector, defaults to 0
|
||||
--vendor_ramdisk_fragment VENDOR_RAMDISK_FILE
|
||||
path to the vendor ramdisk file
|
||||
These options can be specified multiple times, where each vendor ramdisk
|
||||
option group ends with a --vendor_ramdisk_fragment option.
|
||||
Each option group appends an additional ramdisk to the vendor boot image.
|
||||
"""
|
||||
def parse_vendor_ramdisk_args(args, args_list):
|
||||
"""Parses vendor ramdisk specific arguments.
|
||||
Args:
|
||||
args: An argparse.Namespace object. Parsed results are stored into this
|
||||
object.
|
||||
args_list: A list of argument strings to be parsed.
|
||||
Returns:
|
||||
A list argument strings that are not parsed by this method.
|
||||
"""
|
||||
parser = ArgumentParser(add_help=False)
|
||||
parser.add_argument('--ramdisk_type', type=parse_vendor_ramdisk_type,
|
||||
default=VENDOR_RAMDISK_TYPE_NONE)
|
||||
parser.add_argument('--ramdisk_name',
|
||||
type=AsciizBytes(bufsize=VENDOR_RAMDISK_NAME_SIZE),
|
||||
required=True)
|
||||
for i in range(VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE):
|
||||
parser.add_argument(f'--board_id{i}', type=parse_int, default=0)
|
||||
parser.add_argument(PARSER_ARGUMENT_VENDOR_RAMDISK_FRAGMENT, required=True)
|
||||
unknown_args = []
|
||||
vendor_ramdisk_table_builder = VendorRamdiskTableBuilder()
|
||||
if args.vendor_ramdisk is not None:
|
||||
vendor_ramdisk_table_builder.add_entry(
|
||||
args.vendor_ramdisk.name, VENDOR_RAMDISK_TYPE_PLATFORM, b'', None)
|
||||
while PARSER_ARGUMENT_VENDOR_RAMDISK_FRAGMENT in args_list:
|
||||
idx = args_list.index(PARSER_ARGUMENT_VENDOR_RAMDISK_FRAGMENT) + 2
|
||||
vendor_ramdisk_args = args_list[:idx]
|
||||
args_list = args_list[idx:]
|
||||
ramdisk_args, extra_args = parser.parse_known_args(vendor_ramdisk_args)
|
||||
ramdisk_args_dict = vars(ramdisk_args)
|
||||
unknown_args.extend(extra_args)
|
||||
ramdisk_path = ramdisk_args.vendor_ramdisk_fragment
|
||||
ramdisk_type = ramdisk_args.ramdisk_type
|
||||
ramdisk_name = ramdisk_args.ramdisk_name
|
||||
board_id = [ramdisk_args_dict[f'board_id{i}']
|
||||
for i in range(VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE)]
|
||||
vendor_ramdisk_table_builder.add_entry(ramdisk_path, ramdisk_type,
|
||||
ramdisk_name, board_id)
|
||||
if len(args_list) > 0:
|
||||
unknown_args.extend(args_list)
|
||||
args.vendor_ramdisk_total_size = (vendor_ramdisk_table_builder
|
||||
.ramdisk_total_size)
|
||||
args.vendor_ramdisk_table_entry_num = len(vendor_ramdisk_table_builder
|
||||
.entries)
|
||||
args.vendor_ramdisk_table_builder = vendor_ramdisk_table_builder
|
||||
return unknown_args
|
||||
def parse_cmdline():
|
||||
version_parser = ArgumentParser(add_help=False)
|
||||
version_parser.add_argument('--header_version', type=parse_int, default=0)
|
||||
if version_parser.parse_known_args()[0].header_version < 3:
|
||||
# For boot header v0 to v2, the kernel commandline field is split into
|
||||
# two fields, cmdline and extra_cmdline. Both fields are asciiz strings,
|
||||
# so we minus one here to ensure the encoded string plus the
|
||||
# null-terminator can fit in the buffer size.
|
||||
cmdline_size = BOOT_ARGS_SIZE + BOOT_EXTRA_ARGS_SIZE - 1
|
||||
else:
|
||||
cmdline_size = BOOT_ARGS_SIZE + BOOT_EXTRA_ARGS_SIZE
|
||||
parser = ArgumentParser(formatter_class=RawDescriptionHelpFormatter,
|
||||
epilog=get_vendor_boot_v4_usage())
|
||||
parser.add_argument('--kernel', type=FileType('rb'),
|
||||
help='path to the kernel')
|
||||
parser.add_argument('--ramdisk', type=FileType('rb'),
|
||||
help='path to the ramdisk')
|
||||
parser.add_argument('--second', type=FileType('rb'),
|
||||
help='path to the second bootloader')
|
||||
parser.add_argument('--dtb', type=FileType('rb'), help='path to the dtb')
|
||||
dtbo_group = parser.add_mutually_exclusive_group()
|
||||
dtbo_group.add_argument('--recovery_dtbo', type=FileType('rb'),
|
||||
help='path to the recovery DTBO')
|
||||
dtbo_group.add_argument('--recovery_acpio', type=FileType('rb'),
|
||||
metavar='RECOVERY_ACPIO', dest='recovery_dtbo',
|
||||
help='path to the recovery ACPIO')
|
||||
parser.add_argument('--cmdline', type=AsciizBytes(bufsize=cmdline_size),
|
||||
default='', help='kernel command line arguments')
|
||||
parser.add_argument('--vendor_cmdline',
|
||||
type=AsciizBytes(bufsize=VENDOR_BOOT_ARGS_SIZE),
|
||||
default='',
|
||||
help='vendor boot kernel command line arguments')
|
||||
parser.add_argument('--base', type=parse_int, default=0x10000000,
|
||||
help='base address')
|
||||
parser.add_argument('--kernel_offset', type=parse_int, default=0x00008000,
|
||||
help='kernel offset')
|
||||
parser.add_argument('--ramdisk_offset', type=parse_int, default=0x01000000,
|
||||
help='ramdisk offset')
|
||||
parser.add_argument('--second_offset', type=parse_int, default=0x00f00000,
|
||||
help='second bootloader offset')
|
||||
parser.add_argument('--dtb_offset', type=parse_int, default=0x01f00000,
|
||||
help='dtb offset')
|
||||
parser.add_argument('--os_version', type=parse_os_version, default=0,
|
||||
help='operating system version')
|
||||
parser.add_argument('--os_patch_level', type=parse_os_patch_level,
|
||||
default=0, help='operating system patch level')
|
||||
parser.add_argument('--tags_offset', type=parse_int, default=0x00000100,
|
||||
help='tags offset')
|
||||
parser.add_argument('--board', type=AsciizBytes(bufsize=BOOT_NAME_SIZE),
|
||||
default='', help='board name')
|
||||
parser.add_argument('--pagesize', type=parse_int,
|
||||
choices=[2**i for i in range(11, 15)], default=2048,
|
||||
help='page size')
|
||||
parser.add_argument('--id', action='store_true',
|
||||
help='print the image ID on standard output')
|
||||
parser.add_argument('--header_version', type=parse_int, default=0,
|
||||
help='boot image header version')
|
||||
parser.add_argument('-o', '--output', type=FileType('wb'),
|
||||
help='output file name')
|
||||
parser.add_argument('--gki_signing_algorithm',
|
||||
help='GKI signing algorithm to use')
|
||||
parser.add_argument('--gki_signing_key',
|
||||
help='path to RSA private key file')
|
||||
parser.add_argument('--gki_signing_signature_args',
|
||||
help='other hash arguments passed to avbtool')
|
||||
parser.add_argument('--gki_signing_avbtool_path',
|
||||
help='path to avbtool for boot signature generation')
|
||||
parser.add_argument('--vendor_boot', type=FileType('wb'),
|
||||
help='vendor boot output file name')
|
||||
parser.add_argument('--vendor_ramdisk', type=FileType('rb'),
|
||||
help='path to the vendor ramdisk')
|
||||
parser.add_argument('--vendor_bootconfig', type=FileType('rb'),
|
||||
help='path to the vendor bootconfig file')
|
||||
args, extra_args = parser.parse_known_args()
|
||||
if args.vendor_boot is not None and args.header_version > 3:
|
||||
extra_args = parse_vendor_ramdisk_args(args, extra_args)
|
||||
if len(extra_args) > 0:
|
||||
raise ValueError(f'Unrecognized arguments: {extra_args}')
|
||||
if args.header_version < 3:
|
||||
args.extra_cmdline = args.cmdline[BOOT_ARGS_SIZE-1:]
|
||||
args.cmdline = args.cmdline[:BOOT_ARGS_SIZE-1] + b'\x00'
|
||||
assert len(args.cmdline) <= BOOT_ARGS_SIZE
|
||||
assert len(args.extra_cmdline) <= BOOT_EXTRA_ARGS_SIZE
|
||||
return args
|
||||
def add_boot_image_signature(args, pagesize):
|
||||
"""Adds the boot image signature.
|
||||
Note that the signature will only be verified in VTS to ensure a
|
||||
generic boot.img is used. It will not be used by the device
|
||||
bootloader at boot time. The bootloader should only verify
|
||||
the boot vbmeta at the end of the boot partition (or in the top-level
|
||||
vbmeta partition) via the Android Verified Boot process, when the
|
||||
device boots.
|
||||
"""
|
||||
args.output.flush() # Flush the buffer for signature calculation.
|
||||
# Appends zeros if the signing key is not specified.
|
||||
if not args.gki_signing_key or not args.gki_signing_algorithm:
|
||||
zeros = b'\x00' * BOOT_IMAGE_V4_SIGNATURE_SIZE
|
||||
args.output.write(zeros)
|
||||
pad_file(args.output, pagesize)
|
||||
return
|
||||
avbtool = 'avbtool' # Used from otatools.zip or Android build env.
|
||||
# We need to specify the path of avbtool in build/core/Makefile.
|
||||
# Because avbtool is not guaranteed to be in $PATH there.
|
||||
if args.gki_signing_avbtool_path:
|
||||
avbtool = args.gki_signing_avbtool_path
|
||||
# Need to specify a value of --partition_size for avbtool to work.
|
||||
# We use 64 MB below, but avbtool will not resize the boot image to
|
||||
# this size because --do_not_append_vbmeta_image is also specified.
|
||||
avbtool_cmd = [
|
||||
avbtool, 'add_hash_footer',
|
||||
'--partition_name', 'boot',
|
||||
'--partition_size', str(64 * 1024 * 1024),
|
||||
'--image', args.output.name,
|
||||
'--algorithm', args.gki_signing_algorithm,
|
||||
'--key', args.gki_signing_key,
|
||||
'--salt', 'd00df00d'] # TODO: use a hash of kernel/ramdisk as the salt.
|
||||
# Additional arguments passed to avbtool.
|
||||
if args.gki_signing_signature_args:
|
||||
avbtool_cmd += args.gki_signing_signature_args.split()
|
||||
# Outputs the signed vbmeta to a separate file, then append to boot.img
|
||||
# as the boot signature.
|
||||
with tempfile.TemporaryDirectory() as temp_out_dir:
|
||||
boot_signature_output = os.path.join(temp_out_dir, 'boot_signature')
|
||||
avbtool_cmd += ['--do_not_append_vbmeta_image',
|
||||
'--output_vbmeta_image', boot_signature_output]
|
||||
subprocess.check_call(avbtool_cmd)
|
||||
with open(boot_signature_output, 'rb') as boot_signature:
|
||||
if filesize(boot_signature) > BOOT_IMAGE_V4_SIGNATURE_SIZE:
|
||||
raise ValueError(
|
||||
f'boot sigature size is > {BOOT_IMAGE_V4_SIGNATURE_SIZE}')
|
||||
write_padded_file(args.output, boot_signature, pagesize)
|
||||
def write_data(args, pagesize):
|
||||
write_padded_file(args.output, args.kernel, pagesize)
|
||||
write_padded_file(args.output, args.ramdisk, pagesize)
|
||||
write_padded_file(args.output, args.second, pagesize)
|
||||
if args.header_version > 0 and args.header_version < 3:
|
||||
write_padded_file(args.output, args.recovery_dtbo, pagesize)
|
||||
if args.header_version == 2:
|
||||
write_padded_file(args.output, args.dtb, pagesize)
|
||||
if args.header_version >= 4:
|
||||
add_boot_image_signature(args, pagesize)
|
||||
def write_vendor_boot_data(args):
|
||||
if args.header_version > 3:
|
||||
builder = args.vendor_ramdisk_table_builder
|
||||
builder.write_ramdisks_padded(args.vendor_boot, args.pagesize)
|
||||
write_padded_file(args.vendor_boot, args.dtb, args.pagesize)
|
||||
builder.write_entries_padded(args.vendor_boot, args.pagesize)
|
||||
write_padded_file(args.vendor_boot, args.vendor_bootconfig,
|
||||
args.pagesize)
|
||||
else:
|
||||
write_padded_file(args.vendor_boot, args.vendor_ramdisk, args.pagesize)
|
||||
write_padded_file(args.vendor_boot, args.dtb, args.pagesize)
|
||||
def main():
|
||||
args = parse_cmdline()
|
||||
if args.vendor_boot is not None:
|
||||
if args.header_version not in {3, 4}:
|
||||
raise ValueError(
|
||||
'--vendor_boot not compatible with given header version')
|
||||
if args.header_version == 3 and args.vendor_ramdisk is None:
|
||||
raise ValueError('--vendor_ramdisk missing or invalid')
|
||||
write_vendor_boot_header(args)
|
||||
write_vendor_boot_data(args)
|
||||
if args.output is not None:
|
||||
if args.second is not None and args.header_version > 2:
|
||||
raise ValueError(
|
||||
'--second not compatible with given header version')
|
||||
img_id = write_header(args)
|
||||
if args.header_version > 2:
|
||||
write_data(args, BOOT_IMAGE_HEADER_V3_PAGESIZE)
|
||||
else:
|
||||
write_data(args, args.pagesize)
|
||||
if args.id and img_id is not None:
|
||||
print('0x' + ''.join(f'{octet:02x}' for octet in img_id))
|
||||
if __name__ == '__main__':
|
||||
main()
|
@@ -103,11 +103,29 @@ if [ -f "${BM_BOOTFS}" ]; then
|
||||
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 "${BM_BOOTFS}" ]; then
|
||||
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
|
||||
@@ -118,7 +136,7 @@ fi
|
||||
date +'%F %T'
|
||||
|
||||
# Install kernel image + bootloader files
|
||||
if [ -z "$BM_BOOTFS" ]; then
|
||||
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/
|
||||
@@ -126,6 +144,33 @@ fi
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
# Set up the pxelinux config for Jetson Nano
|
||||
mkdir -p /tftp/pxelinux.cfg
|
||||
cat <<EOF >/tftp/pxelinux.cfg/default-arm-tegra210-p3450-0000
|
||||
PROMPT 0
|
||||
TIMEOUT 30
|
||||
DEFAULT primary
|
||||
MENU TITLE jetson nano boot options
|
||||
LABEL primary
|
||||
MENU LABEL CI kernel on TFTP
|
||||
LINUX Image
|
||||
FDT tegra210-p3450-0000.dtb
|
||||
APPEND \${cbootargs} $BM_CMDLINE
|
||||
EOF
|
||||
|
||||
# Set up the pxelinux config for Jetson TK1
|
||||
cat <<EOF >/tftp/pxelinux.cfg/default-arm-tegra124-jetson-tk1
|
||||
PROMPT 0
|
||||
TIMEOUT 30
|
||||
DEFAULT primary
|
||||
MENU TITLE jetson TK1 boot options
|
||||
LABEL primary
|
||||
MENU LABEL CI kernel on TFTP
|
||||
LINUX zImage
|
||||
FDT tegra124-jetson-tk1.dtb
|
||||
APPEND \${cbootargs} $BM_CMDLINE
|
||||
EOF
|
||||
|
||||
# Create the rootfs in the NFS directory
|
||||
. $BM/rootfs-setup.sh /nfs
|
||||
|
||||
|
@@ -87,11 +87,12 @@ class PoERun:
|
||||
self.print_error("nouveau jetson tk1 network fail, abandoning run.")
|
||||
return 1
|
||||
|
||||
result = re.search(r"hwci: mesa: exit_code: (\d+)", line)
|
||||
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
|
||||
if result:
|
||||
exit_code = int(result.group(1))
|
||||
status = result.group(1)
|
||||
exit_code = int(result.group(2))
|
||||
|
||||
if exit_code == 0:
|
||||
if status == "pass":
|
||||
self.logger.update_dut_job("status", "pass")
|
||||
else:
|
||||
self.logger.update_status_fail("test fail")
|
||||
|
@@ -23,7 +23,7 @@ set +x
|
||||
|
||||
# Pass through relevant env vars from the gitlab job to the baremetal init script
|
||||
echo "Variables passed through:"
|
||||
filter_env_vars | tee $rootfs_dst/set-job-env-vars.sh
|
||||
"$CI_COMMON"/export-gitlab-job-env-for-dut.sh | tee $rootfs_dst/set-job-env-vars.sh
|
||||
|
||||
set -x
|
||||
|
||||
|
41
.gitlab-ci/bare-metal/telnet-buffer.py
Executable file
41
.gitlab-ci/bare-metal/telnet-buffer.py
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
# Copyright © 2020 Christian Gmeiner
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Tiny script to read bytes from telnet, and write the output to stdout, with a
|
||||
# buffer in between so we don't lose serial output from its buffer.
|
||||
#
|
||||
|
||||
import sys
|
||||
import telnetlib
|
||||
|
||||
host = sys.argv[1]
|
||||
port = sys.argv[2]
|
||||
|
||||
tn = telnetlib.Telnet(host, port, 1000000)
|
||||
|
||||
while True:
|
||||
bytes = tn.read_some()
|
||||
sys.stdout.buffer.write(bytes)
|
||||
sys.stdout.flush()
|
||||
|
||||
tn.close()
|
@@ -1,95 +0,0 @@
|
||||
.meson-build-for-tests:
|
||||
extends:
|
||||
- .build-linux
|
||||
stage: build-for-tests
|
||||
script:
|
||||
- &meson-build timeout --verbose ${BUILD_JOB_TIMEOUT_OVERRIDE:-$BUILD_JOB_TIMEOUT} bash --login .gitlab-ci/meson/build.sh
|
||||
- .gitlab-ci/prepare-artifacts.sh
|
||||
|
||||
.meson-build-only:
|
||||
extends:
|
||||
- .meson-build-for-tests
|
||||
- .build-only-delayed-rules
|
||||
stage: build-only
|
||||
script:
|
||||
- *meson-build
|
||||
|
||||
# Shared between windows and Linux
|
||||
.build-common:
|
||||
extends: .build-rules
|
||||
# Cancel job if a newer commit is pushed to the same branch
|
||||
interruptible: true
|
||||
variables:
|
||||
# Build jobs are typically taking between 5-12 minutes, depending on how
|
||||
# much they build and how many new Rust compilers we have to build twice.
|
||||
# Allow 25 minutes as a reasonable margin: beyond this point, something
|
||||
# has gone badly wrong, and we should try again to see if we can get
|
||||
# something from it.
|
||||
#
|
||||
# Some jobs not in the critical path use a higher timeout, particularly
|
||||
# when building with ASan or UBSan.
|
||||
BUILD_JOB_TIMEOUT: 12m
|
||||
RUN_MESON_TESTS: "true"
|
||||
timeout: 16m
|
||||
# We don't want to download any previous job's artifacts
|
||||
dependencies: []
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
|
||||
when: always
|
||||
paths:
|
||||
- _build/meson-logs/*.txt
|
||||
- _build/meson-logs/strace
|
||||
- _build/.ninja_log
|
||||
- artifacts
|
||||
|
||||
.build-run-long:
|
||||
variables:
|
||||
BUILD_JOB_TIMEOUT: 18m
|
||||
timeout: 25m
|
||||
|
||||
|
||||
# Just Linux
|
||||
.build-linux:
|
||||
extends: .build-common
|
||||
variables:
|
||||
C_ARGS: >
|
||||
-Wno-error=deprecated-declarations
|
||||
CCACHE_COMPILERCHECK: "content"
|
||||
CCACHE_COMPRESS: "true"
|
||||
CCACHE_DIR: /cache/mesa/ccache
|
||||
# Use ccache transparently, and print stats before/after
|
||||
before_script:
|
||||
- !reference [default, before_script]
|
||||
- |
|
||||
export PATH="/usr/lib/ccache:$PATH"
|
||||
export CCACHE_BASEDIR="$PWD"
|
||||
if test -x /usr/bin/ccache; then
|
||||
section_start ccache_before "ccache stats before build"
|
||||
ccache --show-stats
|
||||
section_end ccache_before
|
||||
fi
|
||||
after_script:
|
||||
- if test -x /usr/bin/ccache; then ccache --show-stats | grep "Hits:"; fi
|
||||
- !reference [default, after_script]
|
||||
|
||||
.build-windows:
|
||||
extends:
|
||||
- .build-common
|
||||
- .windows-docker-tags
|
||||
cache:
|
||||
key: ${CI_JOB_NAME}
|
||||
paths:
|
||||
- subprojects/packagecache
|
||||
|
||||
.ci-deqp-artifacts:
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
|
||||
when: always
|
||||
untracked: false
|
||||
paths:
|
||||
# Watch out! Artifacts are relative to the build dir.
|
||||
# https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
|
||||
- artifacts
|
||||
- _build/meson-logs/*.txt
|
||||
- _build/meson-logs/strace
|
||||
- _build/.ninja_log
|
@@ -1,29 +1,90 @@
|
||||
include:
|
||||
- local: '.gitlab-ci/build/gitlab-ci-inc.yml'
|
||||
# Shared between windows and Linux
|
||||
.build-common:
|
||||
extends: .container+build-rules
|
||||
# Cancel job if a newer commit is pushed to the same branch
|
||||
interruptible: true
|
||||
variables:
|
||||
# Build jobs are typically taking between 5-12 minutes, depending on how
|
||||
# much they build and how many new Rust compilers we have to build twice.
|
||||
# Allow 25 minutes as a reasonable margin: beyond this point, something
|
||||
# has gone badly wrong, and we should try again to see if we can get
|
||||
# something from it.
|
||||
#
|
||||
# Some jobs not in the critical path use a higher timeout, particularly
|
||||
# when building with ASan or UBSan.
|
||||
BUILD_JOB_TIMEOUT: 12m
|
||||
RUN_MESON_TESTS: "true"
|
||||
timeout: 16m
|
||||
# We don't want to download any previous job's artifacts
|
||||
dependencies: []
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
|
||||
when: always
|
||||
paths:
|
||||
- _build/meson-logs/*.txt
|
||||
- _build/meson-logs/strace
|
||||
- _build/.ninja_log
|
||||
- artifacts
|
||||
|
||||
# Git archive
|
||||
.build-run-long:
|
||||
variables:
|
||||
BUILD_JOB_TIMEOUT: 18m
|
||||
timeout: 25m
|
||||
|
||||
make-git-archive:
|
||||
|
||||
# Just Linux
|
||||
.build-linux:
|
||||
extends: .build-common
|
||||
variables:
|
||||
CCACHE_COMPILERCHECK: "content"
|
||||
CCACHE_COMPRESS: "true"
|
||||
CCACHE_DIR: /cache/mesa/ccache
|
||||
# Use ccache transparently, and print stats before/after
|
||||
before_script:
|
||||
- !reference [default, before_script]
|
||||
- |
|
||||
export PATH="/usr/lib/ccache:$PATH"
|
||||
export CCACHE_BASEDIR="$PWD"
|
||||
if test -x /usr/bin/ccache; then
|
||||
section_start ccache_before "ccache stats before build"
|
||||
ccache --show-stats
|
||||
section_end ccache_before
|
||||
fi
|
||||
after_script:
|
||||
- if test -x /usr/bin/ccache; then ccache --show-stats | grep "Hits:"; fi
|
||||
- !reference [default, after_script]
|
||||
|
||||
.build-windows:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: git-archive
|
||||
rules:
|
||||
- !reference [.scheduled_pipeline-rules, rules]
|
||||
- .build-common
|
||||
- .windows-docker-tags
|
||||
cache:
|
||||
key: ${CI_JOB_NAME}
|
||||
paths:
|
||||
- subprojects/packagecache
|
||||
|
||||
.meson-build-for-tests:
|
||||
extends:
|
||||
- .build-linux
|
||||
stage: build-for-tests
|
||||
script:
|
||||
# Compactify the .git directory
|
||||
- git gc --aggressive
|
||||
# Download & cache the perfetto subproject as well.
|
||||
- rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl --fail https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
|
||||
# compress the current folder
|
||||
- tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
|
||||
- &meson-build timeout --verbose ${BUILD_JOB_TIMEOUT_OVERRIDE:-$BUILD_JOB_TIMEOUT} bash --login .gitlab-ci/meson/build.sh
|
||||
- .gitlab-ci/prepare-artifacts.sh
|
||||
|
||||
- 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
|
||||
.meson-build-only:
|
||||
extends:
|
||||
- .meson-build-for-tests
|
||||
- .build-only-delayed-rules
|
||||
stage: build-only
|
||||
script:
|
||||
- *meson-build
|
||||
|
||||
debian-x86_64:
|
||||
|
||||
debian-testing:
|
||||
extends:
|
||||
- .meson-build-for-tests
|
||||
- .use-debian/x86_64_build
|
||||
- .build-run-long # but it really shouldn't! tracked in mesa#12544
|
||||
- .build-run-long # but it really shouldn't! tracked in mesa#12544
|
||||
- .ci-deqp-artifacts
|
||||
variables:
|
||||
UNWIND: "enabled"
|
||||
@@ -34,6 +95,7 @@ debian-x86_64:
|
||||
-D glx=dri
|
||||
-D platforms=x11,wayland
|
||||
GALLIUM_ST: >
|
||||
-D gallium-nine=false
|
||||
-D gallium-rusticl=true
|
||||
-D gallium-va=enabled
|
||||
GALLIUM_DRIVERS: "llvmpipe,softpipe,virgl,radeonsi,zink,iris,svga"
|
||||
@@ -45,14 +107,14 @@ debian-x86_64:
|
||||
-D tools=drm-shim
|
||||
-D valgrind=disabled
|
||||
S3_ARTIFACT_NAME: mesa-x86_64-default-${BUILDTYPE}
|
||||
RUN_MESON_TESTS: "false" # debian-build-x86_64 already runs these
|
||||
RUN_MESON_TESTS: "false" # debian-build-testing already runs these
|
||||
artifacts:
|
||||
reports:
|
||||
junit: artifacts/ci_scripts_report.xml
|
||||
|
||||
debian-x86_64-asan:
|
||||
debian-testing-asan:
|
||||
extends:
|
||||
- debian-x86_64
|
||||
- debian-testing
|
||||
- .meson-build-for-tests
|
||||
- .build-run-long
|
||||
variables:
|
||||
@@ -60,23 +122,25 @@ debian-x86_64-asan:
|
||||
GALLIUM_DRIVERS: "llvmpipe,softpipe"
|
||||
C_ARGS: >
|
||||
-Wno-error=stringop-truncation
|
||||
-Wno-error=deprecated-declarations
|
||||
EXTRA_OPTION: >
|
||||
-D b_sanitize=address
|
||||
-D gallium-va=false
|
||||
-D gallium-nine=false
|
||||
-D gallium-rusticl=false
|
||||
-D mesa-clc=system
|
||||
-D tools=dlclose-skip
|
||||
-D valgrind=disabled
|
||||
S3_ARTIFACT_NAME: mesa-x86_64-asan-${BUILDTYPE}
|
||||
S3_ARTIFACT_NAME: ""
|
||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
||||
RUN_MESON_TESTS: "false" # just too slow
|
||||
RUN_MESON_TESTS: "false" # just too slow
|
||||
# Do a host build for mesa-clc (asan complains not being loaded as
|
||||
# the first library)
|
||||
HOST_BUILD_OPTIONS: >
|
||||
-D build-tests=false
|
||||
-D enable-glcpp-tests=false
|
||||
-D gallium-opencl=disabled
|
||||
-D gallium-rusticl=false
|
||||
-D gallium-nine=false
|
||||
-D gallium-drivers=
|
||||
-D glx=disabled
|
||||
-D install-mesa-clc=true
|
||||
@@ -85,7 +149,7 @@ debian-x86_64-asan:
|
||||
-D video-codecs=
|
||||
-D vulkan-drivers=
|
||||
|
||||
debian-x86_64-msan:
|
||||
debian-testing-msan:
|
||||
# https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo
|
||||
# msan cannot fully work until it's used together with msan libc
|
||||
extends:
|
||||
@@ -107,27 +171,14 @@ debian-x86_64-msan:
|
||||
MESON_TEST_ARGS: "--suite glcpp --suite format"
|
||||
GALLIUM_DRIVERS: "freedreno,iris,nouveau,r300,r600,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
|
||||
VULKAN_DRIVERS: intel,amd,broadcom,virtio
|
||||
C_ARGS: >
|
||||
-Wno-error=constant-conversion
|
||||
-Wno-error=enum-conversion
|
||||
-Wno-error=initializer-overrides
|
||||
-Wno-error=sometimes-uninitialized
|
||||
-Werror=misleading-indentation
|
||||
-Wno-error=deprecated-declarations
|
||||
CPP_ARGS: >
|
||||
-Wno-error=c99-designator
|
||||
-Wno-error=overloaded-virtual
|
||||
-Wno-error=tautological-constant-out-of-range-compare
|
||||
-Wno-error=unused-private-field
|
||||
-Wno-error=vla-cxx-extension
|
||||
-Wno-error=deprecated-declarations
|
||||
RUN_MESON_TESTS: "false" # just too slow
|
||||
RUN_MESON_TESTS: "false" # just too slow
|
||||
# Do a host build for mesa-clc and precomp-compiler (msan complains about uninitialized
|
||||
# values in the LLVM libs)
|
||||
HOST_BUILD_OPTIONS: >
|
||||
-D build-tests=false
|
||||
-D enable-glcpp-tests=false
|
||||
-D gallium-drivers=
|
||||
-D gallium-opencl=disabled
|
||||
-D gallium-drivers=panfrost
|
||||
-D vulkan-drivers=
|
||||
-D video-codecs=
|
||||
-D glx=disabled
|
||||
@@ -136,18 +187,16 @@ debian-x86_64-msan:
|
||||
-D install-mesa-clc=true
|
||||
-D precomp-compiler=enabled
|
||||
-D install-precomp-compiler=true
|
||||
-D tools=panfrost
|
||||
|
||||
debian-x86_64-ubsan:
|
||||
debian-testing-ubsan:
|
||||
extends:
|
||||
- debian-x86_64
|
||||
- debian-testing
|
||||
- .meson-build-for-tests
|
||||
- .build-run-long
|
||||
variables:
|
||||
C_ARGS: >
|
||||
-Wno-error=stringop-overflow
|
||||
-Wno-error=stringop-truncation
|
||||
-Wno-error=deprecated-declarations
|
||||
CPP_ARGS: >
|
||||
-Wno-error=array-bounds
|
||||
GALLIUM_DRIVERS: "llvmpipe,softpipe"
|
||||
@@ -157,12 +206,14 @@ debian-x86_64-ubsan:
|
||||
-D mesa-clc=system
|
||||
-D gallium-rusticl=false
|
||||
-D gallium-va=false
|
||||
-D gallium-nine=false
|
||||
S3_ARTIFACT_NAME: ""
|
||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
||||
RUN_MESON_TESTS: "false" # just too slow
|
||||
RUN_MESON_TESTS: "false" # just too slow
|
||||
HOST_BUILD_OPTIONS: >
|
||||
-D build-tests=false
|
||||
-D enable-glcpp-tests=false
|
||||
-D gallium-opencl=disabled
|
||||
-D gallium-rusticl=false
|
||||
-D gallium-drivers=
|
||||
-D vulkan-drivers=
|
||||
@@ -172,28 +223,26 @@ debian-x86_64-ubsan:
|
||||
-D mesa-clc=enabled
|
||||
-D install-mesa-clc=true
|
||||
|
||||
debian-build-x86_64:
|
||||
debian-build-testing:
|
||||
extends:
|
||||
- .meson-build-for-tests
|
||||
- .use-debian/x86_64_build
|
||||
variables:
|
||||
UNWIND: "enabled"
|
||||
C_ARGS: >
|
||||
-Wno-error=deprecated-declarations
|
||||
CPP_ARGS: >
|
||||
-Wno-error=deprecated-declarations
|
||||
DRI_LOADERS: >
|
||||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
-D egl=enabled
|
||||
-D glvnd=disabled
|
||||
-D platforms=x11,wayland
|
||||
-D legacy-x11=dri2
|
||||
GALLIUM_ST: >
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-vdpau=enabled
|
||||
-D gallium-va=enabled
|
||||
-D gallium-xa=enabled
|
||||
-D gallium-nine=true
|
||||
-D gallium-rusticl=false
|
||||
-D legacy-wayland=bind-wayland-display
|
||||
GALLIUM_DRIVERS: "i915,iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
|
||||
VULKAN_DRIVERS: "intel_hasvk,imagination-experimental,microsoft-experimental,nouveau,swrast"
|
||||
BUILDTYPE: "debugoptimized"
|
||||
@@ -201,7 +250,7 @@ debian-build-x86_64:
|
||||
-D spirv-to-dxil=true
|
||||
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi
|
||||
-D perfetto=true
|
||||
S3_ARTIFACT_NAME: debian-build-x86_64
|
||||
S3_ARTIFACT_NAME: debian-build-testing
|
||||
|
||||
# Test a release build with -Werror so new warnings don't sneak in.
|
||||
debian-release:
|
||||
@@ -212,9 +261,6 @@ debian-release:
|
||||
UNWIND: "enabled"
|
||||
C_ARGS: >
|
||||
-Wno-error=stringop-overread
|
||||
-Wno-error=deprecated-declarations
|
||||
CPP_ARGS: >
|
||||
-Wno-error=deprecated-declarations
|
||||
DRI_LOADERS: >
|
||||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
@@ -225,6 +271,8 @@ debian-release:
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-vdpau=enabled
|
||||
-D gallium-va=enabled
|
||||
-D gallium-xa=enabled
|
||||
-D gallium-nine=false
|
||||
-D gallium-rusticl=false
|
||||
-D llvm=enabled
|
||||
GALLIUM_DRIVERS: "i915,iris,nouveau,r300,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
|
||||
@@ -239,7 +287,7 @@ debian-release:
|
||||
BUILDTYPE: "release"
|
||||
S3_ARTIFACT_NAME: "mesa-x86_64-default-${BUILDTYPE}"
|
||||
script:
|
||||
- !reference [.meson-build-only, script]
|
||||
- *meson-build
|
||||
- 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
|
||||
|
||||
alpine-build-testing:
|
||||
@@ -253,7 +301,6 @@ alpine-build-testing:
|
||||
-Wno-error=array-bounds
|
||||
-Wno-error=stringop-overflow
|
||||
-Wno-error=stringop-overread
|
||||
-Wno-error=deprecated-declarations
|
||||
DRI_LOADERS: >
|
||||
-D glx=disabled
|
||||
-D gbm=enabled
|
||||
@@ -265,6 +312,8 @@ alpine-build-testing:
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-vdpau=disabled
|
||||
-D gallium-va=enabled
|
||||
-D gallium-xa=disabled
|
||||
-D gallium-nine=true
|
||||
-D gallium-rusticl=false
|
||||
-D gles1=disabled
|
||||
-D gles2=enabled
|
||||
@@ -293,11 +342,9 @@ fedora-release:
|
||||
-Wno-error=stringop-overread
|
||||
-Wno-error=array-bounds
|
||||
-Wno-error=maybe-uninitialized
|
||||
-Wno-error=deprecated-declarations
|
||||
CPP_ARGS: >
|
||||
-Wno-error=dangling-reference
|
||||
-Wno-error=overloaded-virtual
|
||||
-Wno-error=deprecated-declarations
|
||||
DRI_LOADERS: >
|
||||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
@@ -315,6 +362,8 @@ fedora-release:
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-vdpau=enabled
|
||||
-D gallium-va=enabled
|
||||
-D gallium-xa=enabled
|
||||
-D gallium-nine=false
|
||||
-D gallium-rusticl=true
|
||||
-D gles1=disabled
|
||||
-D gles2=enabled
|
||||
@@ -340,13 +389,11 @@ debian-android:
|
||||
-Wno-error=enum-conversion
|
||||
-Wno-error=initializer-overrides
|
||||
-Wno-error=sometimes-uninitialized
|
||||
-Wno-error=deprecated-declarations
|
||||
CPP_ARGS: >
|
||||
-Wno-error=c99-designator
|
||||
-Wno-error=unused-variable
|
||||
-Wno-error=unused-but-set-variable
|
||||
-Wno-error=self-assign
|
||||
-Wno-error=deprecated-declarations
|
||||
DRI_LOADERS: >
|
||||
-D glx=disabled
|
||||
-D gbm=disabled
|
||||
@@ -355,7 +402,6 @@ debian-android:
|
||||
-D platforms=android
|
||||
FORCE_FALLBACK_FOR: llvm
|
||||
EXTRA_OPTION: >
|
||||
-D amd-use-llvm=false
|
||||
-D android-stub=true
|
||||
-D platform-sdk-version=${ANDROID_SDK_VERSION}
|
||||
-D cpp_rtti=false
|
||||
@@ -366,12 +412,15 @@ debian-android:
|
||||
GALLIUM_ST: >
|
||||
-D gallium-vdpau=disabled
|
||||
-D gallium-va=disabled
|
||||
-D gallium-xa=disabled
|
||||
-D gallium-nine=false
|
||||
-D gallium-rusticl=false
|
||||
PKG_CONFIG_LIBDIR: "/disable/non/android/system/pc/files"
|
||||
HOST_BUILD_OPTIONS: >
|
||||
-D build-tests=false
|
||||
-D enable-glcpp-tests=false
|
||||
-D gallium-drivers=
|
||||
-D gallium-opencl=disabled
|
||||
-D gallium-drivers=panfrost
|
||||
-D vulkan-drivers=
|
||||
-D video-codecs=
|
||||
-D glx=disabled
|
||||
@@ -380,15 +429,17 @@ debian-android:
|
||||
-D install-mesa-clc=true
|
||||
-D precomp-compiler=enabled
|
||||
-D install-precomp-compiler=true
|
||||
-D tools=panfrost
|
||||
S3_ARTIFACT_NAME: mesa-x86_64-android-${BUILDTYPE}
|
||||
script:
|
||||
# x86_64 build:
|
||||
# Can't do AMD drivers because they require LLVM, which is currently
|
||||
# problematic in our Android builds.
|
||||
- export CROSS=x86_64-linux-android
|
||||
- export GALLIUM_DRIVERS=iris,radeonsi,softpipe,virgl,zink
|
||||
- export VULKAN_DRIVERS=amd,intel,swrast,virtio
|
||||
- export GALLIUM_DRIVERS=iris,virgl,zink,softpipe
|
||||
- export VULKAN_DRIVERS=intel,virtio,swrast
|
||||
- .gitlab-ci/create-llvm-meson-wrap-file.sh
|
||||
- !reference [.meson-build-for-tests, script]
|
||||
- *meson-build
|
||||
- .gitlab-ci/prepare-artifacts.sh
|
||||
# remove all the files created by the previous build before the next build
|
||||
- git clean -dxf .
|
||||
# aarch64 build:
|
||||
@@ -398,7 +449,7 @@ debian-android:
|
||||
- export CROSS=aarch64-linux-android
|
||||
- export GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d
|
||||
- export VULKAN_DRIVERS=freedreno,broadcom,virtio
|
||||
- !reference [.meson-build-only, script]
|
||||
- *meson-build
|
||||
|
||||
.meson-cross:
|
||||
extends:
|
||||
@@ -414,6 +465,8 @@ debian-android:
|
||||
GALLIUM_ST: >
|
||||
-D gallium-vdpau=disabled
|
||||
-D gallium-va=disabled
|
||||
-D gallium-xa=disabled
|
||||
-D gallium-nine=false
|
||||
|
||||
.meson-arm:
|
||||
extends:
|
||||
@@ -445,7 +498,8 @@ debian-arm32:
|
||||
HOST_BUILD_OPTIONS: >
|
||||
-D build-tests=false
|
||||
-D enable-glcpp-tests=false
|
||||
-D gallium-drivers=
|
||||
-D gallium-opencl=disabled
|
||||
-D gallium-drivers=panfrost
|
||||
-D vulkan-drivers=
|
||||
-D video-codecs=
|
||||
-D glx=disabled
|
||||
@@ -454,7 +508,6 @@ debian-arm32:
|
||||
-D install-mesa-clc=true
|
||||
-D precomp-compiler=enabled
|
||||
-D install-precomp-compiler=true
|
||||
-D tools=panfrost
|
||||
S3_ARTIFACT_NAME: mesa-arm32-default-${BUILDTYPE}
|
||||
# The strip command segfaults, failing to strip the binary and leaving
|
||||
# tempfiles in our artifacts.
|
||||
@@ -477,7 +530,7 @@ debian-arm32-asan:
|
||||
-D tools=dlclose-skip
|
||||
-D gallium-rusticl=false
|
||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
||||
RUN_MESON_TESTS: "false" # just too slow
|
||||
RUN_MESON_TESTS: "false" # just too slow
|
||||
S3_ARTIFACT_NAME: mesa-arm32-asan-${BUILDTYPE}
|
||||
|
||||
debian-arm64:
|
||||
@@ -489,7 +542,6 @@ debian-arm64:
|
||||
C_ARGS: >
|
||||
-Wno-error=array-bounds
|
||||
-Wno-error=stringop-truncation
|
||||
-Wno-error=deprecated-declarations
|
||||
GALLIUM_DRIVERS: "etnaviv,freedreno,lima,panfrost,v3d,vc4,zink"
|
||||
VULKAN_DRIVERS: "broadcom,freedreno,panfrost"
|
||||
DRI_LOADERS:
|
||||
@@ -501,7 +553,7 @@ debian-arm64:
|
||||
-D teflon=true
|
||||
GALLIUM_ST:
|
||||
-D gallium-rusticl=true
|
||||
RUN_MESON_TESTS: "false" # run by debian-arm64-build-testing
|
||||
RUN_MESON_TESTS: "false" # run by debian-arm64-build-testing
|
||||
S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
|
||||
|
||||
debian-arm64-asan:
|
||||
@@ -512,8 +564,6 @@ debian-arm64-asan:
|
||||
variables:
|
||||
VULKAN_DRIVERS: "broadcom,freedreno"
|
||||
GALLIUM_DRIVERS: "freedreno,vc4,v3d"
|
||||
C_ARGS: >
|
||||
-Wno-error=deprecated-declarations
|
||||
DRI_LOADERS:
|
||||
-D glvnd=disabled
|
||||
EXTRA_OPTION: >
|
||||
@@ -522,7 +572,7 @@ debian-arm64-asan:
|
||||
-D tools=dlclose-skip
|
||||
-D gallium-rusticl=false
|
||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
||||
RUN_MESON_TESTS: "false" # just too slow
|
||||
RUN_MESON_TESTS: "false" # just too slow
|
||||
S3_ARTIFACT_NAME: mesa-arm64-asan-${BUILDTYPE}
|
||||
|
||||
debian-arm64-ubsan:
|
||||
@@ -537,7 +587,6 @@ debian-arm64-ubsan:
|
||||
-Wno-error=array-bounds
|
||||
-Wno-error=stringop-overflow
|
||||
-Wno-error=stringop-truncation
|
||||
-Wno-error=deprecated-declarations
|
||||
CPP_ARGS: >
|
||||
-Wno-error=array-bounds
|
||||
-fno-var-tracking-assignments
|
||||
@@ -547,7 +596,7 @@ debian-arm64-ubsan:
|
||||
-D b_sanitize=undefined
|
||||
-D gallium-rusticl=false
|
||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
||||
RUN_MESON_TESTS: "false" # just too slow
|
||||
RUN_MESON_TESTS: "false" # just too slow
|
||||
S3_ARTIFACT_NAME: mesa-arm64-ubsan-${BUILDTYPE}
|
||||
|
||||
debian-arm64-build-test:
|
||||
@@ -572,10 +621,10 @@ debian-arm64-release:
|
||||
S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
|
||||
C_ARGS: >
|
||||
-Wno-error=array-bounds
|
||||
-Wno-error=stringop-truncation
|
||||
-Wno-error=stringop-overread
|
||||
-Wno-error=deprecated-declarations
|
||||
script:
|
||||
- !reference [.meson-build-only, script]
|
||||
- *meson-build
|
||||
- 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
|
||||
|
||||
debian-no-libdrm:
|
||||
@@ -587,8 +636,9 @@ debian-no-libdrm:
|
||||
GALLIUM_DRIVERS: "zink,llvmpipe"
|
||||
BUILDTYPE: release
|
||||
C_ARGS: >
|
||||
-Wno-error=array-bounds
|
||||
-Wno-error=stringop-truncation
|
||||
-Wno-error=stringop-overread
|
||||
-Wno-error=deprecated-declarations
|
||||
EXTRA_OPTION: >
|
||||
-D freedreno-kmds=kgsl
|
||||
-D glx=disabled
|
||||
@@ -609,14 +659,12 @@ debian-clang:
|
||||
-Wno-error=initializer-overrides
|
||||
-Wno-error=sometimes-uninitialized
|
||||
-Werror=misleading-indentation
|
||||
-Wno-error=deprecated-declarations
|
||||
CPP_ARGS: >
|
||||
-Wno-error=c99-designator
|
||||
-Wno-error=overloaded-virtual
|
||||
-Wno-error=tautological-constant-out-of-range-compare
|
||||
-Wno-error=unused-private-field
|
||||
-Wno-error=vla-cxx-extension
|
||||
-Wno-error=deprecated-declarations
|
||||
DRI_LOADERS: >
|
||||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
@@ -627,6 +675,8 @@ debian-clang:
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-vdpau=enabled
|
||||
-D gallium-va=enabled
|
||||
-D gallium-xa=enabled
|
||||
-D gallium-nine=true
|
||||
-D gles1=enabled
|
||||
-D gles2=enabled
|
||||
-D llvm=enabled
|
||||
@@ -656,19 +706,6 @@ debian-clang-release:
|
||||
- .build-run-long
|
||||
variables:
|
||||
BUILDTYPE: "release"
|
||||
C_ARGS: >
|
||||
-Wno-error=constant-conversion
|
||||
-Wno-error=enum-conversion
|
||||
-Wno-error=initializer-overrides
|
||||
-Wno-error=sometimes-uninitialized
|
||||
-Wno-error=deprecated-declarations
|
||||
CPP_ARGS: >
|
||||
-Wno-error=c99-designator
|
||||
-Wno-error=overloaded-virtual
|
||||
-Wno-error=tautological-constant-out-of-range-compare
|
||||
-Wno-error=unused-private-field
|
||||
-Wno-error=vla-cxx-extension
|
||||
-Wno-error=deprecated-declarations
|
||||
DRI_LOADERS: >
|
||||
-D glx=xlib
|
||||
-D platforms=x11,wayland
|
||||
@@ -676,6 +713,8 @@ debian-clang-release:
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-vdpau=enabled
|
||||
-D gallium-va=enabled
|
||||
-D gallium-xa=enabled
|
||||
-D gallium-nine=true
|
||||
-D gles1=disabled
|
||||
-D gles2=disabled
|
||||
-D llvm=enabled
|
||||
@@ -714,6 +753,8 @@ debian-vulkan:
|
||||
GALLIUM_ST: >
|
||||
-D gallium-vdpau=disabled
|
||||
-D gallium-va=disabled
|
||||
-D gallium-xa=disabled
|
||||
-D gallium-nine=false
|
||||
-D gallium-rusticl=false
|
||||
-D b_sanitize=undefined
|
||||
-D c_args=-fno-sanitize-recover=all
|
||||
@@ -732,7 +773,7 @@ debian-x86_32:
|
||||
- .meson-cross
|
||||
- .use-debian/x86_32_build
|
||||
- .meson-build-only
|
||||
- .build-run-long # it's not clear why this runs long, but it also doesn't matter much
|
||||
- .build-run-long # it's not clear why this runs long, but it also doesn't matter much
|
||||
variables:
|
||||
BUILDTYPE: debug
|
||||
CROSS: i386
|
||||
@@ -743,8 +784,6 @@ debian-x86_32:
|
||||
EXTRA_OPTION: >
|
||||
-D vulkan-layers=device-select,overlay
|
||||
-D mesa-clc=system
|
||||
CPP_ARGS: >
|
||||
-Wno-error=deprecated-declarations
|
||||
C_LINK_ARGS: >
|
||||
-Wl,--no-warn-rwx-segments
|
||||
CPP_LINK_ARGS: >
|
||||
@@ -752,6 +791,7 @@ debian-x86_32:
|
||||
HOST_BUILD_OPTIONS: >
|
||||
-D build-tests=false
|
||||
-D enable-glcpp-tests=false
|
||||
-D gallium-opencl=disabled
|
||||
-D gallium-drivers=
|
||||
-D vulkan-drivers=
|
||||
-D video-codecs=
|
||||
@@ -790,3 +830,18 @@ debian-ppc64el:
|
||||
VULKAN_DRIVERS: "swrast"
|
||||
DRI_LOADERS:
|
||||
-D glvnd=disabled
|
||||
|
||||
# This job emits our scripts into artifacts so they can be reused for
|
||||
# job submission to hardware devices.
|
||||
python-artifacts:
|
||||
stage: build-for-tests
|
||||
extends:
|
||||
- .use-debian/x86_64_pyutils
|
||||
- .build-common
|
||||
- .meson-build-for-tests
|
||||
variables:
|
||||
GIT_STRATEGY: fetch
|
||||
S3_ARTIFACT_NAME: mesa-python-ci-artifacts
|
||||
timeout: 10m
|
||||
script:
|
||||
- .gitlab-ci/prepare-artifacts-python.sh
|
||||
|
@@ -1,268 +0,0 @@
|
||||
# For CI-tron based testing farm jobs.
|
||||
.ci-tron-test:
|
||||
extends:
|
||||
- .ci-tron-b2c-job-v1
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
B2C_VERSION: v0.9.15.1 # Linux 6.13.7
|
||||
|
||||
SCRIPTS_DIR: install
|
||||
|
||||
CI_TRON_PATTERN__JOB_SUCCESS__REGEX: 'hwci: mesa: exit_code: 0\r$'
|
||||
CI_TRON_PATTERN__SESSION_END__REGEX: '^.*It''s now safe to turn off your computer\r$'
|
||||
|
||||
CI_TRON_TIMEOUT__FIRST_CONSOLE_ACTIVITY__MINUTES: 2
|
||||
CI_TRON_TIMEOUT__FIRST_CONSOLE_ACTIVITY__RETRIES: 3
|
||||
CI_TRON_TIMEOUT__CONSOLE_ACTIVITY__MINUTES: 5
|
||||
|
||||
CI_TRON__B2C_ARTIFACT_EXCLUSION: "*.shader_cache,install/*,*/install/*,*/vkd3d-proton.cache*,vkd3d-proton.cache*,*.qpa"
|
||||
CI_TRON_HTTP_ARTIFACT__INSTALL__PATH: "/install.tar.zst"
|
||||
CI_TRON_HTTP_ARTIFACT__INSTALL__URL: "https://$PIPELINE_ARTIFACTS_BASE/$S3_ARTIFACT_NAME.tar.zst"
|
||||
|
||||
CI_TRON__B2C_MACHINE_REGISTRATION_CMD: "setup --tags $CI_TRON_DUT_SETUP_TAGS"
|
||||
CI_TRON__B2C_IMAGE_UNDER_TEST: $MESA_IMAGE
|
||||
CI_TRON__B2C_EXEC_CMD: "curl --silent --fail-with-body {{ job.http.url }}$CI_TRON_HTTP_ARTIFACT__INSTALL__PATH | tar --zstd --extract && $SCRIPTS_DIR/common/init-stage2.sh"
|
||||
|
||||
# Assume by default this is running deqp, as that's almost always true
|
||||
HWCI_TEST_SCRIPT: install/deqp-runner.sh
|
||||
|
||||
# Keep the job script in the artifacts
|
||||
CI_TRON_JOB_SCRIPT_PATH: results/job_script.sh
|
||||
needs:
|
||||
- !reference [.required-for-hardware-jobs, needs]
|
||||
tags:
|
||||
- farm:$RUNNER_FARM_LOCATION
|
||||
- $CI_TRON_DUT_SETUP_TAGS
|
||||
|
||||
# Override the default before_script, as it is not compatible with the CI-tron environment. We just keep the clearing
|
||||
# of the JWT token for security reasons
|
||||
before_script:
|
||||
- |
|
||||
set -eu
|
||||
|
||||
eval "$S3_JWT_FILE_SCRIPT"
|
||||
|
||||
for var in CI_TRON_DUT_SETUP_TAGS; do
|
||||
if [[ -z "$(eval echo \${$var:-})" ]]; then
|
||||
echo "The required variable '$var' is missing"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Open a section that will be closed by b2c
|
||||
echo -e "\n\e[0Ksection_start:`date +%s`:b2c_kernel_boot[collapsed=true]\r\e[0K\e[0;36m[$(cut -d ' ' -f1 /proc/uptime)]: Submitting the CI-tron job and booting the DUT\e[0m\n"
|
||||
|
||||
# Anything our job places in results/ will be collected by the
|
||||
# Gitlab coordinator for status presentation. results/junit.xml
|
||||
# will be parsed by the UI for more detailed explanations of
|
||||
# test execution.
|
||||
artifacts:
|
||||
when: always
|
||||
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
|
||||
paths:
|
||||
- results
|
||||
reports:
|
||||
junit: results/**/junit.xml
|
||||
|
||||
.ci-tron-x86_64-test:
|
||||
extends:
|
||||
- .ci-tron-test
|
||||
variables:
|
||||
CI_TRON_INITRAMFS__B2C__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/initramfs.linux_amd64.cpio.xz'
|
||||
CI_TRON_KERNEL__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-x86_64'
|
||||
|
||||
# Set the following variables if you need AMD, Intel, or NVIDIA support
|
||||
# CI_TRON_INITRAMFS__DEPMOD__URL: "https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-x86_64.depmod.cpio.xz"
|
||||
# CI_TRON_INITRAMFS__GPU__URL: "https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-x86_64.gpu.cpio"
|
||||
# CI_TRON_INITRAMFS__GPU__FORMAT__0__ARCHIVE__KEEP__0__PATH: "(lib/(modules|firmware/amdgpu)/.*)"
|
||||
|
||||
S3_ARTIFACT_NAME: "mesa-x86_64-default-debugoptimized"
|
||||
|
||||
.ci-tron-x86_64-test-vk:
|
||||
extends:
|
||||
- .use-debian/x86_64_test-vk
|
||||
- .ci-tron-x86_64-test
|
||||
needs:
|
||||
- job: debian/x86_64_test-vk
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-x86_64
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
||||
|
||||
.ci-tron-x86_64-test-vk-manual:
|
||||
extends:
|
||||
- .use-debian/x86_64_test-vk
|
||||
- .ci-tron-x86_64-test
|
||||
variables:
|
||||
S3_ARTIFACT_NAME: "debian-build-x86_64"
|
||||
needs:
|
||||
- job: debian/x86_64_test-vk
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-build-x86_64
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
||||
|
||||
.ci-tron-x86_64-test-gl:
|
||||
extends:
|
||||
- .use-debian/x86_64_test-gl
|
||||
- .ci-tron-x86_64-test
|
||||
needs:
|
||||
- job: debian/x86_64_test-gl
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-x86_64
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
||||
|
||||
.ci-tron-x86_64-test-gl-manual:
|
||||
extends:
|
||||
- .use-debian/x86_64_test-gl
|
||||
- .ci-tron-x86_64-test
|
||||
variables:
|
||||
S3_ARTIFACT_NAME: "debian-build-x86_64"
|
||||
needs:
|
||||
- job: debian/x86_64_test-gl
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-build-x86_64
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
||||
|
||||
.ci-tron-arm64-test:
|
||||
extends:
|
||||
- .ci-tron-test
|
||||
variables:
|
||||
CI_TRON_INITRAMFS__B2C__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/initramfs.linux_arm64.cpio.xz'
|
||||
CI_TRON_KERNEL__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-arm64'
|
||||
S3_ARTIFACT_NAME: "mesa-arm64-default-debugoptimized"
|
||||
|
||||
.ci-tron-arm64-test-vk:
|
||||
extends:
|
||||
- .use-debian/arm64_test-vk
|
||||
- .ci-tron-arm64-test
|
||||
needs:
|
||||
- job: debian/arm64_test-vk
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-arm64
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
||||
|
||||
.ci-tron-arm64-test-asan-vk:
|
||||
extends:
|
||||
- .use-debian/arm64_test-vk
|
||||
- .ci-tron-arm64-test
|
||||
variables:
|
||||
S3_ARTIFACT_NAME: "mesa-arm64-asan-debugoptimized"
|
||||
DEQP_FORCE_ASAN: 1
|
||||
needs:
|
||||
- job: debian/arm64_test-vk
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-arm64-asan
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
||||
|
||||
.ci-tron-arm64-test-ubsan-vk:
|
||||
extends:
|
||||
- .use-debian/arm64_test-vk
|
||||
- .ci-tron-arm64-test
|
||||
variables:
|
||||
S3_ARTIFACT_NAME: "mesa-arm64-ubsan-debugoptimized"
|
||||
needs:
|
||||
- job: debian/arm64_test-vk
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-arm64-ubsan
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
||||
|
||||
.ci-tron-arm64-test-gl:
|
||||
extends:
|
||||
- .use-debian/arm64_test-gl
|
||||
- .ci-tron-arm64-test
|
||||
needs:
|
||||
- job: debian/arm64_test-gl
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-arm64
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
||||
|
||||
.ci-tron-arm64-test-asan-gl:
|
||||
extends:
|
||||
- .use-debian/arm64_test-gl
|
||||
- .ci-tron-arm64-test
|
||||
variables:
|
||||
S3_ARTIFACT_NAME: "mesa-arm64-asan-debugoptimized"
|
||||
DEQP_FORCE_ASAN: 1
|
||||
needs:
|
||||
- job: debian/arm64_test-gl
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-arm64-asan
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
||||
|
||||
.ci-tron-arm64-test-ubsan-gl:
|
||||
extends:
|
||||
- .use-debian/arm64_test-gl
|
||||
- .ci-tron-arm64-test
|
||||
variables:
|
||||
S3_ARTIFACT_NAME: "mesa-arm64-ubsan-debugoptimized"
|
||||
needs:
|
||||
- job: debian/arm64_test-gl
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-arm64-ubsan
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
||||
|
||||
.ci-tron-arm32-test:
|
||||
extends:
|
||||
- .ci-tron-test
|
||||
variables:
|
||||
CI_TRON_INITRAMFS__B2C__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/initramfs.linux_arm.cpio.xz'
|
||||
CI_TRON_KERNEL__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-arm'
|
||||
S3_ARTIFACT_NAME: "mesa-arm32-default-debugoptimized"
|
||||
|
||||
.ci-tron-arm32-test-vk:
|
||||
extends:
|
||||
- .use-debian/arm32_test-vk
|
||||
- .ci-tron-arm32-test
|
||||
needs:
|
||||
- job: debian/arm32_test-vk
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-arm32
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
||||
|
||||
.ci-tron-arm32-test-gl:
|
||||
extends:
|
||||
- .use-debian/arm32_test-gl
|
||||
- .ci-tron-arm32-test
|
||||
needs:
|
||||
- job: debian/arm32_test-gl
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-arm32
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
||||
|
||||
.ci-tron-arm32-test-asan-gl:
|
||||
extends:
|
||||
- .use-debian/arm32_test-gl
|
||||
- .ci-tron-arm32-test
|
||||
variables:
|
||||
S3_ARTIFACT_NAME: "mesa-arm32-asan-debugoptimized"
|
||||
DEQP_FORCE_ASAN: 1
|
||||
needs:
|
||||
- job: debian/arm32_test-gl
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: debian-arm32-asan
|
||||
artifacts: false
|
||||
- !reference [.ci-tron-test, needs]
|
142
.gitlab-ci/common/export-gitlab-job-env-for-dut.sh
Executable file
142
.gitlab-ci/common/export-gitlab-job-env-for-dut.sh
Executable file
@@ -0,0 +1,142 @@
|
||||
#!/bin/bash
|
||||
|
||||
VARS=(
|
||||
ACO_DEBUG
|
||||
ANGLE_TAG
|
||||
ANGLE_TRACE_FILES_TAG
|
||||
ANV_DEBUG
|
||||
ARTIFACTS_BASE_URL
|
||||
ASAN_OPTIONS
|
||||
BASE_SYSTEM_FORK_HOST_PREFIX
|
||||
BASE_SYSTEM_MAINLINE_HOST_PREFIX
|
||||
CI_COMMIT_BRANCH
|
||||
CI_COMMIT_REF_NAME
|
||||
CI_COMMIT_TITLE
|
||||
CI_JOB_ID
|
||||
CI_JOB_NAME
|
||||
CI_JOB_STARTED_AT
|
||||
CI_JOB_URL
|
||||
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
||||
CI_MERGE_REQUEST_TITLE
|
||||
CI_NODE_INDEX
|
||||
CI_NODE_TOTAL
|
||||
CI_PAGES_DOMAIN
|
||||
CI_PIPELINE_ID
|
||||
CI_PIPELINE_URL
|
||||
CI_PROJECT_DIR
|
||||
CI_PROJECT_NAME
|
||||
CI_PROJECT_PATH
|
||||
CI_PROJECT_ROOT_NAMESPACE
|
||||
CI_RUNNER_DESCRIPTION
|
||||
CI_SERVER_URL
|
||||
CROSVM_GALLIUM_DRIVER
|
||||
CROSVM_GPU_ARGS
|
||||
CURRENT_SECTION
|
||||
DEQP_BIN_DIR
|
||||
DEQP_FORCE_ASAN
|
||||
DEQP_FRACTION
|
||||
DEQP_RUNNER_MAX_FAILS
|
||||
DEQP_SUITE
|
||||
DEQP_TEMP_DIR
|
||||
DEVICE_NAME
|
||||
DRIVER_NAME
|
||||
EGL_PLATFORM
|
||||
ETNA_MESA_DEBUG
|
||||
FDO_CI_CONCURRENT
|
||||
FDO_HTTP_CACHE_URI
|
||||
FDO_UPSTREAM_REPO
|
||||
FD_MESA_DEBUG
|
||||
FLAKES_CHANNEL
|
||||
FLUSTER_CODECS
|
||||
FLUSTER_FRACTION
|
||||
FLUSTER_VECTORS_VERSION
|
||||
FREEDRENO_HANGCHECK_MS
|
||||
GALLIUM_DRIVER
|
||||
GALLIVM_PERF
|
||||
GPU_VERSION
|
||||
GTEST
|
||||
GTEST_FAILS
|
||||
GTEST_FRACTION
|
||||
GTEST_RUNNER_OPTIONS
|
||||
GTEST_SKIPS
|
||||
HWCI_FREQ_MAX
|
||||
HWCI_KERNEL_MODULES
|
||||
HWCI_KVM
|
||||
HWCI_START_WESTON
|
||||
HWCI_START_XORG
|
||||
HWCI_TEST_ARGS
|
||||
HWCI_TEST_SCRIPT
|
||||
INTEL_XE_IGNORE_EXPERIMENTAL_WARNING
|
||||
IR3_SHADER_DEBUG
|
||||
JOB_ARTIFACTS_BASE
|
||||
JOB_RESULTS_PATH
|
||||
JOB_ROOTFS_OVERLAY_PATH
|
||||
KERNEL_IMAGE_BASE
|
||||
KERNEL_IMAGE_NAME
|
||||
LD_LIBRARY_PATH
|
||||
LIBGL_ALWAYS_SOFTWARE
|
||||
LP_NUM_THREADS
|
||||
LVP_POISON_MEMORY
|
||||
MESA_BASE_TAG
|
||||
MESA_BUILD_PATH
|
||||
MESA_DEBUG
|
||||
MESA_GLES_VERSION_OVERRIDE
|
||||
MESA_GLSL_VERSION_OVERRIDE
|
||||
MESA_GL_VERSION_OVERRIDE
|
||||
MESA_IMAGE
|
||||
MESA_IMAGE_PATH
|
||||
MESA_IMAGE_TAG
|
||||
MESA_LOADER_DRIVER_OVERRIDE
|
||||
MESA_SPIRV_LOG_LEVEL
|
||||
MESA_TEMPLATES_COMMIT
|
||||
MESA_VK_ABORT_ON_DEVICE_LOSS
|
||||
MESA_VK_IGNORE_CONFORMANCE_WARNING
|
||||
NIR_DEBUG
|
||||
PANVK_DEBUG
|
||||
PAN_I_WANT_A_BROKEN_VULKAN_DRIVER
|
||||
PAN_MESA_DEBUG
|
||||
PIGLIT_FRACTION
|
||||
PIGLIT_NO_WINDOW
|
||||
PIGLIT_OPTIONS
|
||||
PIGLIT_PLATFORM
|
||||
PIGLIT_REPLAY_ANGLE_ARCH
|
||||
PIGLIT_REPLAY_ARTIFACTS_BASE_URL
|
||||
PIGLIT_REPLAY_DEVICE_NAME
|
||||
PIGLIT_REPLAY_EXTRA_ARGS
|
||||
PIGLIT_REPLAY_LOOP_TIMES
|
||||
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE
|
||||
PIGLIT_REPLAY_SUBCOMMAND
|
||||
PIGLIT_RESULTS
|
||||
PIGLIT_RUNNER_OPTIONS
|
||||
PIGLIT_TESTS
|
||||
PIGLIT_TRACES_FILE
|
||||
PIPELINE_ARTIFACTS_BASE
|
||||
RADEON_DEBUG
|
||||
RADV_DEBUG
|
||||
radv_enable_float16_gfx8
|
||||
RADV_PERFTEST
|
||||
S3_HOST
|
||||
S3_JWT_FILE
|
||||
S3_RESULTS_UPLOAD
|
||||
SKQP_ASSETS_DIR
|
||||
SKQP_BACKENDS
|
||||
STORAGE_FORK_HOST_PATH
|
||||
STORAGE_MAINLINE_HOST_PATH
|
||||
TU_DEBUG
|
||||
VIRGL_HOST_API
|
||||
VIRGL_RENDER_SERVER
|
||||
VK_DRIVER
|
||||
WAFFLE_PLATFORM
|
||||
ZINK_DEBUG
|
||||
ZINK_DESCRIPTORS
|
||||
|
||||
# Dead code within Mesa CI, but required by virglrender CI
|
||||
# (because they include our files in their CI)
|
||||
VK_DRIVER_FILES
|
||||
)
|
||||
|
||||
for var in "${VARS[@]}"; do
|
||||
if [ -n "${!var+x}" ]; then
|
||||
echo "export $var=${!var@Q}"
|
||||
fi
|
||||
done
|
@@ -3,10 +3,6 @@
|
||||
# Very early init, used to make sure devices and network are set up and
|
||||
# reachable.
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# ALPINE_X86_64_LAVA_TRIGGER_TAG
|
||||
|
||||
set -ex
|
||||
|
||||
cd /
|
||||
@@ -27,8 +23,3 @@ 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
|
||||
|
||||
# Create a symlink from /dev/fd to /proc/self/fd if /dev/fd is missing.
|
||||
if [ ! -e /dev/fd ]; then
|
||||
ln -s /proc/self/fd /dev/fd
|
||||
fi
|
||||
|
@@ -76,7 +76,9 @@ fi
|
||||
# - vmx for Intel VT
|
||||
# - svm for AMD-V
|
||||
#
|
||||
if [ -n "$HWCI_ENABLE_X86_KVM" ]; then
|
||||
# Additionally, download the kernel image to boot the VM via HWCI_TEST_SCRIPT.
|
||||
#
|
||||
if [ "$HWCI_KVM" = "true" ]; then
|
||||
unset KVM_KERNEL_MODULE
|
||||
{
|
||||
grep -qs '\bvmx\b' /proc/cpuinfo && KVM_KERNEL_MODULE=kvm_intel
|
||||
@@ -89,6 +91,11 @@ if [ -n "$HWCI_ENABLE_X86_KVM" ]; then
|
||||
echo "WARNING: Failed to detect CPU virtualization extensions"
|
||||
} || \
|
||||
modprobe ${KVM_KERNEL_MODULE}
|
||||
|
||||
mkdir -p /kernel
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "/kernel/${KERNEL_IMAGE_NAME}" \
|
||||
"${KERNEL_IMAGE_BASE}/amd64/${KERNEL_IMAGE_NAME}"
|
||||
fi
|
||||
|
||||
# Fix prefix confusion: the build installs to $CI_PROJECT_DIR, but we expect
|
||||
@@ -102,9 +109,6 @@ export LIBGL_DRIVERS_PATH=/install/lib/dri
|
||||
# telling it to look in /usr/local/lib.
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
|
||||
|
||||
# The Broadcom devices need /usr/local/bin unconditionally added to the path
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
|
||||
# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
|
||||
export XDG_CACHE_HOME=/tmp
|
||||
|
||||
@@ -198,7 +202,8 @@ if [ -n "$HWCI_START_WESTON" ]; then
|
||||
export DISPLAY=:0
|
||||
mkdir -p /tmp/.X11-unix
|
||||
|
||||
env weston --config="/install/common/weston.ini" -Swayland-0 --use-gl &
|
||||
env \
|
||||
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
|
||||
@@ -225,9 +230,13 @@ cleanup
|
||||
# upload artifacts (lava jobs)
|
||||
if [ -n "$S3_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
|
||||
s3_upload results.tar.zst "https://${S3_RESULTS_UPLOAD}/"
|
||||
fi
|
||||
|
||||
# We still need to echo the hwci: mesa message, as some scripts rely on it, such
|
||||
# as the python ones inside the bare-metal folder
|
||||
[ ${EXIT_CODE} -eq 0 ] && RESULT=pass || RESULT=fail
|
||||
|
||||
set +x
|
||||
section_end post_test_cleanup
|
||||
|
||||
@@ -235,6 +244,6 @@ section_end post_test_cleanup
|
||||
# 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: exit_code: $EXIT_CODE"; sleep 1; echo; done
|
||||
for _ in $(seq 0 3); do echo "hwci: mesa: $RESULT, exit_code: $EXIT_CODE"; sleep 1; echo; done
|
||||
|
||||
exit $EXIT_CODE
|
||||
|
@@ -1,7 +0,0 @@
|
||||
[core]
|
||||
backend=headless-backend.so
|
||||
xwayland=true
|
||||
idle-time=0
|
||||
|
||||
[xwayland]
|
||||
path=/usr/local/bin/Xwayland
|
@@ -1,7 +1,2 @@
|
||||
variables:
|
||||
CONDITIONAL_BUILD_ANDROID_CTS_TAG: b018634d732f438027ec58c0383615e7
|
||||
CONDITIONAL_BUILD_ANGLE_TAG: f62910e55be46e37cc867d037e4a8121
|
||||
CONDITIONAL_BUILD_CROSVM_TAG: 0f59350b1052bdbb28b65a832b494377
|
||||
CONDITIONAL_BUILD_FLUSTER_TAG: 3bc3afd7468e106afcbfd569a85f34f9
|
||||
CONDITIONAL_BUILD_PIGLIT_TAG: 827b708ab7309721395ea28cec512968
|
||||
CONDITIONAL_BUILD_VKD3D_PROTON_TAG: 82cadf35246e64a8228bf759c9c19e5b
|
||||
CONDITIONAL_BUILD_ANGLE_TAG: ab19bccfd3858c539ba8cb8d9b52a003
|
||||
|
@@ -1,70 +0,0 @@
|
||||
# Build the CI Alpine docker images.
|
||||
#
|
||||
# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
|
||||
# image doesn't exist yet, the container stage job generates it.
|
||||
#
|
||||
# In order to generate a new image, one should generally change the tag.
|
||||
# While removing the image from the registry would also work, that's not
|
||||
# recommended except for ephemeral images during development: Replacing
|
||||
# an image after a significant amount of time might pull in newer
|
||||
# versions of gcc/clang or other packages, which might break the build
|
||||
# with older commits using the same tag.
|
||||
#
|
||||
# After merging a change resulting in generating a new image to the
|
||||
# main repository, it's recommended to remove the image from the source
|
||||
# repository's container registry, so that the image from the main
|
||||
# repository's registry will be used there as well.
|
||||
|
||||
# Alpine based x86_64 build image
|
||||
.alpine/x86_64_build-base:
|
||||
extends:
|
||||
- .fdo.container-build@alpine
|
||||
- .container
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "3.21"
|
||||
FDO_BASE_IMAGE: alpine:$FDO_DISTRIBUTION_VERSION # since cbuild ignores it
|
||||
|
||||
# Alpine based x86_64 build image
|
||||
alpine/x86_64_build:
|
||||
extends:
|
||||
- .alpine/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &alpine-x86_64_build ${ALPINE_X86_64_BUILD_TAG}
|
||||
LLVM_VERSION: &alpine-llvm_version 19
|
||||
rules:
|
||||
- !reference [.container, rules]
|
||||
# Note: the next three lines must remain in that order, so that the rules
|
||||
# in `linkcheck-docs` catch nightly pipelines before the rules in `deploy-docs`
|
||||
# exclude them.
|
||||
- !reference [linkcheck-docs, rules]
|
||||
- !reference [deploy-docs, rules]
|
||||
- !reference [test-docs, rules]
|
||||
|
||||
.use-alpine/x86_64_build:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image
|
||||
variables:
|
||||
MESA_IMAGE_PATH: "alpine/x86_64_build"
|
||||
MESA_IMAGE_TAG: *alpine-x86_64_build
|
||||
LLVM_VERSION: *alpine-llvm_version
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: alpine/x86_64_build
|
||||
optional: true
|
||||
|
||||
# Alpine based x86_64 image for LAVA SSH dockerized client
|
||||
alpine/x86_64_lava_ssh_client:
|
||||
extends:
|
||||
- .alpine/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &alpine-x86_64_lava_ssh_client ${ALPINE_X86_64_LAVA_SSH_TAG}
|
||||
|
||||
# Alpine based x86_64 image to run LAVA jobs
|
||||
alpine/x86_64_lava-trigger:
|
||||
extends:
|
||||
- .alpine/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &alpine-x86_64_lava_trigger ${ALPINE_X86_64_LAVA_TRIGGER_TAG}
|
@@ -20,28 +20,31 @@ DEPS=(
|
||||
bison
|
||||
ccache
|
||||
"clang${LLVM_VERSION}-dev"
|
||||
clang-dev
|
||||
cmake
|
||||
clang-dev
|
||||
coreutils
|
||||
curl
|
||||
elfutils-dev
|
||||
expat-dev
|
||||
flex
|
||||
g++
|
||||
gcc
|
||||
gettext
|
||||
g++
|
||||
git
|
||||
gettext
|
||||
glslang
|
||||
graphviz
|
||||
libclc-dev
|
||||
libdrm-dev
|
||||
libpciaccess-dev
|
||||
libva-dev
|
||||
linux-headers
|
||||
"llvm${LLVM_VERSION}-dev"
|
||||
"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
|
||||
@@ -49,13 +52,10 @@ DEPS=(
|
||||
py3-pip
|
||||
py3-ply
|
||||
py3-yaml
|
||||
python3-dev
|
||||
samurai
|
||||
spirv-llvm-translator-dev
|
||||
spirv-tools-dev
|
||||
util-macros
|
||||
vulkan-headers
|
||||
zlib-dev
|
||||
spirv-tools-dev
|
||||
spirv-llvm-translator-dev
|
||||
util-macros
|
||||
)
|
||||
|
||||
apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}"
|
||||
@@ -64,8 +64,6 @@ pip3 install --break-system-packages sphinx===8.2.3 hawkmoth===0.19.0
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
. .gitlab-ci/container/install-meson.sh
|
||||
|
||||
EXTRA_MESON_ARGS='--prefix=/usr' \
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
||||
|
@@ -1,50 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This is a ci-templates build script to generate a container for triggering LAVA jobs.
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# ALPINE_X86_64_LAVA_TRIGGER_TAG
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
uncollapsed_section_start alpine_setup "Base Alpine system setup"
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
EPHEMERAL=(
|
||||
git
|
||||
py3-pip
|
||||
)
|
||||
|
||||
# We only need these very basic packages to run the LAVA jobs
|
||||
DEPS=(
|
||||
curl
|
||||
python3
|
||||
tar
|
||||
zstd
|
||||
)
|
||||
|
||||
apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}"
|
||||
|
||||
pip3 install --break-system-packages -r bin/ci/requirements-lava.txt
|
||||
|
||||
cp -Rp .gitlab-ci/lava /
|
||||
cp -Rp .gitlab-ci/bin/*_logger.py /lava
|
||||
cp -Rp .gitlab-ci/common/init-stage1.sh /lava
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
uncollapsed_section_switch alpine_cleanup "Cleaning up base Alpine system"
|
||||
|
||||
apk del "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
||||
section_end alpine_cleanup
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2154 # arch is assigned in previous scripts
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
@@ -7,12 +6,11 @@ set -o xtrace
|
||||
# Fetch the arm-built rootfs image and unpack it in our x86_64 container (saves
|
||||
# network transfer, disk usage, and runtime on test jobs)
|
||||
|
||||
S3_PATH="https://${S3_HOST}/${S3_KERNEL_BUCKET}"
|
||||
|
||||
if curl -L --retry 3 -f --retry-delay 10 -s --head "${S3_PATH}/${FDO_UPSTREAM_REPO}/${LAVA_DISTRIBUTION_TAG}/lava-rootfs.tar.zst"; then
|
||||
ARTIFACTS_URL="${S3_PATH}/${FDO_UPSTREAM_REPO}/${LAVA_DISTRIBUTION_TAG}"
|
||||
# shellcheck disable=SC2154 # arch is assigned in previous scripts
|
||||
if curl --fail -L -s "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
|
||||
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}"
|
||||
else
|
||||
ARTIFACTS_URL="${S3_PATH}/${CI_PROJECT_PATH}/${LAVA_DISTRIBUTION_TAG}"
|
||||
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}/${arch}"
|
||||
fi
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
@@ -26,8 +24,39 @@ 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 "${KERNEL_IMAGE_BASE}"/arm64/Image
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${KERNEL_IMAGE_BASE}"/arm64/Image.gz
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${KERNEL_IMAGE_BASE}"/arm64/cheza-kernel
|
||||
|
||||
DEVICE_TREES=""
|
||||
DEVICE_TREES="$DEVICE_TREES apq8016-sbc-usb-host.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"
|
||||
done
|
||||
|
||||
popd
|
||||
elif [[ $arch == "armhf" ]]; then
|
||||
mkdir -p /baremetal-files
|
||||
pushd /baremetal-files
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${KERNEL_IMAGE_BASE}"/armhf/zImage
|
||||
|
||||
DEVICE_TREES=""
|
||||
DEVICE_TREES="$DEVICE_TREES imx6q-cubox-i.dtb"
|
||||
DEVICE_TREES="$DEVICE_TREES tegra124-jetson-tk1.dtb"
|
||||
|
||||
for DTB in $DEVICE_TREES; do
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${KERNEL_IMAGE_BASE}/armhf/$DTB"
|
||||
done
|
||||
|
||||
popd
|
||||
fi
|
||||
|
@@ -1,67 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_ANDROID_TAG
|
||||
|
||||
# This script runs in a container to:
|
||||
# 1. Download the Android CTS (Compatibility Test Suite)
|
||||
# 2. Filter out unneeded test modules
|
||||
# 3. Compress and upload the stripped version to S3
|
||||
# Note: The 'build-' prefix in the filename is only to make it compatible
|
||||
# with the bin/ci/update_tag.py script.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
section_start android-cts "Downloading Android CTS"
|
||||
|
||||
# xtrace is getting lost with the section switching
|
||||
set -x
|
||||
|
||||
# Do a very early check to make sure the tag is correct without the need of
|
||||
# setting up the environment variables locally
|
||||
ci_tag_build_time_check "ANDROID_CTS_TAG"
|
||||
|
||||
# List of all CTS modules we might want to run in CI
|
||||
# This should be the union of all modules required by our CI jobs
|
||||
# Specific modules to run are selected via the ${GPU_VERSION}-android-cts-include.txt files
|
||||
ANDROID_CTS_MODULES=(
|
||||
"CtsDeqpTestCases"
|
||||
"CtsGraphicsTestCases"
|
||||
"CtsNativeHardwareTestCases"
|
||||
"CtsSkQPTestCases"
|
||||
)
|
||||
|
||||
ANDROID_CTS_VERSION="${ANDROID_VERSION}_r1"
|
||||
ANDROID_CTS_DEVICE_ARCH="x86"
|
||||
|
||||
# Download the stripped CTS from S3, because the CTS download from Google can take 20 minutes
|
||||
CTS_FILENAME="android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}"
|
||||
ARTIFACT_PATH="${DATA_STORAGE_PATH}/android-cts/${ANDROID_CTS_TAG}.tar.zst"
|
||||
|
||||
if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
|
||||
echo "Found Android CTS at: ${FOUND_ARTIFACT_URL}"
|
||||
curl-with-retry "${FOUND_ARTIFACT_URL}" | tar --zstd -x -C /
|
||||
else
|
||||
echo "No cached CTS found, downloading from Google and uploading to S3..."
|
||||
curl-with-retry --remote-name "https://dl.google.com/dl/android/cts/${CTS_FILENAME}.zip"
|
||||
|
||||
# Disable zipbomb detection, because the CTS zip file is too big
|
||||
# At least locally, it is detected as a zipbomb
|
||||
UNZIP_DISABLE_ZIPBOMB_DETECTION=true \
|
||||
unzip -q -d / "${CTS_FILENAME}.zip"
|
||||
rm "${CTS_FILENAME}.zip"
|
||||
|
||||
# Keep only the interesting tests to save space
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
ANDROID_CTS_MODULES_KEEP_EXPRESSION=$(printf "%s|" "${ANDROID_CTS_MODULES[@]}" | sed -e 's/|$//g')
|
||||
find /android-cts/testcases/ -mindepth 1 -type d | grep -v -E "$ANDROID_CTS_MODULES_KEEP_EXPRESSION" | xargs rm -rf
|
||||
|
||||
# Using zstd compressed tarball instead of zip, the compression ratio is almost the same, but
|
||||
# the extraction is faster, also LAVA overlays don't support zip compression.
|
||||
tar --zstd -cf "${CTS_FILENAME}.tar.zst" /android-cts
|
||||
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "${CTS_FILENAME}.tar.zst" \
|
||||
"https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}"
|
||||
fi
|
||||
|
||||
section_end android-cts
|
@@ -114,7 +114,7 @@ tar --zstd -cf "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "$LLVM_INSTALL_PREFIX"
|
||||
# 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"
|
||||
s3_upload "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/"
|
||||
rm "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
|
||||
fi
|
||||
|
||||
|
@@ -3,18 +3,17 @@
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_ANDROID_TAG
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -uex
|
||||
|
||||
section_start angle "Building ANGLE"
|
||||
uncollapsed_section_start angle "Building ANGLE"
|
||||
|
||||
# Do a very early check to make sure the tag is correct without the need of
|
||||
# setting up the environment variables locally
|
||||
ci_tag_build_time_check "ANGLE_TAG"
|
||||
|
||||
ANGLE_REV="c39f4a5c553cbee39af8f866aa82a9ffa4f02f5b"
|
||||
DEPOT_REV="5982a1aeb33dc36382ed8c62eddf52a6135e7dd3"
|
||||
ANGLE_REV="a3f2545f6bb3e8d27827dceb2b4e901673995ad1"
|
||||
|
||||
# Set ANGLE_ARCH based on DEBIAN_ARCH if it hasn't been explicitly defined
|
||||
if [[ -z "${ANGLE_ARCH:-}" ]]; then
|
||||
@@ -25,15 +24,9 @@ if [[ -z "${ANGLE_ARCH:-}" ]]; then
|
||||
fi
|
||||
|
||||
# DEPOT tools
|
||||
mkdir /depot-tools
|
||||
pushd /depot-tools
|
||||
git init
|
||||
git remote add origin https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
git fetch --depth 1 origin "$DEPOT_REV"
|
||||
git checkout FETCH_HEAD
|
||||
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
|
||||
popd
|
||||
|
||||
mkdir /angle-build
|
||||
mkdir /angle
|
||||
|
@@ -3,13 +3,15 @@
|
||||
|
||||
# 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 apitrace "Building apitrace"
|
||||
|
||||
APITRACE_VERSION="b6102d10960c9f43b1b473903fc67937dd19fb98"
|
||||
APITRACE_VERSION="952bad1469ea747012bdc48c48993bd5f13eec04"
|
||||
|
||||
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
|
||||
pushd /apitrace
|
||||
|
@@ -1,14 +1,9 @@
|
||||
#!/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
|
||||
# FEDORA_X86_64_BUILD_TAG
|
||||
|
||||
uncollapsed_section_start bindgen "Building bindgen"
|
||||
|
||||
BINDGEN_VER=0.71.1
|
||||
BINDGEN_VER=0.65.1
|
||||
CBINDGEN_VER=0.26.0
|
||||
|
||||
# bindgen
|
||||
|
@@ -4,25 +4,24 @@
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BASE_TAG
|
||||
|
||||
# Do a very early check to make sure the tag is correct without the need of
|
||||
# setting up the environment variables locally
|
||||
ci_tag_build_time_check "CROSVM_TAG"
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -uex
|
||||
|
||||
section_start crosvm "Building crosvm"
|
||||
uncollapsed_section_start crosvm "Building crosvm"
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
|
||||
CROSVM_VERSION=4a6b4316155742fbfa1be7087c2ee578cfee884d
|
||||
CROSVM_VERSION=e27efaf8f4bdc4a47d1e99cc44d2b6908b6f36bd
|
||||
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=06d43ce974b664f9dc521b706a0ad7f91dbf2866
|
||||
VIRGLRENDERER_VERSION=7570167549358ce77b8d4774041b4a77c72a021c
|
||||
rm -rf third_party/virglrenderer
|
||||
git clone --single-branch -b main --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
|
||||
pushd third_party/virglrenderer
|
||||
|
@@ -5,10 +5,11 @@
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_ANDROID_TAG
|
||||
# DEBIAN_BASE_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -uex
|
||||
|
||||
section_start deqp-runner "Building deqp-runner"
|
||||
uncollapsed_section_start deqp-runner "Building deqp-runner"
|
||||
|
||||
DEQP_RUNNER_VERSION=0.20.3
|
||||
|
||||
|
@@ -6,13 +6,14 @@
|
||||
# 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,,}
|
||||
|
||||
section_start deqp-$deqp_api "Building dEQP $DEQP_API"
|
||||
uncollapsed_section_start deqp-$deqp_api "Building dEQP $DEQP_API"
|
||||
|
||||
set -x
|
||||
|
||||
@@ -23,10 +24,10 @@ set -x
|
||||
# - the GL release produces `glcts`, and
|
||||
# - the GLES release produces `deqp-gles*` and `deqp-egl`
|
||||
|
||||
DEQP_MAIN_COMMIT=9cc8e038994c32534b3d2c4ba88c1dc49ef53228
|
||||
DEQP_MAIN_COMMIT=76c1572eaba42d7ddd9bb8eb5788e52dd932068e
|
||||
DEQP_VK_VERSION=1.4.1.1
|
||||
DEQP_GL_VERSION=4.6.6.0
|
||||
DEQP_GLES_VERSION=3.2.12.0
|
||||
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
|
||||
@@ -36,8 +37,8 @@ DEQP_GLES_VERSION=3.2.12.0
|
||||
|
||||
# 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 :)
|
||||
# If you find yourself wanting to add something in here, consider whether
|
||||
# bumping DEQP_MAIN_COMMIT is not a better solution :)
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
@@ -56,31 +57,40 @@ vk_cts_patch_files=(
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
gl_cts_commits_to_backport=(
|
||||
# Add testing for GL_PRIMITIVES_SUBMITTED_ARB query.
|
||||
e075ce73ddc5973aa46a5236c715bb281c9501fa
|
||||
# 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
|
||||
build-deqp-gl_Revert-Add-missing-context-deletion.patch
|
||||
build-deqp-gl_Revert-Fix-issues-with-GLX-reset-notification-strate.patch
|
||||
build-deqp-gl_Revert-Fix-spurious-failures-when-using-a-config-wit.patch
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
# GLES builds also EGL
|
||||
gles_cts_commits_to_backport=(
|
||||
# Add #include <cmath> in deMath.h when being compiled by C++
|
||||
71808fe7d0a640dfd703e845d93ba1c5ab751055
|
||||
# Revert "Add #include <cmath> in deMath.h when being compiled by C++ compiler"
|
||||
# This also adds an alternative fix along with the revert.
|
||||
6164879a0acce258637d261592a9c395e564b361
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
gles_cts_patch_files=(
|
||||
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
|
||||
build-deqp-gl_Revert-Add-missing-context-deletion.patch
|
||||
build-deqp-gl_Revert-Fix-issues-with-GLX-reset-notification-strate.patch
|
||||
build-deqp-gl_Revert-Fix-spurious-failures-when-using-a-config-wit.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
|
||||
|
||||
@@ -109,7 +119,7 @@ git checkout FETCH_HEAD
|
||||
DEQP_COMMIT=$(git rev-parse FETCH_HEAD)
|
||||
|
||||
if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
|
||||
merge_base="$(curl-with-retry -s https://api.github.com/repos/KhronosGroup/VK-GL-CTS/compare/main...$DEQP_MAIN_COMMIT | jq -r .merge_base_commit.sha)"
|
||||
merge_base="$(curl --fail -s https://api.github.com/repos/KhronosGroup/VK-GL-CTS/compare/main...$DEQP_MAIN_COMMIT | jq -r .merge_base_commit.sha)"
|
||||
if [[ "$merge_base" != "$DEQP_MAIN_COMMIT" ]]; then
|
||||
echo "VK-GL-CTS commit $DEQP_MAIN_COMMIT is not a commit from the main branch."
|
||||
exit 1
|
||||
@@ -129,7 +139,8 @@ 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-with-retry $PATCH_URL | GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am -
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 $PATCH_URL | \
|
||||
GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am -
|
||||
done
|
||||
|
||||
cts_patch_files="${prefix}_cts_patch_files[@]"
|
||||
@@ -278,7 +289,7 @@ if [ "$DEQP_API" != tools ]; then
|
||||
|
||||
# Compress the caselists, since Vulkan's in particular are gigantic; higher
|
||||
# compression levels provide no real measurable benefit.
|
||||
zstd -f -1 --rm mustpass/*.txt
|
||||
zstd -1 --rm mustpass/*.txt
|
||||
fi
|
||||
|
||||
if [ "$DEQP_API" = tools ]; then
|
||||
|
@@ -4,49 +4,36 @@
|
||||
# shellcheck disable=SC2034 # Variables are used in scripts called from here
|
||||
# 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_VIDEO_TAG
|
||||
|
||||
# Install fluster in /fluster.
|
||||
|
||||
set -uex
|
||||
|
||||
section_start fluster "Installing Fluster"
|
||||
|
||||
# Do a very early check to make sure the tag is correct without the need of
|
||||
# setting up the environment variables locally
|
||||
ci_tag_build_time_check "FLUSTER_TAG"
|
||||
# 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}"
|
||||
git checkout ${FLUSTER_REVISION}
|
||||
popd || exit
|
||||
|
||||
ARTIFACT_PATH="${DATA_STORAGE_PATH}/fluster/${FLUSTER_TAG}/vectors.tar.zst"
|
||||
|
||||
if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
|
||||
echo "Found fluster vectors at: ${FOUND_ARTIFACT_URL}"
|
||||
mv fluster/ /
|
||||
curl-with-retry "${FOUND_ARTIFACT_URL}" | tar --zstd -x -C /
|
||||
else
|
||||
echo "No cached vectors found, rebuilding..."
|
||||
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 -j ${FDO_CI_CONCURRENT:-4} \
|
||||
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_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}"
|
||||
mv fluster/ /
|
||||
s3_upload vectors.tar.zst "https://${S3_PATH_FLUSTER}/"
|
||||
|
||||
touch /lava-files/done
|
||||
s3_upload /lava-files/done "https://${S3_PATH_FLUSTER}/"
|
||||
|
||||
# Don't include the vectors in the rootfs
|
||||
rm -fr fluster/resources/*
|
||||
fi
|
||||
|
||||
section_end fluster
|
||||
mkdir -p "${ROOTFS}/usr/local/"
|
||||
mv fluster "${ROOTFS}/usr/local/"
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
# 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
|
||||
|
||||
|
@@ -8,6 +8,7 @@ set -ex
|
||||
# DEBIAN_BASE_TAG
|
||||
# DEBIAN_BUILD_TAG
|
||||
# FEDORA_X86_64_BUILD_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
uncollapsed_section_start mold "Building mold"
|
||||
|
||||
|
29
.gitlab-ci/container/build-ninetests.sh
Normal file
29
.gitlab-ci/container/build-ninetests.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/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
|
@@ -2,18 +2,15 @@
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
set -uex
|
||||
|
||||
section_start piglit "Building piglit"
|
||||
uncollapsed_section_start piglit "Building piglit"
|
||||
|
||||
# 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
|
||||
|
||||
# Do a very early check to make sure the tag is correct without the need of
|
||||
# setting up the environment variables locally
|
||||
ci_tag_build_time_check "PIGLIT_TAG"
|
||||
|
||||
REV="a0a27e528f643dfeb785350a1213bfff09681950"
|
||||
REV="0ecdebb0f5927728ddeeb851639a559b0f7d6590"
|
||||
|
||||
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
|
||||
pushd /piglit
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
set -ex
|
||||
|
||||
section_start rust "Building Rust toolchain"
|
||||
uncollapsed_section_start rust "Building Rust toolchain"
|
||||
|
||||
# Pick a specific snapshot from rustup so the compiler doesn't drift on us.
|
||||
RUST_VERSION=1.81.0-2024-09-05
|
||||
RUST_VERSION=1.78.0-2024-05-02
|
||||
|
||||
# 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
|
||||
|
@@ -6,11 +6,11 @@
|
||||
#
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -uex
|
||||
|
||||
uncollapsed_section_start skqp "Building SkQP"
|
||||
uncollapsed_section_start skqp "Building skqp"
|
||||
|
||||
SKQP_BRANCH=android-cts-12.1_r5
|
||||
|
||||
@@ -75,7 +75,7 @@ popd
|
||||
# Fetch some needed build tools needed to build skia/skqp.
|
||||
# Basically, it clones repositories with commits SHAs from ${SKIA_DIR}/DEPS
|
||||
# directory.
|
||||
python3 tools/git-sync-deps
|
||||
python tools/git-sync-deps
|
||||
|
||||
mkdir -p "${SKQP_OUT_DIR}"
|
||||
mkdir -p "${SKQP_INSTALL_DIR}"
|
||||
|
@@ -1,13 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_VIDEO_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -uex
|
||||
|
||||
section_start va-tools "Building va-tools"
|
||||
uncollapsed_section_start va-tools "Building va-tools"
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
|
@@ -5,43 +5,38 @@
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
set -ex
|
||||
|
||||
section_start vkd3d-proton "Building vkd3d-proton"
|
||||
uncollapsed_section_start vkd3d-proton "Building vkd3d-proton"
|
||||
|
||||
# Do a very early check to make sure the tag is correct without the need of
|
||||
# setting up the environment variables locally
|
||||
ci_tag_build_time_check "VKD3D_PROTON_TAG"
|
||||
|
||||
VKD3D_PROTON_COMMIT="6be781076617cb2cb3038710618acc3b57a674db"
|
||||
VKD3D_PROTON_COMMIT="078f07f588c849c52fa21c8cfdd1c201465b1932"
|
||||
|
||||
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
|
||||
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
|
||||
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-build"
|
||||
VKD3D_PROTON_WINE_DIR="/vkd3d-proton-wine64"
|
||||
VKD3D_PROTON_S3_ARTIFACT="vkd3d-proton.tar.zst"
|
||||
|
||||
if [ ! -d "$VKD3D_PROTON_WINE_DIR" ]; then
|
||||
echo "Fatal: Directory '$VKD3D_PROTON_WINE_DIR' does not exist. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
function build_arch {
|
||||
local arch="$1"
|
||||
|
||||
meson setup \
|
||||
-Denable_tests=true \
|
||||
--buildtype release \
|
||||
--prefix "$VKD3D_PROTON_DST_DIR" \
|
||||
--strip \
|
||||
--bindir "x${arch}" \
|
||||
--libdir "x${arch}" \
|
||||
"$VKD3D_PROTON_BUILD_DIR/build.${arch}"
|
||||
|
||||
ninja -C "$VKD3D_PROTON_BUILD_DIR/build.${arch}" install
|
||||
|
||||
install -D -m755 -t "${VKD3D_PROTON_DST_DIR}/x${arch}/bin" "$VKD3D_PROTON_BUILD_DIR/build.${arch}/tests/d3d12"
|
||||
}
|
||||
|
||||
git clone https://github.com/HansKristian-Work/vkd3d-proton.git --single-branch -b master --no-checkout "$VKD3D_PROTON_SRC_DIR"
|
||||
pushd "$VKD3D_PROTON_SRC_DIR"
|
||||
git checkout "$VKD3D_PROTON_COMMIT"
|
||||
git submodule update --init --recursive
|
||||
git submodule update --recursive
|
||||
|
||||
meson setup \
|
||||
-D enable_tests=true \
|
||||
--buildtype release \
|
||||
--prefix "$VKD3D_PROTON_DST_DIR" \
|
||||
--strip \
|
||||
--libdir "lib" \
|
||||
"$VKD3D_PROTON_BUILD_DIR/build"
|
||||
|
||||
ninja -C "$VKD3D_PROTON_BUILD_DIR/build" install
|
||||
|
||||
install -m755 -t "${VKD3D_PROTON_DST_DIR}/" "$VKD3D_PROTON_BUILD_DIR/build/tests/d3d12"
|
||||
|
||||
build_arch 64
|
||||
build_arch 86
|
||||
mkdir "$VKD3D_PROTON_DST_DIR/tests"
|
||||
cp \
|
||||
"tests/test-runner.sh" \
|
||||
@@ -49,18 +44,6 @@ cp \
|
||||
"$VKD3D_PROTON_DST_DIR/tests/"
|
||||
popd
|
||||
|
||||
# Archive and upload vkd3d-proton for use as a LAVA overlay, if the archive doesn't exist yet
|
||||
ARTIFACT_PATH="${DATA_STORAGE_PATH}/vkd3d-proton/${VKD3D_PROTON_TAG}/${CI_JOB_NAME}/${VKD3D_PROTON_S3_ARTIFACT}"
|
||||
if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
|
||||
echo "Found vkd3d-proton at: ${FOUND_ARTIFACT_URL}, skipping upload"
|
||||
else
|
||||
echo "Uploaded vkd3d-proton not found, reuploading..."
|
||||
tar --zstd -cf "$VKD3D_PROTON_S3_ARTIFACT" -C / "${VKD3D_PROTON_DST_DIR#/}" "${VKD3D_PROTON_WINE_DIR#/}"
|
||||
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "$VKD3D_PROTON_S3_ARTIFACT" \
|
||||
"https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}"
|
||||
rm "$VKD3D_PROTON_S3_ARTIFACT"
|
||||
fi
|
||||
|
||||
rm -rf "$VKD3D_PROTON_BUILD_DIR"
|
||||
rm -rf "$VKD3D_PROTON_SRC_DIR"
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -uex
|
||||
|
||||
|
@@ -14,21 +14,15 @@ uncollapsed_section_start wayland "Building Wayland"
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# FEDORA_X86_64_BUILD_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
export LIBWAYLAND_VERSION="1.24.0"
|
||||
export LIBWAYLAND_VERSION="1.21.0"
|
||||
export WAYLAND_PROTOCOLS_VERSION="1.41"
|
||||
|
||||
git clone https://gitlab.freedesktop.org/wayland/wayland
|
||||
cd wayland
|
||||
git checkout "$LIBWAYLAND_VERSION"
|
||||
|
||||
# Build the scanner first in case we're a cross build
|
||||
# Note the lack of EXTRA_MESON_ARGS here. This is always a native build
|
||||
meson setup -Dtests=false -Ddocumentation=false -Ddtd_validation=false -Dlibraries=false -Dscanner=true _scanner
|
||||
meson install -C _scanner
|
||||
|
||||
# Now build libwayland using the given scanner
|
||||
meson setup -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true -Dscanner=false _build ${EXTRA_MESON_ARGS:-}
|
||||
meson setup -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true _build ${EXTRA_MESON_ARGS:-}
|
||||
meson install -C _build
|
||||
cd ..
|
||||
rm -rf wayland
|
||||
|
@@ -1,52 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -uex
|
||||
|
||||
section_start weston "Building Weston"
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BASE_TAG
|
||||
|
||||
export WESTON_VERSION="14.0.1"
|
||||
|
||||
git clone https://gitlab.freedesktop.org/wayland/weston
|
||||
cd weston
|
||||
git checkout "$WESTON_VERSION"
|
||||
meson setup \
|
||||
-Dbackend-drm=false \
|
||||
-Dbackend-drm-screencast-vaapi=false \
|
||||
-Dbackend-headless=true \
|
||||
-Dbackend-pipewire=false \
|
||||
-Dbackend-rdp=false \
|
||||
-Dscreenshare=false \
|
||||
-Dbackend-vnc=false \
|
||||
-Dbackend-wayland=false \
|
||||
-Dbackend-x11=false \
|
||||
-Dbackend-default=headless \
|
||||
-Drenderer-gl=true \
|
||||
-Dxwayland=true \
|
||||
-Dsystemd=false \
|
||||
-Dremoting=false \
|
||||
-Dpipewire=false \
|
||||
-Dshell-desktop=true \
|
||||
-Dshell-fullscreen=false \
|
||||
-Dshell-ivi=false \
|
||||
-Dshell-kiosk=false \
|
||||
-Dcolor-management-lcms=false \
|
||||
-Dimage-jpeg=false \
|
||||
-Dimage-webp=false \
|
||||
-Dtools= \
|
||||
-Ddemo-clients=false \
|
||||
-Dsimple-clients= \
|
||||
-Dresize-pool=false \
|
||||
-Dwcap-decode=false \
|
||||
-Dtests=false \
|
||||
-Ddoc=false \
|
||||
_build ${EXTRA_MESON_ARGS:-}
|
||||
meson install -C _build
|
||||
cd ..
|
||||
rm -rf weston
|
||||
|
||||
section_end weston
|
@@ -1,31 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -uex
|
||||
|
||||
uncollapsed_section_start xwayland "Building XWayland"
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BASE_TAG
|
||||
#
|
||||
export XORGPROTO_VERSION="xorgproto-2024.1"
|
||||
export XWAYLAND_VERSION="xwayland-24.1.8"
|
||||
|
||||
git clone https://gitlab.freedesktop.org/xorg/proto/xorgproto
|
||||
cd xorgproto
|
||||
git checkout "$XORGPROTO_VERSION"
|
||||
meson setup _build ${EXTRA_MESON_ARGS:-}
|
||||
meson install -C _build
|
||||
cd ..
|
||||
rm -rf xorgproto
|
||||
|
||||
git clone https://gitlab.freedesktop.org/xorg/xserver
|
||||
cd xserver
|
||||
git checkout "$XWAYLAND_VERSION"
|
||||
meson setup _build ${EXTRA_MESON_ARGS:-}
|
||||
meson install -C _build
|
||||
cd ..
|
||||
rm -rf xserver
|
||||
|
||||
section_end xwayland
|
@@ -38,6 +38,14 @@ chmod +x /usr/local/bin/ninja
|
||||
# flags (doesn't apply to non-container builds, but we don't run make there)
|
||||
export MAKEFLAGS="-j${FDO_CI_CONCURRENT:-4}"
|
||||
|
||||
# make wget to try more than once, when download fails or timeout
|
||||
echo -e "retry_connrefused = on\n" \
|
||||
"read_timeout = 300\n" \
|
||||
"tries = 4\n" \
|
||||
"retry_on_host_error = on\n" \
|
||||
"retry_on_http_error = 429,500,502,503,504\n" \
|
||||
"wait_retry = 32" >> /etc/wgetrc
|
||||
|
||||
# Ensure that rust tools are in PATH if they exist
|
||||
CARGO_ENV_FILE="$HOME/.cargo/env"
|
||||
if [ -f "$CARGO_ENV_FILE" ]; then
|
||||
|
@@ -39,6 +39,7 @@ DEPS=(
|
||||
"libxrandr-dev:$arch"
|
||||
"libxshmfence-dev:$arch"
|
||||
"libxxf86vm-dev:$arch"
|
||||
"libwayland-dev:$arch"
|
||||
)
|
||||
|
||||
dpkg --add-architecture $arch
|
||||
|
@@ -1,10 +1,6 @@
|
||||
#!/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 -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
@@ -71,6 +67,7 @@ DEPS=(
|
||||
libwayland-egl-backend-dev
|
||||
"llvm-${LLVM_VERSION}-dev"
|
||||
ninja-build
|
||||
meson
|
||||
openssh-server
|
||||
pkgconf
|
||||
python3-mako
|
||||
@@ -79,11 +76,8 @@ DEPS=(
|
||||
python3-pycparser
|
||||
python3-requests
|
||||
python3-setuptools
|
||||
python3-venv
|
||||
shellcheck
|
||||
u-boot-tools
|
||||
xz-utils
|
||||
yamllint
|
||||
zlib1g-dev
|
||||
zstd
|
||||
)
|
||||
@@ -92,15 +86,9 @@ apt-get update
|
||||
|
||||
apt-get -y install "${DEPS[@]}" "${EPHEMERAL[@]}"
|
||||
|
||||
# Needed for ci-fairy s3cp
|
||||
pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
|
||||
|
||||
pip3 install --break-system-packages -r bin/ci/test/requirements.txt
|
||||
|
||||
. .gitlab-ci/container/install-meson.sh
|
||||
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
arch=armhf
|
||||
|
||||
. .gitlab-ci/container/cross_build.sh
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
@@ -113,6 +101,8 @@ arch=armhf
|
||||
|
||||
. .gitlab-ci/container/build-libclc.sh
|
||||
|
||||
. .gitlab-ci/container/install-meson.sh
|
||||
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
|
||||
. .gitlab-ci/container/build-bindgen.sh
|
||||
|
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
arch=arm64 . .gitlab-ci/container/debian/baremetal_arm_test.sh
|
@@ -3,6 +3,7 @@
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_BASE_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
|
||||
set -e
|
||||
|
||||
@@ -14,6 +15,7 @@ set -o xtrace
|
||||
DEPS=(
|
||||
cpio
|
||||
curl
|
||||
fastboot
|
||||
netcat-openbsd
|
||||
openssh-server
|
||||
procps
|
||||
@@ -40,3 +42,15 @@ curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o /usr/share/snmp/mibs/SNMPv2-SMI.txt
|
||||
|
||||
. .gitlab-ci/container/baremetal_build.sh
|
||||
|
||||
mkdir -p /baremetal-files/jetson-nano/boot/
|
||||
ln -s \
|
||||
/baremetal-files/Image \
|
||||
/baremetal-files/tegra210-p3450-0000.dtb \
|
||||
/baremetal-files/jetson-nano/boot/
|
||||
|
||||
mkdir -p /baremetal-files/jetson-tk1/boot/
|
||||
ln -s \
|
||||
/baremetal-files/zImage \
|
||||
/baremetal-files/tegra124-jetson-tk1.dtb \
|
||||
/baremetal-files/jetson-tk1/boot/
|
||||
|
@@ -1,577 +0,0 @@
|
||||
# Build the CI Debian docker images.
|
||||
#
|
||||
# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
|
||||
# image doesn't exist yet, the container stage job generates it.
|
||||
#
|
||||
# In order to generate a new image, one should generally change the tag.
|
||||
# While removing the image from the registry would also work, that's not
|
||||
# recommended except for ephemeral images during development: Replacing
|
||||
# an image after a significant amount of time might pull in newer
|
||||
# versions of gcc/clang or other packages, which might break the build
|
||||
# with older commits using the same tag.
|
||||
#
|
||||
# After merging a change resulting in generating a new image to the
|
||||
# main repository, it's recommended to remove the image from the source
|
||||
# repository's container registry, so that the image from the main
|
||||
# repository's registry will be used there as well.
|
||||
|
||||
.debian-container-version:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: bookworm-slim
|
||||
|
||||
.debian-container:
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .container
|
||||
- .debian-container-version
|
||||
|
||||
# Debian based x86_64 build image base
|
||||
debian/x86_64_build-base:
|
||||
extends:
|
||||
- .debian-container
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_build-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
LLVM_VERSION: &debian-x86_64-llvm 19
|
||||
|
||||
.use-debian/x86_64_build-base:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .debian-container-version
|
||||
- .use-base-image
|
||||
variables:
|
||||
MESA_BASE_IMAGE: "debian/x86_64_build-base"
|
||||
MESA_BASE_TAG: *debian-x86_64_build-base
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/x86_64_build-base
|
||||
optional: true
|
||||
|
||||
# Debian based x86_64 main build image
|
||||
debian/x86_64_build:
|
||||
extends:
|
||||
- .use-debian/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_build ${DEBIAN_BUILD_TAG}
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
|
||||
.use-debian/x86_64_build:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_build-base
|
||||
MESA_IMAGE_PATH: "debian/x86_64_build"
|
||||
MESA_IMAGE_TAG: *debian-x86_64_build
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/x86_64_build
|
||||
optional: true
|
||||
|
||||
# Debian based x86_32 cross-build image
|
||||
debian/x86_32_build:
|
||||
extends:
|
||||
- .use-debian/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_32_build ${DEBIAN_BUILD_TAG}
|
||||
|
||||
.use-debian/x86_32_build:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_build-base
|
||||
MESA_IMAGE_PATH: "debian/x86_32_build"
|
||||
MESA_IMAGE_TAG: *debian-x86_32_build
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/x86_32_build
|
||||
optional: true
|
||||
|
||||
# Debian based ppc64el cross-build image
|
||||
debian/ppc64el_build:
|
||||
extends:
|
||||
- .use-debian/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-ppc64el_build ${DEBIAN_BUILD_TAG}
|
||||
LLVM_VERSION: &debian-ppc64el-llvm 15 # no LLVM packages for PPC
|
||||
|
||||
.use-debian/ppc64el_build:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_build-base
|
||||
MESA_IMAGE_PATH: "debian/ppc64el_build"
|
||||
MESA_IMAGE_TAG: *debian-ppc64el_build
|
||||
LLVM_VERSION: *debian-ppc64el-llvm
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/ppc64el_build
|
||||
optional: true
|
||||
|
||||
# Debian based s390x cross-build image
|
||||
debian/s390x_build:
|
||||
extends:
|
||||
- .use-debian/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-s390x_build ${DEBIAN_BUILD_TAG}
|
||||
LLVM_VERSION: &debian-s390x-llvm 19
|
||||
|
||||
.use-debian/s390x_build:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_build-base
|
||||
MESA_IMAGE_PATH: "debian/s390x_build"
|
||||
MESA_IMAGE_TAG: *debian-s390x_build
|
||||
LLVM_VERSION: *debian-s390x-llvm
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/s390x_build
|
||||
optional: true
|
||||
|
||||
# Android NDK cross-build image
|
||||
.android-variables:
|
||||
variables:
|
||||
ANDROID_VERSION: 14
|
||||
ANDROID_NDK_VERSION: "r27c"
|
||||
ANDROID_SDK_VERSION: 34
|
||||
ANDROID_LLVM_VERSION: llvmorg-19.1.7
|
||||
ANDROID_LLVM_ARTIFACT_NAME: android-x86_64-llvm-20250324
|
||||
# This can be confusing: LLVM_VERSION refers to the host LLVM toolchain
|
||||
# used (LLVM 19 in our Debian system), but ANDROID_LLVM_VERSION refers to
|
||||
# the cross-compiling LLVM toolchain used to build for the Android system.
|
||||
LLVM_VERSION: &debian-android-llvm 19
|
||||
CUTTLEFISH_PROJECT_PATH: ao2/aosp-manifest
|
||||
CUTTLEFISH_BUILD_VERSION_TAGS: mesa-venus
|
||||
CUTTLEFISH_BUILD_NUMBER: 20250701.001
|
||||
AOSP_KERNEL_PROJECT_PATH: ao2/aosp-kernel-manifest
|
||||
AOSP_KERNEL_BUILD_VERSION_TAGS: common-android14-6.1-venus
|
||||
AOSP_KERNEL_BUILD_NUMBER: 20241107.001
|
||||
|
||||
debian/android_build:
|
||||
extends:
|
||||
- .android-variables
|
||||
- .use-debian/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-android_build ${DEBIAN_BUILD_TAG}
|
||||
|
||||
.use-debian/android_build:
|
||||
extends:
|
||||
- .android-variables
|
||||
- .set-image-base-tag
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_build-base
|
||||
MESA_IMAGE_PATH: "debian/android_build"
|
||||
MESA_IMAGE_TAG: *debian-android_build
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/android_build
|
||||
optional: true
|
||||
|
||||
# Debian based ARM build image
|
||||
debian/arm64_build:
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .container
|
||||
- .debian-container-version
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm64_build "${DEBIAN_BUILD_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
LLVM_VERSION: &debian-arm64-llvm 19
|
||||
|
||||
.use-debian/arm64_build:
|
||||
extends:
|
||||
- .set-image
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
variables:
|
||||
MESA_IMAGE_PATH: "debian/arm64_build"
|
||||
MESA_IMAGE_TAG: *debian-arm64_build
|
||||
MESA_ARTIFACTS_TAG: *debian-arm64_build
|
||||
LLVM_VERSION: *debian-arm64-llvm
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/arm64_build
|
||||
optional: true
|
||||
|
||||
|
||||
# Debian based x86_64 test image base
|
||||
debian/x86_64_test-base:
|
||||
extends:
|
||||
- .debian-container
|
||||
- .container-builds-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
|
||||
.use-debian/x86_64_test-base:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .debian-container-version
|
||||
- .use-base-image
|
||||
variables:
|
||||
MESA_BASE_IMAGE: "debian/x86_64_test-base"
|
||||
MESA_BASE_TAG: *debian-x86_64_test-base
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/x86_64_test-base
|
||||
optional: true
|
||||
|
||||
# Debian based ARMv7/armhf test image base
|
||||
debian/arm32_test-base:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .debian-container
|
||||
- .container-builds-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm32_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
LLVM_VERSION: *debian-arm64-llvm
|
||||
FDO_DISTRIBUTION_PLATFORM: "linux/arm/v7"
|
||||
|
||||
.use-debian/arm32_test-base:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .debian-container-version
|
||||
- .use-base-image
|
||||
variables:
|
||||
MESA_BASE_IMAGE: "debian/arm32_test-base"
|
||||
MESA_BASE_TAG: *debian-arm32_test-base
|
||||
LLVM_VERSION: *debian-arm64-llvm
|
||||
FDO_DISTRIBUTION_PLATFORM: "linux/arm/v7"
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/arm32_test-base
|
||||
optional: true
|
||||
|
||||
# Debian based aarch64 test image base
|
||||
debian/arm64_test-base:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .debian-container
|
||||
- .container-builds-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
LLVM_VERSION: *debian-arm64-llvm
|
||||
|
||||
.use-debian/arm64_test-base:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .debian-container-version
|
||||
- .use-base-image
|
||||
variables:
|
||||
MESA_BASE_IMAGE: "debian/arm64_test-base"
|
||||
MESA_BASE_TAG: *debian-arm64_test-base
|
||||
LLVM_VERSION: *debian-arm64-llvm
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/arm64_test-base
|
||||
optional: true
|
||||
|
||||
# Debian based x86_64 test image for GL
|
||||
debian/x86_64_test-gl:
|
||||
extends:
|
||||
- .use-debian/x86_64_test-base
|
||||
- .container-builds-gl
|
||||
- .export-container
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_test-gl ${DEBIAN_TEST_GL_TAG}
|
||||
|
||||
.use-debian/x86_64_test-gl:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_test-base
|
||||
MESA_IMAGE_PATH: "debian/x86_64_test-gl"
|
||||
MESA_IMAGE_TAG: *debian-x86_64_test-gl
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/x86_64_test-gl
|
||||
optional: true
|
||||
|
||||
# Debian based x86_64 test image for VK
|
||||
debian/x86_64_test-vk:
|
||||
extends:
|
||||
- .use-debian/x86_64_test-base
|
||||
- .container-builds-vk
|
||||
- .export-container
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_test-vk ${DEBIAN_TEST_VK_TAG}
|
||||
|
||||
.use-debian/x86_64_test-vk:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_test-base
|
||||
MESA_IMAGE_PATH: "debian/x86_64_test-vk"
|
||||
MESA_IMAGE_TAG: *debian-x86_64_test-vk
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/x86_64_test-vk
|
||||
optional: true
|
||||
|
||||
# Debian based x86_64 test image for Android
|
||||
debian/x86_64_test-android:
|
||||
extends:
|
||||
- .android-variables
|
||||
- .use-debian/x86_64_test-base
|
||||
- .container-builds-android
|
||||
- .export-container
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_test-android ${DEBIAN_TEST_ANDROID_TAG}
|
||||
|
||||
.use-debian/x86_64_test-android:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
|
||||
extends:
|
||||
- .android-variables
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_test-base
|
||||
MESA_IMAGE_PATH: "debian/x86_64_test-android"
|
||||
MESA_IMAGE_TAG: *debian-x86_64_test-android
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/x86_64_test-android
|
||||
optional: true
|
||||
|
||||
# Debian based x86_64 test image for video
|
||||
debian/x86_64_test-video:
|
||||
extends:
|
||||
- .use-debian/x86_64_test-base
|
||||
- .container-builds-video
|
||||
- .export-container
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_test-video ${DEBIAN_TEST_VIDEO_TAG}
|
||||
|
||||
.use-debian/x86_64_test-video:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_test-base
|
||||
MESA_IMAGE_PATH: "debian/x86_64_test-video"
|
||||
MESA_IMAGE_TAG: *debian-x86_64_test-video
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/x86_64_test-video
|
||||
optional: true
|
||||
|
||||
# Debian based ARMv7/armhf test image for GL
|
||||
debian/arm32_test-gl:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .use-debian/arm32_test-base
|
||||
- .container-builds-arm32
|
||||
- .export-container
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm32_test-gl ${DEBIAN_TEST_GL_TAG}
|
||||
|
||||
.use-debian/arm32_test-gl:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-arm32_test-base
|
||||
MESA_IMAGE_PATH: "debian/arm32_test-gl"
|
||||
MESA_IMAGE_TAG: *debian-arm32_test-gl
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/arm32_test-gl
|
||||
optional: true
|
||||
|
||||
# Debian based ARMv7/armhf test image for VK
|
||||
debian/arm32_test-vk:
|
||||
rules:
|
||||
- when: never # There are currently no arm32 VK jobs
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .use-debian/arm32_test-base
|
||||
- .container-builds-arm32
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm32_test-vk ${DEBIAN_TEST_VK_TAG}
|
||||
|
||||
.use-debian/arm32_test-vk:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-arm32_test-base
|
||||
MESA_IMAGE_PATH: "debian/arm32_test-vk"
|
||||
MESA_IMAGE_TAG: *debian-arm32_test-vk
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/arm32_test-vk
|
||||
optional: true
|
||||
|
||||
# Debian based aarch64 test image for GL
|
||||
debian/arm64_test-gl:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .use-debian/arm64_test-base
|
||||
- .container-builds-gl
|
||||
- .export-container
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm64_test-gl ${DEBIAN_TEST_GL_TAG}
|
||||
|
||||
.use-debian/arm64_test-gl:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-arm64_test-base
|
||||
MESA_IMAGE_PATH: "debian/arm64_test-gl"
|
||||
MESA_IMAGE_TAG: *debian-arm64_test-gl
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/arm64_test-gl
|
||||
optional: true
|
||||
|
||||
# Debian based aarch64 test image for VK
|
||||
debian/arm64_test-vk:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .use-debian/arm64_test-base
|
||||
- .container-builds-vk
|
||||
- .export-container
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm64_test-vk ${DEBIAN_TEST_VK_TAG}
|
||||
|
||||
.use-debian/arm64_test-vk:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-arm64_test-base
|
||||
MESA_IMAGE_PATH: "debian/arm64_test-vk"
|
||||
MESA_IMAGE_TAG: *debian-arm64_test-vk
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/arm64_test-vk
|
||||
optional: true
|
||||
|
||||
# x86_64 image with ARM64 & ARM32 kernel & rootfs for baremetal testing
|
||||
.debian/baremetal_arm_test:
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .container
|
||||
- .debian-container-version
|
||||
variables:
|
||||
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
MESA_ARTIFACTS_TAG: *debian-arm64_build
|
||||
|
||||
debian/baremetal_arm32_test-gl:
|
||||
extends:
|
||||
- .debian/baremetal_arm_test
|
||||
needs:
|
||||
- job: debian/arm32_test-gl
|
||||
optional: true
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &baremetal-arm32_test-gl "${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
LAVA_DISTRIBUTION_TAG: "debian/arm32_test-gl:${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${MESA_TEMPLATES_COMMIT}"
|
||||
|
||||
debian/baremetal_arm64_test-gl:
|
||||
extends:
|
||||
- .debian/baremetal_arm_test
|
||||
needs:
|
||||
- job: debian/arm64_test-gl
|
||||
optional: true
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &baremetal-arm64_test-gl "${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
LAVA_DISTRIBUTION_TAG: "debian/arm64_test-gl:${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${MESA_TEMPLATES_COMMIT}"
|
||||
|
||||
debian/baremetal_arm64_test-vk:
|
||||
extends:
|
||||
- .debian/baremetal_arm_test
|
||||
needs:
|
||||
- job: debian/arm64_test-vk
|
||||
optional: true
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &baremetal-arm64_test-vk "${DEBIAN_TEST_VK_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
LAVA_DISTRIBUTION_TAG: "debian/arm64_test-vk:${DEBIAN_TEST_VK_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${MESA_TEMPLATES_COMMIT}"
|
||||
|
||||
.use-debian/baremetal_arm32_test-gl:
|
||||
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
variables:
|
||||
MESA_IMAGE_PATH: "debian/baremetal_arm32_test-gl"
|
||||
MESA_IMAGE_TAG: *baremetal-arm32_test-gl
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/baremetal_arm32_test-gl
|
||||
optional: true
|
||||
|
||||
.use-debian/baremetal_arm64_test-gl:
|
||||
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
variables:
|
||||
MESA_IMAGE_PATH: "debian/baremetal_arm64_test-gl"
|
||||
MESA_IMAGE_TAG: *baremetal-arm64_test-gl
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/baremetal_arm64_test-gl
|
||||
optional: true
|
||||
|
||||
.use-debian/baremetal_arm64_test-vk:
|
||||
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
variables:
|
||||
MESA_IMAGE_PATH: "debian/baremetal_arm64_test-vk"
|
||||
MESA_IMAGE_TAG: *baremetal-arm64_test-vk
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: debian/baremetal_arm64_test-vk
|
||||
optional: true
|
@@ -40,7 +40,6 @@ EPHEMERAL=(
|
||||
glslang-tools
|
||||
g++
|
||||
libasound2-dev
|
||||
libcairo2-dev
|
||||
libcap-dev
|
||||
"libclang-cpp${LLVM_VERSION}-dev"
|
||||
"libclang-rt-${LLVM_VERSION}-dev"
|
||||
@@ -50,44 +49,35 @@ EPHEMERAL=(
|
||||
libepoxy-dev
|
||||
libexpat1-dev
|
||||
libgbm-dev
|
||||
libinput-dev
|
||||
libgles2-mesa-dev
|
||||
liblz4-dev
|
||||
libpciaccess-dev
|
||||
libpixman-1-dev
|
||||
libssl-dev
|
||||
libtirpc-dev
|
||||
libvulkan-dev
|
||||
libudev-dev
|
||||
libwaffle-dev
|
||||
libwayland-dev
|
||||
libx11-xcb-dev
|
||||
libxcb-composite0-dev
|
||||
libxcb-dri2-0-dev
|
||||
libxcb-dri3-dev
|
||||
libxcb-present-dev
|
||||
libxfixes-dev
|
||||
libxcb-ewmh-dev
|
||||
libxcursor-dev
|
||||
libxcvt-dev
|
||||
libxext-dev
|
||||
libxfont-dev
|
||||
libxkbcommon-dev
|
||||
libxkbfile-dev
|
||||
libxrandr-dev
|
||||
libxrender-dev
|
||||
libxshmfence-dev
|
||||
libzstd-dev
|
||||
"llvm-${LLVM_VERSION}-dev"
|
||||
make
|
||||
meson
|
||||
mesa-common-dev
|
||||
openssh-server
|
||||
patch
|
||||
pkgconf
|
||||
protobuf-compiler
|
||||
python3-dev
|
||||
python3-pip
|
||||
python3-setuptools
|
||||
python3-venv
|
||||
python3-wheel
|
||||
wayland-protocols
|
||||
xz-utils
|
||||
@@ -97,7 +87,6 @@ DEPS=(
|
||||
apt-utils
|
||||
clinfo
|
||||
curl
|
||||
dropbear
|
||||
git
|
||||
git-lfs
|
||||
inetutils-syslogd
|
||||
@@ -105,39 +94,29 @@ DEPS=(
|
||||
jq
|
||||
kmod
|
||||
libasan8
|
||||
libcairo2
|
||||
libcap2
|
||||
libdrm2
|
||||
libegl1
|
||||
libepoxy0
|
||||
libexpat1
|
||||
libfdt1
|
||||
libinput10
|
||||
"libclang-common-${LLVM_VERSION}-dev"
|
||||
"libclang-cpp${LLVM_VERSION}"
|
||||
"libllvm${LLVM_VERSION}"
|
||||
liblz4-1
|
||||
libpixman-1-0
|
||||
libpng16-16
|
||||
libproc2-0
|
||||
libpython3.11
|
||||
libtirpc3
|
||||
libubsan1
|
||||
libvulkan1
|
||||
libwayland-client0
|
||||
libwayland-server0
|
||||
libxcb-composite0
|
||||
libxcb-ewmh2
|
||||
libxcb-randr0
|
||||
libxcb-shm0
|
||||
libxcb-xfixes0
|
||||
libxcursor1
|
||||
libxcvt0
|
||||
libxfont2
|
||||
libxkbcommon0
|
||||
libxrandr2
|
||||
libxrender1
|
||||
libxshmfence1
|
||||
ocl-icd-libopencl1
|
||||
pciutils
|
||||
python3-lxml
|
||||
@@ -150,27 +129,19 @@ DEPS=(
|
||||
python3-simplejson
|
||||
python3-six
|
||||
python3-yaml
|
||||
sntp
|
||||
socat
|
||||
spirv-tools
|
||||
sysvinit-core
|
||||
vulkan-tools
|
||||
waffle-utils
|
||||
weston
|
||||
xwayland
|
||||
xinit
|
||||
xserver-common
|
||||
xserver-xorg-video-amdgpu
|
||||
xserver-xorg-video-ati
|
||||
xauth
|
||||
xvfb
|
||||
zlib1g
|
||||
)
|
||||
|
||||
HW_DEPS=(
|
||||
netcat-openbsd
|
||||
mount
|
||||
python3-distutils
|
||||
python3-serial
|
||||
tzdata
|
||||
zstd
|
||||
)
|
||||
|
||||
@@ -180,23 +151,32 @@ apt-get dist-upgrade -y
|
||||
apt-get install --purge -y \
|
||||
sysvinit-core libelogind0
|
||||
|
||||
apt-get install -y --no-remove "${DEPS[@]}" "${HW_DEPS[@]}"
|
||||
apt-get install -y --no-remove "${DEPS[@]}"
|
||||
|
||||
apt-get install -y --no-install-recommends "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
# Needed for ci-fairy s3cp
|
||||
pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
|
||||
# Needed for ci-fairy, this revision is able to upload files to MinIO
|
||||
# and doesn't depend on git
|
||||
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
# Needed for manipulation with traces yaml files.
|
||||
pip3 install --break-system-packages yq
|
||||
|
||||
section_end debian_setup
|
||||
|
||||
############### Build ci-kdl
|
||||
############### Download prebuilt kernel
|
||||
|
||||
. .gitlab-ci/container/build-kdl.sh
|
||||
if [ "$DEBIAN_ARCH" = amd64 ]; then
|
||||
uncollapsed_section_start kernel "Downloading kernel for crosvm"
|
||||
export KERNEL_IMAGE_NAME=bzImage
|
||||
mkdir -p /kernel
|
||||
# shellcheck disable=SC2153 # KERNEL_IMAGE_BASE is set in the root .gitlab-ci.yml file
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "/kernel/${KERNEL_IMAGE_NAME}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${KERNEL_IMAGE_NAME}"
|
||||
section_end kernel
|
||||
fi
|
||||
|
||||
############### Build mold
|
||||
|
||||
@@ -214,14 +194,6 @@ section_end debian_setup
|
||||
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
||||
############### Build Weston
|
||||
|
||||
. .gitlab-ci/container/build-weston.sh
|
||||
|
||||
############### Build XWayland
|
||||
|
||||
. .gitlab-ci/container/build-xwayland.sh
|
||||
|
||||
############### Install Rust toolchain
|
||||
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
|
@@ -27,18 +27,19 @@ EPHEMERAL=(
|
||||
libcap-dev
|
||||
"libclang-cpp${LLVM_VERSION}-dev"
|
||||
libdrm-dev
|
||||
libfontconfig-dev
|
||||
libgl-dev
|
||||
libgles2-mesa-dev
|
||||
libglu1-mesa-dev
|
||||
libglx-dev
|
||||
libgtest-dev
|
||||
libpciaccess-dev
|
||||
libpng-dev
|
||||
libudev-dev
|
||||
libvulkan-dev
|
||||
libwaffle-dev
|
||||
libwayland-dev
|
||||
libx11-xcb-dev
|
||||
libxcb-dri2-0-dev
|
||||
libxcb-dri3-dev
|
||||
libxcb-present-dev
|
||||
libxfixes-dev
|
||||
libxkbcommon-dev
|
||||
libxrandr-dev
|
||||
libxrender-dev
|
||||
@@ -49,15 +50,11 @@ EPHEMERAL=(
|
||||
ocl-icd-opencl-dev
|
||||
patch
|
||||
pkgconf
|
||||
python-is-python3
|
||||
python3-distutils
|
||||
xz-utils
|
||||
)
|
||||
|
||||
DEPS=(
|
||||
libfontconfig1
|
||||
libglu1-mesa
|
||||
libvulkan-dev
|
||||
)
|
||||
|
||||
apt-get update
|
||||
@@ -72,7 +69,7 @@ section_end debian_setup
|
||||
|
||||
############### Build ANGLE
|
||||
|
||||
if [ "$DEBIAN_ARCH" != "armhf" ]; then
|
||||
if [ "$DEBIAN_ARCH" == "arm64" ]; then
|
||||
ANGLE_TARGET=linux \
|
||||
. .gitlab-ci/container/build-angle.sh
|
||||
fi
|
||||
@@ -115,12 +112,9 @@ rm -rf /VK-GL-CTS
|
||||
|
||||
. .gitlab-ci/container/build-vulkan-validation.sh
|
||||
|
||||
############### Build nine tests
|
||||
|
||||
############### Build SKQP
|
||||
|
||||
if [ "$DEBIAN_ARCH" != "armhf" ]; then
|
||||
. .gitlab-ci/container/build-skqp.sh
|
||||
fi
|
||||
. .gitlab-ci/container/build-ninetests.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
|
@@ -99,8 +99,8 @@ apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
|
||||
|
||||
. .gitlab-ci/container/build-libclc.sh
|
||||
|
||||
# Needed for ci-fairy s3cp
|
||||
pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
|
||||
# Needed for ci-fairy, this revision is able to upload files to S3
|
||||
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
. .gitlab-ci/container/install-meson.sh
|
||||
|
||||
|
@@ -48,10 +48,13 @@ DEPS=(
|
||||
"llvm-${LLVM_VERSION}-dev"
|
||||
ocl-icd-opencl-dev
|
||||
python3-pip
|
||||
python3-venv
|
||||
procps
|
||||
spirv-tools
|
||||
shellcheck
|
||||
strace
|
||||
time
|
||||
yamllint
|
||||
zstd
|
||||
)
|
||||
|
||||
@@ -84,6 +87,8 @@ rm -rf $XORGMACROS_VERSION
|
||||
|
||||
. .gitlab-ci/container/build-bindgen.sh
|
||||
|
||||
python3 -m pip install --break-system-packages -r bin/ci/requirements.txt
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
||||
|
67
.gitlab-ci/container/debian/x86_64_pyutils.sh
Normal file
67
.gitlab-ci/container/debian/x86_64_pyutils.sh
Normal file
@@ -0,0 +1,67 @@
|
||||
#!/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_PYUTILS_TAG
|
||||
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get install -y ca-certificates
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
|
||||
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at
|
||||
# the end)
|
||||
EPHEMERAL=(
|
||||
binutils
|
||||
build-essential
|
||||
cpp
|
||||
dpkg-dev
|
||||
g++
|
||||
gcc
|
||||
libc6-dev
|
||||
perl
|
||||
python3-dev
|
||||
)
|
||||
|
||||
DEPS=(
|
||||
apt-utils
|
||||
curl
|
||||
file
|
||||
findutils
|
||||
git
|
||||
python3-pil
|
||||
python3-pip
|
||||
python3-ply
|
||||
python3-setuptools
|
||||
python3-venv
|
||||
python3-yaml
|
||||
shellcheck
|
||||
xz-utils
|
||||
yamllint
|
||||
zstd
|
||||
)
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove --no-install-recommends "${DEPS[@]}" "${EPHEMERAL[@]}" \
|
||||
"${EXTRA_LOCAL_PACKAGES:-}"
|
||||
|
||||
# Needed for ci-fairy, this revision is able to upload files to S3
|
||||
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
pip3 install --break-system-packages -r bin/ci/test/requirements.txt
|
||||
|
||||
############### Uninstall ephemeral packages
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
||||
apt-get autoremove --purge -y
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
@@ -12,21 +12,19 @@ set -e
|
||||
|
||||
set -o xtrace
|
||||
|
||||
section_start debian_setup "Base Debian system setup"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
EPHEMERAL=(
|
||||
build-essential:native
|
||||
ccache
|
||||
cmake
|
||||
config-package-dev
|
||||
debhelper-compat
|
||||
dpkg-dev
|
||||
ninja-build
|
||||
sudo
|
||||
unzip
|
||||
build-essential:native
|
||||
ccache
|
||||
cmake
|
||||
config-package-dev
|
||||
debhelper-compat
|
||||
dpkg-dev
|
||||
ninja-build
|
||||
sudo
|
||||
unzip
|
||||
)
|
||||
|
||||
DEPS=(
|
||||
@@ -39,46 +37,15 @@ apt-get install -y --no-remove --no-install-recommends \
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
section_end debian_setup
|
||||
|
||||
############### Downloading Android tools
|
||||
|
||||
section_start android-tools "Downloading Android tools"
|
||||
|
||||
mkdir /android-tools
|
||||
pushd /android-tools
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o eglinfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/eglinfo-android-x86_64"
|
||||
chmod +x eglinfo
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o vulkaninfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/vulkaninfo-android-x86_64"
|
||||
chmod +x vulkaninfo
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "build-tools_r${ANDROID_SDK_VERSION}-linux.zip" "https://dl.google.com/android/repository/build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
|
||||
unzip "build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
|
||||
rm "build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
|
||||
mv "android-$ANDROID_VERSION" build-tools
|
||||
|
||||
popd
|
||||
|
||||
section_end android-tools
|
||||
|
||||
############### Downloading NDK for native builds for the guest ...
|
||||
|
||||
section_start android-ndk "Downloading Android NDK"
|
||||
|
||||
# Fetch the NDK and extract just the toolchain we want.
|
||||
ndk="android-ndk-${ANDROID_NDK_VERSION}"
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "$ndk.zip" "https://dl.google.com/android/repository/$ndk-linux.zip"
|
||||
unzip -q -d / "$ndk.zip"
|
||||
unzip -d / "$ndk.zip"
|
||||
rm "$ndk.zip"
|
||||
|
||||
section_end android-ndk
|
||||
|
||||
############### Build ANGLE
|
||||
|
||||
ANGLE_TARGET=android \
|
||||
@@ -104,7 +71,7 @@ EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DAND
|
||||
|
||||
DEQP_API=GLES \
|
||||
DEQP_TARGET="android" \
|
||||
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
|
||||
EXTRA_CMAKE_ARGS="-DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
DEQP_API=VK \
|
||||
@@ -116,27 +83,35 @@ rm -rf /VK-GL-CTS
|
||||
|
||||
############### Downloading Cuttlefish resources ...
|
||||
|
||||
section_start cuttlefish "Downloading, building and installing Cuttlefish"
|
||||
uncollapsed_section_start cuttlefish "Downloading, building and installing Cuttlefish"
|
||||
|
||||
CUTTLEFISH_PROJECT_PATH=ao2/aosp-manifest
|
||||
CUTTLEFISH_BUILD_VERSION_TAGS=mesa-venus
|
||||
CUTTLEFISH_BUILD_NUMBER=20250215.001
|
||||
|
||||
mkdir /cuttlefish
|
||||
pushd /cuttlefish
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/aosp_cf_x86_64_only_phone-img-${CUTTLEFISH_BUILD_NUMBER}.tar.zst"
|
||||
-o aosp_cf_x86_64_only_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/aosp_cf_x86_64_only_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip"
|
||||
|
||||
tar --zstd -xvf aosp_cf_x86_64_only_phone-img-"$CUTTLEFISH_BUILD_NUMBER".tar.zst
|
||||
rm aosp_cf_x86_64_only_phone-img-"$CUTTLEFISH_BUILD_NUMBER".tar.zst
|
||||
unzip aosp_cf_x86_64_only_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip
|
||||
rm aosp_cf_x86_64_only_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip
|
||||
ls -lhS ./*
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/cvd-host_package-x86_64.tar.zst"
|
||||
tar --zst -xvf cvd-host_package-x86_64.tar.zst
|
||||
rm cvd-host_package-x86_64.tar.zst
|
||||
-o cvd-host_package.tar.gz "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/cvd-host_package.tar.gz"
|
||||
tar -xzvf cvd-host_package.tar.gz
|
||||
rm cvd-host_package.tar.gz
|
||||
|
||||
AOSP_KERNEL_PROJECT_PATH=ao2/aosp-kernel-manifest
|
||||
AOSP_KERNEL_BUILD_VERSION_TAGS=common-android14-6.1-venus
|
||||
AOSP_KERNEL_BUILD_NUMBER=20241107.001
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${AOSP_KERNEL_PROJECT_PATH}/aosp-kernel-common-${AOSP_KERNEL_BUILD_VERSION_TAGS}.${AOSP_KERNEL_BUILD_NUMBER}/bzImage"
|
||||
-o bzImage "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${AOSP_KERNEL_PROJECT_PATH}/aosp-kernel-common-${AOSP_KERNEL_BUILD_VERSION_TAGS}.${AOSP_KERNEL_BUILD_NUMBER}/bzImage"
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${AOSP_KERNEL_PROJECT_PATH}/aosp-kernel-common-${AOSP_KERNEL_BUILD_VERSION_TAGS}.${AOSP_KERNEL_BUILD_NUMBER}/initramfs.img"
|
||||
-o initramfs.img "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${AOSP_KERNEL_PROJECT_PATH}/aosp-kernel-common-${AOSP_KERNEL_BUILD_VERSION_TAGS}.${AOSP_KERNEL_BUILD_NUMBER}/initramfs.img"
|
||||
|
||||
popd
|
||||
|
||||
@@ -163,13 +138,40 @@ usermod -a -G kvm,cvdnetwork root
|
||||
|
||||
section_end cuttlefish
|
||||
|
||||
############### Downloading Android CTS
|
||||
############### Downloading Android CTS tools
|
||||
|
||||
. .gitlab-ci/container/build-android-cts.sh
|
||||
uncollapsed_section_start android-cts "Downloading Android CTS tools"
|
||||
|
||||
ANDROID_CTS_VERSION="${ANDROID_VERSION}_r1"
|
||||
ANDROID_CTS_DEVICE_ARCH="x86"
|
||||
|
||||
mkdir /android-tools
|
||||
pushd /android-tools
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip" \
|
||||
"https://dl.google.com/dl/android/cts/android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
|
||||
unzip "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
|
||||
rm "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
|
||||
|
||||
# Keep only the interesting tests to save space
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
ANDROID_CTS_MODULES_KEEP_EXPRESSION=$(printf "%s|" $ANDROID_CTS_MODULES | sed -e 's/|$//g')
|
||||
find android-cts/testcases/ -mindepth 1 -type d | grep -v -E "$ANDROID_CTS_MODULES_KEEP_EXPRESSION" | xargs rm -rf
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "build-tools_r${ANDROID_SDK_VERSION}-linux.zip" "https://dl.google.com/android/repository/build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
|
||||
unzip "build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
|
||||
rm "build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
|
||||
mv "android-$ANDROID_VERSION" build-tools
|
||||
|
||||
popd
|
||||
|
||||
section_end android-cts
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
section_switch debian_cleanup "Cleaning up base Debian system"
|
||||
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
|
||||
|
||||
rm -rf "/${ndk:?}"
|
||||
|
||||
|
@@ -1,71 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# The relative paths in this file only become valid at runtime.
|
||||
# shellcheck disable=SC1091
|
||||
#
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_VIDEO_TAG
|
||||
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
section_start debian_setup "Base Debian system setup"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get install -y gstreamer1.0-vaapi # This interferes with systemd deps, install separately
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
EPHEMERAL=(
|
||||
g++
|
||||
libdrm-dev
|
||||
libva-dev
|
||||
meson
|
||||
pkgconf
|
||||
)
|
||||
|
||||
DEPS=(
|
||||
gstreamer1.0-plugins-bad
|
||||
gstreamer1.0-plugins-base
|
||||
gstreamer1.0-plugins-good
|
||||
gstreamer1.0-plugins-ugly
|
||||
gstreamer1.0-tools
|
||||
libgstreamer1.0-0
|
||||
libva-drm2
|
||||
libva-wayland2
|
||||
libva2
|
||||
)
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove --no-install-recommends \
|
||||
"${DEPS[@]}" "${EPHEMERAL[@]}" "${EXTRA_LOCAL_PACKAGES:-}"
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
section_end debian_setup
|
||||
|
||||
############### Build libva tests
|
||||
|
||||
. .gitlab-ci/container/build-va-tools.sh
|
||||
|
||||
############### Install Fluster
|
||||
|
||||
. .gitlab-ci/container/build-fluster.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
section_switch debian_cleanup "Cleaning up base Debian system"
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
||||
section_end debian_cleanup
|
||||
|
||||
############### Remove unused packages
|
||||
|
||||
. .gitlab-ci/container/strip-rootfs.sh
|
@@ -1,80 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script exports the container image to a rootfs tarball and uploads it to
|
||||
# S3.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# ./fdo_cntr_export.sh <container-image-url>
|
||||
#
|
||||
# The container image URL is the URL of the container image to export. It can be
|
||||
# a local path or a remote URL.
|
||||
|
||||
# Example:
|
||||
# ./fdo_cntr_export.sh registry.freedesktop.org/mesa/mesa/debian/x86_64_test-android:tag
|
||||
|
||||
# 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_VIDEO_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
|
||||
set -eux -o pipefail
|
||||
|
||||
: "${CONTAINER:=$1}"
|
||||
IMAGE_URL="${CONTAINER}"
|
||||
readonly IMAGE_URL
|
||||
|
||||
container=$(buildah from "$IMAGE_URL")
|
||||
readonly container
|
||||
readonly ROOTFSTAR=lava-rootfs.tar.zst
|
||||
touch "$ROOTFSTAR"
|
||||
|
||||
buildah copy "$container" ".gitlab-ci/container/setup-rootfs.sh" /root/setup-rootfs.sh
|
||||
|
||||
# Using --isolation chroot to ensure proper execution in CI/CD environments
|
||||
buildah run --isolation chroot "$container" -- /root/setup-rootfs.sh
|
||||
|
||||
buildah_export() {
|
||||
# Mount the volume
|
||||
mountpoint=$(buildah mount "$1")
|
||||
|
||||
if [ ! -d "$mountpoint" ]; then
|
||||
echo "Mount point not found: $mountpoint" >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# These components will be provided via LAVA overlays,
|
||||
# so remove them from the core rootfs
|
||||
rm -rf "${mountpoint}/android-cts"
|
||||
rm -rf "${mountpoint}/cuttlefish"
|
||||
rm -rf "${mountpoint}/vkd3d-proton-tests"
|
||||
rm -rf "${mountpoint}/vkd3d-proton-wine64"
|
||||
|
||||
# Compress to zstd
|
||||
ZSTD_CLEVEL=10 tar -C "$mountpoint" -I zstd -cf "$2" .
|
||||
}
|
||||
|
||||
# When hacking on it locally, the script might not be executed as root.
|
||||
# In CI it's always root.
|
||||
if (($(id -u) != 0)); then
|
||||
# Run unshare for rootless envs
|
||||
buildah unshare -- bash -c "$(declare -f buildah_export); buildah_export '$container' '$ROOTFSTAR'"
|
||||
else
|
||||
# Run directly
|
||||
buildah_export "$container" "$ROOTFSTAR"
|
||||
fi
|
||||
|
||||
# Unmount the container
|
||||
buildah umount "$container"
|
||||
|
||||
# Remove the container
|
||||
buildah rm "$container"
|
||||
|
||||
# Upload the rootfs tarball to S3.
|
||||
# The URL format matches the registry format, making it easier to match this URL later.
|
||||
curl --fail --retry-connrefused --retry 4 --retry-delay 30 \
|
||||
--header "Authorization: Bearer $(cat "${S3_JWT_FILE}")" \
|
||||
-X PUT --form file=@"$ROOTFSTAR" \
|
||||
"https://${S3_HOST}/${S3_KERNEL_BUCKET}/${CI_PROJECT_PATH}/${CI_JOB_NAME}:${FDO_DISTRIBUTION_TAG}"
|
@@ -1,41 +0,0 @@
|
||||
# Build the CI Fedora docker images.
|
||||
#
|
||||
# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
|
||||
# image doesn't exist yet, the container stage job generates it.
|
||||
#
|
||||
# In order to generate a new image, one should generally change the tag.
|
||||
# While removing the image from the registry would also work, that's not
|
||||
# recommended except for ephemeral images during development: Replacing
|
||||
# an image after a significant amount of time might pull in newer
|
||||
# versions of gcc/clang or other packages, which might break the build
|
||||
# with older commits using the same tag.
|
||||
#
|
||||
# After merging a change resulting in generating a new image to the
|
||||
# main repository, it's recommended to remove the image from the source
|
||||
# repository's container registry, so that the image from the main
|
||||
# repository's registry will be used there as well.
|
||||
|
||||
# Fedora based x86_64 build image
|
||||
fedora/x86_64_build:
|
||||
extends:
|
||||
- .fdo.container-build@fedora
|
||||
- .container
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: 42
|
||||
MESA_IMAGE_TAG: &fedora-x86_64_build ${FEDORA_X86_64_BUILD_TAG}
|
||||
LLVM_VERSION: &fedora-x86_64-llvm 20
|
||||
|
||||
.use-fedora/x86_64_build:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image
|
||||
variables:
|
||||
MESA_IMAGE_PATH: "fedora/x86_64_build"
|
||||
MESA_IMAGE_TAG: *fedora-x86_64_build
|
||||
LLVM_VERSION: *fedora-x86_64-llvm
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: fedora/x86_64_build
|
||||
optional: true
|
@@ -28,7 +28,9 @@ EPHEMERAL=(
|
||||
)
|
||||
|
||||
DEPS=(
|
||||
bindgen
|
||||
bison
|
||||
cbindgen
|
||||
ccache
|
||||
clang-devel
|
||||
flex
|
||||
@@ -105,8 +107,6 @@ rm -rf $XORGMACROS_VERSION
|
||||
|
||||
. .gitlab-ci/container/install-meson.sh
|
||||
|
||||
. .gitlab-ci/container/build-bindgen.sh
|
||||
|
||||
. .gitlab-ci/container/build-mold.sh
|
||||
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
53
.gitlab-ci/container/get-firmware-from-source.sh
Executable file
53
.gitlab-ci/container/get-firmware-from-source.sh
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2046 # we want to arg-split FIRMWARE_FILES
|
||||
# shellcheck disable=SC2086 # as above
|
||||
# shellcheck disable=SC2116 # as above
|
||||
|
||||
set -e
|
||||
|
||||
ROOTFS=$1
|
||||
FIRMWARE_FILES=$2
|
||||
|
||||
if [ -n "${FIRMWARE_FILES:-}" ]; then
|
||||
FIRMWARE=$(jq -s '.' $(echo "$FIRMWARE_FILES"))
|
||||
else
|
||||
FIRMWARE=""
|
||||
fi
|
||||
|
||||
if ! echo "$FIRMWARE" | jq empty; then
|
||||
echo "FIRMWARE contains invalid JSON."
|
||||
fi
|
||||
|
||||
for item in $(echo "$FIRMWARE" | jq -c '.[]'); do
|
||||
src=$(echo "$item" | jq -r '.src')
|
||||
git_hash=$(echo "$item" | jq -r '.git_hash')
|
||||
dst=$(echo "$item" | jq -r '.dst')
|
||||
|
||||
if [ "$src" = "null" ] || [ "$dst" = "null" ]; then
|
||||
echo "Missing src or dst for $item."
|
||||
continue
|
||||
fi
|
||||
|
||||
# Remove any trailing slashes from src and dst
|
||||
src=${src%/}
|
||||
dst=${dst%/}
|
||||
|
||||
# Remove any leading slash
|
||||
dst=${dst#/}
|
||||
|
||||
if [ "$(echo "$item" | jq '.files | length')" -eq 0 ]; then
|
||||
echo "No files specified for $item."
|
||||
continue
|
||||
fi
|
||||
|
||||
for file in $(echo "$item" | jq -r '.files[]'); do
|
||||
FIRMWARE_SRC_PATH="${src}/${file}"
|
||||
if [ "$git_hash" != "null" ]; then
|
||||
FIRMWARE_SRC_PATH="${FIRMWARE_SRC_PATH}?h=${git_hash}"
|
||||
fi
|
||||
FIRMWARE_DST_DIR="${ROOTFS}/${dst}"
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 --create-dirs --output-dir "${FIRMWARE_DST_DIR}" -o "${file}" "${FIRMWARE_SRC_PATH}"
|
||||
done
|
||||
|
||||
done
|
@@ -1,113 +0,0 @@
|
||||
# Docker image tag helper templates
|
||||
|
||||
.incorporate-templates-commit:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
|
||||
.incorporate-base-tag+templates-commit:
|
||||
variables:
|
||||
FDO_BASE_IMAGE: "${CI_REGISTRY_IMAGE}/${MESA_BASE_IMAGE}:${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
|
||||
.set-image:
|
||||
extends:
|
||||
- .incorporate-templates-commit
|
||||
variables:
|
||||
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
|
||||
image: "$MESA_IMAGE"
|
||||
|
||||
.set-image-base-tag:
|
||||
extends:
|
||||
- .set-image
|
||||
- .incorporate-base-tag+templates-commit
|
||||
variables:
|
||||
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
|
||||
|
||||
.container:
|
||||
stage: container
|
||||
timeout: 1h
|
||||
extends:
|
||||
- .container-rules
|
||||
- .incorporate-templates-commit
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
before_script:
|
||||
- !reference [default, before_script]
|
||||
# Undoing the `eval "$S3_JWT_FILE_SCRIPT"` from the default before_script,
|
||||
# because container_job_trampoline.sh and fdo_cntr_export.sh both need it.
|
||||
- S3_JWT=$(cat "${S3_JWT_FILE}")
|
||||
- export S3_JWT_FILE_SCRIPT="echo -n '${S3_JWT}' > '${S3_JWT_FILE}' && S3_JWT_FILE_SCRIPT= && unset CI_JOB_JWT S3_JWT"
|
||||
variables:
|
||||
FDO_REPO_SUFFIX: $CI_JOB_NAME
|
||||
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/container_job_trampoline.sh "${CI_JOB_NAME}"'
|
||||
# no need to pull the whole repo to build the container image
|
||||
GIT_STRATEGY: none
|
||||
CI_BUILD_COMPONENTS: "$CI_BUILD_COMPONENTS_ANDROID_CTS $CI_BUILD_COMPONENTS_ANGLE $CI_BUILD_COMPONENTS_CROSVM $CI_BUILD_COMPONENTS_FLUSTER $CI_BUILD_COMPONENTS_PIGLIT $CI_BUILD_COMPONENTS_VKD3D_PROTON"
|
||||
|
||||
.container-builds-angle:
|
||||
variables:
|
||||
ANGLE_TAG: "${CONDITIONAL_BUILD_ANGLE_TAG}"
|
||||
CI_BUILD_COMPONENTS_ANGLE: angle
|
||||
|
||||
.container-builds-crosvm:
|
||||
variables:
|
||||
CROSVM_TAG: "${CONDITIONAL_BUILD_CROSVM_TAG}"
|
||||
CI_BUILD_COMPONENTS_CROSVM: crosvm
|
||||
|
||||
.container-builds-fluster:
|
||||
variables:
|
||||
FLUSTER_TAG: "${CONDITIONAL_BUILD_FLUSTER_TAG}"
|
||||
CI_BUILD_COMPONENTS_FLUSTER: fluster
|
||||
|
||||
.container-builds-piglit:
|
||||
variables:
|
||||
PIGLIT_TAG: "${CONDITIONAL_BUILD_PIGLIT_TAG}"
|
||||
CI_BUILD_COMPONENTS_PIGLIT: piglit
|
||||
|
||||
.container-builds-vkd3d-proton:
|
||||
variables:
|
||||
VKD3D_PROTON_TAG: "${CONDITIONAL_BUILD_VKD3D_PROTON_TAG}"
|
||||
CI_BUILD_COMPONENTS_VKD3D_PROTON: vkd3d-proton
|
||||
|
||||
.container-builds-android-cts:
|
||||
variables:
|
||||
ANDROID_CTS_TAG: "${CONDITIONAL_BUILD_ANDROID_CTS_TAG}"
|
||||
CI_BUILD_COMPONENTS_ANDROID_CTS: android-cts
|
||||
|
||||
.container-builds-android:
|
||||
extends:
|
||||
- .container-builds-android-cts
|
||||
- .container-builds-angle
|
||||
|
||||
.container-builds-arm32:
|
||||
extends:
|
||||
- .container-builds-piglit
|
||||
|
||||
.container-builds-base:
|
||||
extends:
|
||||
- .container-builds-crosvm
|
||||
|
||||
.container-builds-gl:
|
||||
extends:
|
||||
- .container-builds-angle
|
||||
- .container-builds-piglit
|
||||
|
||||
.container-builds-video:
|
||||
extends:
|
||||
- .container-builds-fluster
|
||||
|
||||
.container-builds-vk:
|
||||
extends:
|
||||
- .container-builds-piglit
|
||||
- .container-builds-vkd3d-proton
|
||||
|
||||
# Export the container rootfs and upload it to S3
|
||||
.export-container:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_PACKAGES: zstd
|
||||
FDO_DISTRIBUTION_POST_EXEC: 'bash .gitlab-ci/container/fdo_cntr_export.sh'
|
||||
|
||||
.use-base-image:
|
||||
extends:
|
||||
- .container
|
||||
- .incorporate-base-tag+templates-commit
|
@@ -1,3 +1,28 @@
|
||||
# Docker image tag helper templates
|
||||
|
||||
.incorporate-templates-commit:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
|
||||
.incorporate-base-tag+templates-commit:
|
||||
variables:
|
||||
FDO_BASE_IMAGE: "${CI_REGISTRY_IMAGE}/${MESA_BASE_IMAGE}:${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
|
||||
.set-image:
|
||||
extends:
|
||||
- .incorporate-templates-commit
|
||||
variables:
|
||||
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
|
||||
image: "$MESA_IMAGE"
|
||||
|
||||
.set-image-base-tag:
|
||||
extends:
|
||||
- .set-image
|
||||
- .incorporate-base-tag+templates-commit
|
||||
variables:
|
||||
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
|
||||
|
||||
# Build the CI docker images.
|
||||
#
|
||||
# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
|
||||
@@ -15,6 +40,758 @@
|
||||
# repository's container registry, so that the image from the main
|
||||
# repository's registry will be used there as well.
|
||||
|
||||
include:
|
||||
- local: '.gitlab-ci/container/gitlab-ci-inc.yml'
|
||||
- local: '.gitlab-ci/container/*/gitlab-ci.yml'
|
||||
.debian-container-version:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: bookworm-slim
|
||||
|
||||
.debian-container:
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .container
|
||||
- .debian-container-version
|
||||
|
||||
.container:
|
||||
stage: container
|
||||
timeout: 1h
|
||||
extends:
|
||||
- .container+build-rules
|
||||
- .incorporate-templates-commit
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
variables:
|
||||
FDO_REPO_SUFFIX: $CI_JOB_NAME
|
||||
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/container_job_trampoline.sh "${CI_JOB_NAME}"'
|
||||
# no need to pull the whole repo to build the container image
|
||||
GIT_STRATEGY: none
|
||||
|
||||
.container-builds-angle:
|
||||
variables:
|
||||
ANGLE_TAG: "${CONDITIONAL_BUILD_ANGLE_TAG}"
|
||||
|
||||
.container-builds-android:
|
||||
extends:
|
||||
- .container-builds-angle
|
||||
variables:
|
||||
# CI_BUILD_COMPONENTS is a space-separated list of components used during early tag checks
|
||||
# If this job inherits from multiple .container-builds-*, it needs to combine them
|
||||
# e.g: inherits from .container-builds-angle and .container-builds-piglit
|
||||
# should make CI_BUILD_COMPONENTS="angle piglit"
|
||||
CI_BUILD_COMPONENTS: "angle"
|
||||
|
||||
.container-builds-x86_64:
|
||||
extends:
|
||||
- .container-builds-angle
|
||||
variables:
|
||||
CI_BUILD_COMPONENTS: "angle"
|
||||
|
||||
.container-builds-arm64:
|
||||
extends:
|
||||
- .container-builds-angle
|
||||
variables:
|
||||
CI_BUILD_COMPONENTS: "angle"
|
||||
|
||||
.use-base-image:
|
||||
extends:
|
||||
- .container
|
||||
- .incorporate-base-tag+templates-commit
|
||||
|
||||
# Debian based x86_64 build image base
|
||||
debian/x86_64_build-base:
|
||||
extends:
|
||||
- .debian-container
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_build-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
LLVM_VERSION: &debian-x86_64-llvm 19
|
||||
|
||||
.use-debian/x86_64_build-base:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .debian-container-version
|
||||
- .use-base-image
|
||||
variables:
|
||||
MESA_BASE_IMAGE: "debian/x86_64_build-base"
|
||||
MESA_BASE_TAG: *debian-x86_64_build-base
|
||||
MESA_ARTIFACTS_BASE_TAG: *debian-x86_64_build-base
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
needs:
|
||||
- debian/x86_64_build-base
|
||||
|
||||
# Debian based x86_64 main build image
|
||||
debian/x86_64_build:
|
||||
extends:
|
||||
- .use-debian/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_build ${DEBIAN_BUILD_TAG}
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
|
||||
.use-debian/x86_64_build:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_build-base
|
||||
MESA_IMAGE_PATH: "debian/x86_64_build"
|
||||
MESA_IMAGE_TAG: *debian-x86_64_build
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
needs:
|
||||
- debian/x86_64_build
|
||||
|
||||
# Debian based x86_32 cross-build image
|
||||
debian/x86_32_build:
|
||||
extends:
|
||||
- .use-debian/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_32_build ${DEBIAN_BUILD_TAG}
|
||||
|
||||
.use-debian/x86_32_build:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_build-base
|
||||
MESA_IMAGE_PATH: "debian/x86_32_build"
|
||||
MESA_IMAGE_TAG: *debian-x86_32_build
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
needs:
|
||||
- debian/x86_32_build
|
||||
|
||||
# Debian based ppc64el cross-build image
|
||||
debian/ppc64el_build:
|
||||
extends:
|
||||
- .use-debian/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-ppc64el_build ${DEBIAN_BUILD_TAG}
|
||||
LLVM_VERSION: &debian-ppc64el-llvm 15 # no LLVM packages for PPC
|
||||
|
||||
.use-debian/ppc64el_build:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_build-base
|
||||
MESA_IMAGE_PATH: "debian/ppc64el_build"
|
||||
MESA_IMAGE_TAG: *debian-ppc64el_build
|
||||
LLVM_VERSION: *debian-ppc64el-llvm
|
||||
needs:
|
||||
- debian/ppc64el_build
|
||||
|
||||
# Debian based s390x cross-build image
|
||||
debian/s390x_build:
|
||||
extends:
|
||||
- .use-debian/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-s390x_build ${DEBIAN_BUILD_TAG}
|
||||
LLVM_VERSION: &debian-s390x-llvm 19
|
||||
|
||||
.use-debian/s390x_build:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_build-base
|
||||
MESA_IMAGE_PATH: "debian/s390x_build"
|
||||
MESA_IMAGE_TAG: *debian-s390x_build
|
||||
LLVM_VERSION: *debian-s390x-llvm
|
||||
needs:
|
||||
- debian/s390x_build
|
||||
|
||||
# Android NDK cross-build image
|
||||
.android-variables:
|
||||
extends:
|
||||
- .container-builds-android
|
||||
variables:
|
||||
ANDROID_VERSION: 14
|
||||
ANDROID_NDK_VERSION: "r27c"
|
||||
ANDROID_SDK_VERSION: 34
|
||||
# Space-separated list of interesting CTS modules
|
||||
ANDROID_CTS_MODULES: CtsGraphicsTestCases
|
||||
ANDROID_LLVM_VERSION: llvmorg-19.1.7
|
||||
ANDROID_LLVM_ARTIFACT_NAME: android-x86_64-llvm-20250324
|
||||
# This can be confusing: LLVM_VERSION refers to the host LLVM toolchain
|
||||
# used (LLVM 19 in our Debian system), but ANDROID_LLVM_VERSION refers to
|
||||
# the cross-compiling LLVM toolchain used to build for the Android system.
|
||||
LLVM_VERSION: &debian-android-llvm 19
|
||||
|
||||
debian/android_build:
|
||||
extends:
|
||||
- .android-variables
|
||||
- .container-builds-android
|
||||
- .use-debian/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-android_build ${DEBIAN_BUILD_TAG}
|
||||
|
||||
.use-debian/android_build:
|
||||
extends:
|
||||
- .android-variables
|
||||
- .set-image-base-tag
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_build-base
|
||||
MESA_IMAGE_PATH: "debian/android_build"
|
||||
MESA_IMAGE_TAG: *debian-android_build
|
||||
needs:
|
||||
- debian/android_build
|
||||
|
||||
# Debian based ARM build image
|
||||
debian/arm64_build:
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .container
|
||||
- .debian-container-version
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm64_build "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
LLVM_VERSION: &debian-arm64-llvm 19
|
||||
|
||||
.use-debian/arm64_build:
|
||||
extends:
|
||||
- .set-image
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
variables:
|
||||
MESA_IMAGE_PATH: "debian/arm64_build"
|
||||
MESA_IMAGE_TAG: *debian-arm64_build
|
||||
MESA_ARTIFACTS_TAG: *debian-arm64_build
|
||||
LLVM_VERSION: *debian-arm64-llvm
|
||||
needs:
|
||||
- debian/arm64_build
|
||||
|
||||
# Alpine based x86_64 build image
|
||||
.alpine/x86_64_build-base:
|
||||
extends:
|
||||
- .fdo.container-build@alpine
|
||||
- .container
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "3.21"
|
||||
FDO_BASE_IMAGE: alpine:$FDO_DISTRIBUTION_VERSION # since cbuild ignores it
|
||||
|
||||
# Alpine based x86_64 build image
|
||||
alpine/x86_64_build:
|
||||
extends:
|
||||
- .alpine/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &alpine-x86_64_build ${ALPINE_X86_64_BUILD_TAG}
|
||||
LLVM_VERSION: &alpine-llvm_version 19
|
||||
rules:
|
||||
# Note: the next three lines must remain in that order, so that the rules
|
||||
# in `linkcheck-docs` catch nightly pipelines before the rules in `deploy-docs`
|
||||
# exclude them.
|
||||
- !reference [linkcheck-docs, rules]
|
||||
- !reference [deploy-docs, rules]
|
||||
- !reference [test-docs, rules]
|
||||
- !reference [.container, rules]
|
||||
|
||||
.use-alpine/x86_64_build:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image
|
||||
variables:
|
||||
MESA_IMAGE_PATH: "alpine/x86_64_build"
|
||||
MESA_IMAGE_TAG: *alpine-x86_64_build
|
||||
LLVM_VERSION: *alpine-llvm_version
|
||||
needs:
|
||||
- alpine/x86_64_build
|
||||
|
||||
# Alpine based x86_64 image for LAVA SSH dockerized client
|
||||
alpine/x86_64_lava_ssh_client:
|
||||
extends:
|
||||
- .alpine/x86_64_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &alpine-x86_64_lava_ssh_client ${ALPINE_X86_64_LAVA_SSH_TAG}
|
||||
|
||||
# Fedora based x86_64 build image
|
||||
fedora/x86_64_build:
|
||||
extends:
|
||||
- .fdo.container-build@fedora
|
||||
- .container
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: 41
|
||||
MESA_IMAGE_TAG: &fedora-x86_64_build ${FEDORA_X86_64_BUILD_TAG}
|
||||
LLVM_VERSION: &fedora-x86_64-llvm 19
|
||||
|
||||
.use-fedora/x86_64_build:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image
|
||||
variables:
|
||||
MESA_IMAGE_PATH: "fedora/x86_64_build"
|
||||
MESA_IMAGE_TAG: *fedora-x86_64_build
|
||||
LLVM_VERSION: *fedora-x86_64-llvm
|
||||
needs:
|
||||
- fedora/x86_64_build
|
||||
|
||||
# Debian based x86_64 test image base
|
||||
debian/x86_64_test-base:
|
||||
extends:
|
||||
- .debian-container
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${KERNEL_TAG}"
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
|
||||
.use-debian/x86_64_test-base:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .debian-container-version
|
||||
- .use-base-image
|
||||
variables:
|
||||
MESA_BASE_IMAGE: "debian/x86_64_test-base"
|
||||
MESA_BASE_TAG: *debian-x86_64_test-base
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
needs:
|
||||
- debian/x86_64_test-base
|
||||
|
||||
# Debian based ARMv7/armhf test image base
|
||||
debian/arm32_test-base:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .debian-container
|
||||
- .firmware_arm32
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm32_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
LLVM_VERSION: *debian-arm64-llvm
|
||||
FDO_DISTRIBUTION_PLATFORM: "linux/arm/v7"
|
||||
|
||||
.use-debian/arm32_test-base:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .debian-container-version
|
||||
- .use-base-image
|
||||
variables:
|
||||
MESA_BASE_IMAGE: "debian/arm32_test-base"
|
||||
MESA_BASE_TAG: *debian-arm32_test-base
|
||||
LLVM_VERSION: *debian-arm64-llvm
|
||||
FDO_DISTRIBUTION_PLATFORM: "linux/arm/v7"
|
||||
needs:
|
||||
- debian/arm32_test-base
|
||||
|
||||
# Debian based aarch64 test image base
|
||||
debian/arm64_test-base:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .debian-container
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
LLVM_VERSION: *debian-arm64-llvm
|
||||
|
||||
.use-debian/arm64_test-base:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .debian-container-version
|
||||
- .use-base-image
|
||||
variables:
|
||||
MESA_BASE_IMAGE: "debian/arm64_test-base"
|
||||
MESA_BASE_TAG: *debian-arm64_test-base
|
||||
LLVM_VERSION: *debian-arm64-llvm
|
||||
needs:
|
||||
- debian/arm64_test-base
|
||||
|
||||
# Debian based x86_64 test image for GL
|
||||
debian/x86_64_test-gl:
|
||||
extends: .use-debian/x86_64_test-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_test-gl ${DEBIAN_TEST_GL_TAG}
|
||||
|
||||
.use-debian/x86_64_test-gl:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_test-base
|
||||
MESA_IMAGE_PATH: "debian/x86_64_test-gl"
|
||||
MESA_IMAGE_TAG: *debian-x86_64_test-gl
|
||||
needs:
|
||||
- debian/x86_64_test-gl
|
||||
|
||||
# Debian based x86_64 test image for VK
|
||||
debian/x86_64_test-vk:
|
||||
extends: .use-debian/x86_64_test-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_test-vk ${DEBIAN_TEST_VK_TAG}
|
||||
|
||||
.use-debian/x86_64_test-vk:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_test-base
|
||||
MESA_IMAGE_PATH: "debian/x86_64_test-vk"
|
||||
MESA_IMAGE_TAG: *debian-x86_64_test-vk
|
||||
needs:
|
||||
- debian/x86_64_test-vk
|
||||
|
||||
# Debian based x86_64 test image for Android
|
||||
debian/x86_64_test-android:
|
||||
extends:
|
||||
- .android-variables
|
||||
- .use-debian/x86_64_test-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_test-android ${DEBIAN_TEST_ANDROID_TAG}
|
||||
|
||||
.use-debian/x86_64_test-android:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
|
||||
extends:
|
||||
- .android-variables
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_64_test-base
|
||||
MESA_IMAGE_PATH: "debian/x86_64_test-android"
|
||||
MESA_IMAGE_TAG: *debian-x86_64_test-android
|
||||
needs:
|
||||
- debian/x86_64_test-android
|
||||
|
||||
# Debian-based x86_64 image to run Python utilities
|
||||
debian/x86_64_pyutils:
|
||||
extends:
|
||||
- .debian-container
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-x86_64_pyutils "${DEBIAN_PYUTILS_TAG}"
|
||||
|
||||
.use-debian/x86_64_pyutils:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .debian-container-version
|
||||
- .set-image
|
||||
variables:
|
||||
MESA_IMAGE_PATH: "debian/x86_64_pyutils"
|
||||
MESA_IMAGE_TAG: *debian-x86_64_pyutils
|
||||
needs:
|
||||
- debian/x86_64_pyutils
|
||||
|
||||
# Debian based ARMv7/armhf test image for GL
|
||||
debian/arm32_test-gl:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends: .use-debian/arm32_test-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm32_test-gl ${DEBIAN_TEST_GL_TAG}
|
||||
|
||||
.use-debian/arm32_test-gl:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-arm32_test-base
|
||||
MESA_IMAGE_PATH: "debian/arm32_test-gl"
|
||||
MESA_IMAGE_TAG: *debian-arm32_test-gl
|
||||
needs:
|
||||
- debian/arm32_test-gl
|
||||
|
||||
# Debian based ARMv7/armhf test image for VK
|
||||
debian/arm32_test-vk:
|
||||
rules:
|
||||
- when: never # There are currently no arm32 VK jobs
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends: .use-debian/arm32_test-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm32_test-vk ${DEBIAN_TEST_VK_TAG}
|
||||
|
||||
.use-debian/arm32_test-vk:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-arm32_test-base
|
||||
MESA_IMAGE_PATH: "debian/arm32_test-vk"
|
||||
MESA_IMAGE_TAG: *debian-arm32_test-vk
|
||||
needs:
|
||||
- debian/arm32_test-vk
|
||||
|
||||
# Debian based aarch64 test image for GL
|
||||
debian/arm64_test-gl:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .use-debian/arm64_test-base
|
||||
- .container-builds-arm64
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm64_test-gl ${DEBIAN_TEST_GL_TAG}
|
||||
|
||||
.use-debian/arm64_test-gl:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-arm64_test-base
|
||||
MESA_IMAGE_PATH: "debian/arm64_test-gl"
|
||||
MESA_IMAGE_TAG: *debian-arm64_test-gl
|
||||
needs:
|
||||
- debian/arm64_test-gl
|
||||
|
||||
# Debian based aarch64 test image for VK
|
||||
debian/arm64_test-vk:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends: .use-debian/arm64_test-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm64_test-vk ${DEBIAN_TEST_VK_TAG}
|
||||
|
||||
.use-debian/arm64_test-vk:
|
||||
tags:
|
||||
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
|
||||
extends:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-arm64_test-base
|
||||
MESA_IMAGE_PATH: "debian/arm64_test-vk"
|
||||
MESA_IMAGE_TAG: *debian-arm64_test-vk
|
||||
needs:
|
||||
- debian/arm64_test-vk
|
||||
|
||||
# Get firmware directly rather than using package versions.
|
||||
# Change KERNEL_ROOTFS_TAG to add firmware changes.
|
||||
# FIRMWARE_FILES is a list of json files arranged by vendor in .gitlab-ci/firmware/*
|
||||
.firmware_x86_64:
|
||||
variables:
|
||||
FIRMWARE_FILES: |
|
||||
.gitlab-ci/firmware/i915/adl-fw.json
|
||||
.gitlab-ci/firmware/i915/mtl-fw.json
|
||||
|
||||
.firmware_arm64:
|
||||
variables:
|
||||
FIRMWARE_FILES: |
|
||||
.gitlab-ci/firmware/arm/mali/arch10.8/mali-fw.json
|
||||
|
||||
.firmware_arm32:
|
||||
variables:
|
||||
FIRMWARE_FILES: |
|
||||
|
||||
.kernel+rootfs:
|
||||
extends:
|
||||
- .container+build-rules
|
||||
- .debian-container-version
|
||||
stage: container
|
||||
timeout: 120m
|
||||
variables:
|
||||
GIT_STRATEGY: fetch
|
||||
MESA_ROOTFS_TAG: &kernel-rootfs ${KERNEL_ROOTFS_TAG}
|
||||
DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
script:
|
||||
- .gitlab-ci/container/lava_build.sh
|
||||
|
||||
kernel+rootfs_x86_64:
|
||||
extends:
|
||||
- .use-debian/x86_64_build-base
|
||||
- .kernel+rootfs
|
||||
- .firmware_x86_64
|
||||
- .container-builds-x86_64
|
||||
image: "$FDO_BASE_IMAGE"
|
||||
variables:
|
||||
DEBIAN_ARCH: "amd64"
|
||||
DISTRIBUTION_TAG: &distribution-tag-x86_64 "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
LLVM_VERSION: *debian-x86_64-llvm
|
||||
|
||||
kernel+rootfs_arm64:
|
||||
extends:
|
||||
- .use-debian/arm64_build
|
||||
- .kernel+rootfs
|
||||
- .firmware_arm64
|
||||
- .container-builds-arm64
|
||||
variables:
|
||||
DEBIAN_ARCH: "arm64"
|
||||
LLVM_VERSION: *debian-arm64-llvm
|
||||
|
||||
kernel+rootfs_arm32:
|
||||
extends:
|
||||
- kernel+rootfs_arm64
|
||||
- .firmware_arm32
|
||||
variables:
|
||||
DEBIAN_ARCH: "armhf"
|
||||
LLVM_VERSION: &debian-arm32-llvm 15 # no armhf builds for LLVM
|
||||
|
||||
# Cannot use anchors defined here from included files, so use extends: instead
|
||||
.use-kernel+rootfs-arm:
|
||||
variables:
|
||||
DISTRIBUTION_TAG: *distribution-tag-arm
|
||||
MESA_ROOTFS_TAG: *kernel-rootfs
|
||||
|
||||
.use-kernel+rootfs-x86_64:
|
||||
variables:
|
||||
DISTRIBUTION_TAG: *distribution-tag-x86_64
|
||||
MESA_ROOTFS_TAG: *kernel-rootfs
|
||||
|
||||
# x86_64 image with ARM64 & ARM32 kernel & rootfs for baremetal testing
|
||||
.debian/baremetal_arm_test:
|
||||
extends:
|
||||
- .fdo.container-build@debian
|
||||
- .container
|
||||
- .debian-container-version
|
||||
# Don't want the .container rules
|
||||
- .container+build-rules
|
||||
variables:
|
||||
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
ARTIFACTS_PREFIX: "https://${S3_HOST}/${S3_KERNEL_BUCKET}"
|
||||
ARTIFACTS_SUFFIX: "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
MESA_ARTIFACTS_TAG: *debian-arm64_build
|
||||
MESA_ROOTFS_TAG: *kernel-rootfs
|
||||
|
||||
debian/baremetal_arm32_test:
|
||||
extends:
|
||||
- .debian/baremetal_arm_test
|
||||
needs:
|
||||
- kernel+rootfs_arm32
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm32_test "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
|
||||
debian/baremetal_arm64_test:
|
||||
extends:
|
||||
- .debian/baremetal_arm_test
|
||||
needs:
|
||||
- kernel+rootfs_arm64
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm64_test "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
|
||||
|
||||
.use-debian/baremetal_arm_test:
|
||||
variables:
|
||||
MESA_ROOTFS_TAG: *kernel-rootfs
|
||||
|
||||
.use-debian/baremetal_arm32_test:
|
||||
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
extends:
|
||||
- .use-debian/baremetal_arm_test
|
||||
variables:
|
||||
MESA_IMAGE_PATH: "debian/baremetal_arm32_test"
|
||||
MESA_IMAGE_TAG: *debian-arm32_test
|
||||
needs:
|
||||
- debian/baremetal_arm_test
|
||||
|
||||
.use-debian/baremetal_arm64_test:
|
||||
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
extends:
|
||||
- .use-debian/baremetal_arm_test
|
||||
variables:
|
||||
MESA_IMAGE_PATH: "debian/baremetal_arm64_test"
|
||||
MESA_IMAGE_TAG: *debian-arm64_test
|
||||
needs:
|
||||
- debian/baremetal_arm_test
|
||||
|
||||
# Native Windows docker builds
|
||||
#
|
||||
# Unlike the above Linux-based builds - including MinGW builds which
|
||||
# cross-compile for Windows - which use the freedesktop ci-templates, we
|
||||
# cannot use the same scheme here. As Windows lacks support for
|
||||
# Docker-in-Docker, and Podman does not run natively on Windows, we have
|
||||
# to open-code much of the same ourselves.
|
||||
#
|
||||
# This is achieved by first running in a native Windows shell instance
|
||||
# (host PowerShell) in the container stage to build and push the image,
|
||||
# then in the build stage by executing inside Docker.
|
||||
|
||||
.windows-docker-msvc:
|
||||
variables:
|
||||
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}"
|
||||
MESA_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MESA_IMAGE_PATH:${MESA_IMAGE_TAG}"
|
||||
extends:
|
||||
- .windows-docker-tags
|
||||
|
||||
.windows_container_build:
|
||||
inherit:
|
||||
default: [retry]
|
||||
extends:
|
||||
- .container
|
||||
- .windows-docker-msvc
|
||||
- .windows-shell-tags
|
||||
rules:
|
||||
- !reference [.common-rules, rules]
|
||||
- !reference [.microsoft-farm-container-rules, rules]
|
||||
- !reference [.container+build-rules, rules]
|
||||
variables:
|
||||
GIT_STRATEGY: fetch # we do actually need the full repository though
|
||||
MESA_BASE_IMAGE: None
|
||||
script:
|
||||
- .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $MESA_IMAGE $MESA_UPSTREAM_IMAGE ${DOCKERFILE} ${MESA_BASE_IMAGE}
|
||||
|
||||
windows_msvc:
|
||||
inherit:
|
||||
default: [retry]
|
||||
extends:
|
||||
- .windows_container_build
|
||||
variables:
|
||||
MESA_IMAGE_PATH: &windows_msvc_image_path "windows/x86_64_msvc"
|
||||
MESA_IMAGE_TAG: ${WINDOWS_X64_MSVC_TAG}
|
||||
DOCKERFILE: Dockerfile_msvc
|
||||
MESA_BASE_IMAGE: "mcr.microsoft.com/windows/server:ltsc2022"
|
||||
|
||||
windows_build_msvc:
|
||||
inherit:
|
||||
default: [retry]
|
||||
extends:
|
||||
- .windows_container_build
|
||||
rules:
|
||||
- !reference [.common-rules, rules]
|
||||
- !reference [.microsoft-farm-rules, rules]
|
||||
- !reference [.container+build-rules, rules]
|
||||
variables:
|
||||
MESA_IMAGE_PATH: &windows_build_image_path "windows/x86_64_build"
|
||||
MESA_IMAGE_TAG: &windows_build_image_tag ${WINDOWS_X64_MSVC_TAG}--${WINDOWS_X64_BUILD_TAG}
|
||||
DOCKERFILE: Dockerfile_build
|
||||
MESA_BASE_IMAGE_PATH: *windows_msvc_image_path
|
||||
MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${WINDOWS_X64_MSVC_TAG}"
|
||||
timeout: 2h 30m # LLVM takes ages
|
||||
needs:
|
||||
- windows_msvc
|
||||
|
||||
windows_test_msvc:
|
||||
inherit:
|
||||
default: [retry]
|
||||
extends:
|
||||
- .windows_container_build
|
||||
rules:
|
||||
- !reference [.common-rules, rules]
|
||||
- !reference [.microsoft-farm-rules, rules]
|
||||
- !reference [.container+build-rules, rules]
|
||||
variables:
|
||||
MESA_IMAGE_PATH: &windows_test_image_path "windows/x86_64_test"
|
||||
MESA_IMAGE_TAG: &windows_test_image_tag ${WINDOWS_X64_MSVC_TAG}--${WINDOWS_X64_TEST_TAG}
|
||||
DOCKERFILE: Dockerfile_test
|
||||
MESA_BASE_IMAGE_PATH: *windows_msvc_image_path
|
||||
MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${WINDOWS_X64_MSVC_TAG}"
|
||||
timeout: 2h 30m
|
||||
needs:
|
||||
- windows_msvc
|
||||
|
||||
.use-windows_build_msvc:
|
||||
inherit:
|
||||
default: [retry]
|
||||
extends: .windows-docker-msvc
|
||||
image: "$MESA_IMAGE"
|
||||
variables:
|
||||
MESA_IMAGE_PATH: *windows_build_image_path
|
||||
MESA_IMAGE_TAG: *windows_build_image_tag
|
||||
needs:
|
||||
- windows_build_msvc
|
||||
|
||||
.use-windows_test_msvc:
|
||||
inherit:
|
||||
default: [retry]
|
||||
extends: .windows-docker-msvc
|
||||
image: "$MESA_IMAGE"
|
||||
variables:
|
||||
MESA_IMAGE_PATH: *windows_test_image_path
|
||||
MESA_IMAGE_TAG: *windows_test_image_tag
|
||||
|
@@ -2,11 +2,10 @@
|
||||
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# ALPINE_X86_64_BUILD_TAG
|
||||
# DEBIAN_BUILD_TAG
|
||||
# FEDORA_X86_64_BUILD_TAG
|
||||
|
||||
rm -f /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
|
||||
# We need at least 1.7.0 for proper rust binding generation
|
||||
pip3 install 'meson==1.7.0'
|
||||
# We need at least 1.4.0 for rusticl
|
||||
pip3 install 'meson==1.4.0'
|
||||
|
428
.gitlab-ci/container/lava_build.sh
Executable file
428
.gitlab-ci/container/lava_build.sh
Executable file
@@ -0,0 +1,428 @@
|
||||
#!/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
|
||||
# shellcheck disable=SC2016 # non-expanded variables are intentional
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# KERNEL_ROOTFS_TAG
|
||||
# If you need to update the fluster vectors cache without updating the fluster revision,
|
||||
# you can update the FLUSTER_VECTORS_VERSION tag in .gitlab-ci/image-tags.yml.
|
||||
# When changing FLUSTER_REVISION, KERNEL_ROOTFS_TAG needs to be updated as well to rebuild
|
||||
# the rootfs.
|
||||
|
||||
set -e
|
||||
|
||||
. .gitlab-ci/setup-test-env.sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
: "${LLVM_VERSION:?llvm version not set!}"
|
||||
export FIRMWARE_FILES="${FIRMWARE_FILES}"
|
||||
export SKIP_UPDATE_FLUSTER_VECTORS=0
|
||||
|
||||
check_minio()
|
||||
{
|
||||
S3_PATH="${S3_HOST}/${S3_KERNEL_BUCKET}/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
|
||||
if curl -L --retry 4 -f --retry-delay 60 -s \
|
||||
"https://${S3_PATH}/done"; then
|
||||
echo "Remote files are up-to-date, skip rebuilding them."
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
check_fluster()
|
||||
{
|
||||
S3_PATH_FLUSTER="${S3_HOST}/${S3_KERNEL_BUCKET}/$1/${DATA_STORAGE_PATH}/fluster/${FLUSTER_VECTORS_VERSION}"
|
||||
if curl -L --retry 4 -f --retry-delay 60 -s \
|
||||
"https://${S3_PATH_FLUSTER}/done"; then
|
||||
echo "Fluster vectors are up-to-date, skip downloading them."
|
||||
export SKIP_UPDATE_FLUSTER_VECTORS=1
|
||||
fi
|
||||
}
|
||||
|
||||
check_minio "${FDO_UPSTREAM_REPO}"
|
||||
check_minio "${CI_PROJECT_PATH}"
|
||||
|
||||
check_fluster "${FDO_UPSTREAM_REPO}"
|
||||
check_fluster "${CI_PROJECT_PATH}"
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
# Install rust, which we'll be using for deqp-runner. It will be cleaned up at the end.
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
|
||||
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
||||
BUILD_CL="ON"
|
||||
BUILD_VK="ON"
|
||||
GCC_ARCH="aarch64-linux-gnu"
|
||||
KERNEL_ARCH="arm64"
|
||||
|
||||
elif [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
||||
BUILD_CL="OFF"
|
||||
BUILD_VK="OFF"
|
||||
GCC_ARCH="arm-linux-gnueabihf"
|
||||
KERNEL_ARCH="arm"
|
||||
. .gitlab-ci/container/create-cross-file.sh armhf
|
||||
CONTAINER_ARCH_PACKAGES=(
|
||||
libegl1-mesa-dev:armhf
|
||||
libelf-dev:armhf
|
||||
libgbm-dev:armhf
|
||||
libgles2-mesa-dev:armhf
|
||||
libpng-dev:armhf
|
||||
libudev-dev:armhf
|
||||
libvulkan-dev:armhf
|
||||
libwaffle-dev:armhf
|
||||
libwayland-dev:armhf
|
||||
libx11-xcb-dev:armhf
|
||||
libxkbcommon-dev:armhf
|
||||
)
|
||||
else
|
||||
BUILD_CL="ON"
|
||||
BUILD_VK="ON"
|
||||
GCC_ARCH="x86_64-linux-gnu"
|
||||
KERNEL_ARCH="x86_64"
|
||||
CONTAINER_ARCH_PACKAGES=(
|
||||
libasound2-dev libcap-dev libfdt-dev libva-dev p7zip wine
|
||||
)
|
||||
fi
|
||||
|
||||
# Determine if we're in a cross build.
|
||||
if [[ -e /cross_file-$DEBIAN_ARCH.txt ]]; then
|
||||
EXTRA_MESON_ARGS="--cross-file /cross_file-$DEBIAN_ARCH.txt"
|
||||
EXTRA_CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=/toolchain-$DEBIAN_ARCH.cmake"
|
||||
|
||||
if [ $DEBIAN_ARCH = arm64 ]; then
|
||||
RUST_TARGET="aarch64-unknown-linux-gnu"
|
||||
elif [ $DEBIAN_ARCH = armhf ]; then
|
||||
RUST_TARGET="armv7-unknown-linux-gnueabihf"
|
||||
fi
|
||||
rustup target add $RUST_TARGET
|
||||
export EXTRA_CARGO_ARGS="--target $RUST_TARGET"
|
||||
|
||||
export ARCH=${KERNEL_ARCH}
|
||||
export CROSS_COMPILE="${GCC_ARCH}-"
|
||||
fi
|
||||
|
||||
# no need to remove these at end, image isn't saved at the end
|
||||
CONTAINER_EPHEMERAL=(
|
||||
arch-test
|
||||
automake
|
||||
bc
|
||||
"clang-${LLVM_VERSION}"
|
||||
cmake
|
||||
curl
|
||||
mmdebstrap
|
||||
git
|
||||
glslang-tools
|
||||
jq
|
||||
libdrm-dev
|
||||
libegl1-mesa-dev
|
||||
libxext-dev
|
||||
libfontconfig-dev
|
||||
libgbm-dev
|
||||
libgl-dev
|
||||
libgles2-mesa-dev
|
||||
libglu1-mesa-dev
|
||||
libglx-dev
|
||||
libpng-dev
|
||||
libssl-dev
|
||||
libudev-dev
|
||||
libvulkan-dev
|
||||
libwaffle-dev
|
||||
libwayland-dev
|
||||
libx11-xcb-dev
|
||||
libxcb-dri2-0-dev
|
||||
libxkbcommon-dev
|
||||
libwayland-dev
|
||||
"lld-${LLVM_VERSION}"
|
||||
ninja-build
|
||||
openssh-server
|
||||
patch
|
||||
protobuf-compiler
|
||||
python-is-python3
|
||||
python3-distutils
|
||||
python3-mako
|
||||
python3-numpy
|
||||
python3-serial
|
||||
python3-venv
|
||||
unzip
|
||||
wayland-protocols
|
||||
zstd
|
||||
)
|
||||
|
||||
[ "$BUILD_CL" == "ON" ] && CONTAINER_EPHEMERAL+=(
|
||||
ocl-icd-opencl-dev
|
||||
)
|
||||
|
||||
|
||||
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
|
||||
|
||||
. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
|
||||
|
||||
apt-get update
|
||||
apt-get install -y --no-remove \
|
||||
-o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' \
|
||||
"${CONTAINER_EPHEMERAL[@]}" \
|
||||
"${CONTAINER_ARCH_PACKAGES[@]}" \
|
||||
${EXTRA_LOCAL_PACKAGES}
|
||||
|
||||
export ROOTFS=/lava-files/rootfs-${DEBIAN_ARCH}
|
||||
mkdir -p "$ROOTFS"
|
||||
|
||||
# rootfs packages
|
||||
PKG_BASE=(
|
||||
tzdata mount
|
||||
)
|
||||
PKG_CI=(
|
||||
firmware-realtek
|
||||
bash ca-certificates curl
|
||||
initramfs-tools jq netcat-openbsd dropbear openssh-server
|
||||
libasan8
|
||||
libubsan1
|
||||
git
|
||||
python3-dev python3-pip python3-setuptools python3-wheel
|
||||
weston # Wayland
|
||||
xinit xserver-xorg-core xwayland # X11
|
||||
)
|
||||
PKG_MESA_DEP=(
|
||||
libdrm2 libsensors5 libexpat1 # common
|
||||
libvulkan1 # vulkan
|
||||
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 # X11
|
||||
)
|
||||
PKG_DEP=(
|
||||
libpng16-16
|
||||
libva-wayland2
|
||||
libwaffle-1-0
|
||||
libpython3.11 python3 python3-lxml python3-mako python3-numpy python3-packaging python3-pil python3-renderdoc python3-requests python3-simplejson python3-yaml # Python
|
||||
sntp
|
||||
strace
|
||||
waffle-utils
|
||||
zstd
|
||||
)
|
||||
# arch dependent rootfs packages
|
||||
[ "$DEBIAN_ARCH" = "arm64" ] && PKG_ARCH=(
|
||||
libgl1 libglu1-mesa
|
||||
firmware-linux-nonfree firmware-qcom-media
|
||||
libfontconfig1
|
||||
)
|
||||
[ "$DEBIAN_ARCH" = "amd64" ] && PKG_ARCH=(
|
||||
firmware-amd-graphics
|
||||
firmware-misc-nonfree
|
||||
gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools gstreamer1.0-vaapi libgstreamer1.0-0 # Fluster
|
||||
libgl1 libglu1-mesa
|
||||
inetutils-syslogd iptables libcap2
|
||||
libfontconfig1
|
||||
spirv-tools
|
||||
libelf1 libfdt1 "libllvm${LLVM_VERSION}"
|
||||
libva2 libva-drm2
|
||||
socat
|
||||
sysvinit-core
|
||||
wine
|
||||
)
|
||||
[ "$DEBIAN_ARCH" = "armhf" ] && PKG_ARCH=(
|
||||
firmware-misc-nonfree
|
||||
)
|
||||
|
||||
[ "$BUILD_CL" == "ON" ] && PKG_ARCH+=(
|
||||
clinfo
|
||||
"libclang-cpp${LLVM_VERSION}"
|
||||
"libclang-common-${LLVM_VERSION}-dev"
|
||||
ocl-icd-libopencl1
|
||||
)
|
||||
[ "$BUILD_VK" == "ON" ] && PKG_ARCH+=(
|
||||
libvulkan-dev
|
||||
)
|
||||
|
||||
mmdebstrap \
|
||||
--variant=apt \
|
||||
--arch="${DEBIAN_ARCH}" \
|
||||
--components main,contrib,non-free-firmware \
|
||||
--customize-hook='.gitlab-ci/container/get-firmware-from-source.sh "$ROOTFS" "$FIRMWARE_FILES"' \
|
||||
--include "${PKG_BASE[*]} ${PKG_CI[*]} ${PKG_DEP[*]} ${PKG_MESA_DEP[*]} ${PKG_ARCH[*]}" \
|
||||
bookworm \
|
||||
"$ROOTFS/" \
|
||||
"http://deb.debian.org/debian" \
|
||||
"deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" \
|
||||
"${LLVM_APT_REPO:-}"
|
||||
|
||||
############### Install mold
|
||||
. .gitlab-ci/container/build-mold.sh
|
||||
|
||||
############### Building
|
||||
STRIP_CMD="${GCC_ARCH}-strip"
|
||||
mkdir -p $ROOTFS/usr/lib/$GCC_ARCH
|
||||
|
||||
############### Build libclc
|
||||
|
||||
if [ "$BUILD_CL" = "ON" ]; then
|
||||
rm -rf /usr/lib/clc/*
|
||||
. .gitlab-ci/container/build-libclc.sh
|
||||
mkdir -p $ROOTFS/usr/{share,lib}/clc
|
||||
mv /usr/share/clc/spirv*-mesa3d-.spv $ROOTFS/usr/share/clc/
|
||||
ln -s /usr/share/clc/spirv64-mesa3d-.spv $ROOTFS/usr/lib/clc/
|
||||
ln -s /usr/share/clc/spirv-mesa3d-.spv $ROOTFS/usr/lib/clc/
|
||||
fi
|
||||
|
||||
############### Build Vulkan validation layer (for zink)
|
||||
if [ "$DEBIAN_ARCH" = "amd64" ]; then
|
||||
. .gitlab-ci/container/build-vulkan-validation.sh
|
||||
mv /usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so $ROOTFS/usr/lib/x86_64-linux-gnu/
|
||||
mkdir -p $ROOTFS/usr/share/vulkan/explicit_layer.d
|
||||
mv /usr/share/vulkan/explicit_layer.d/* $ROOTFS/usr/share/vulkan/explicit_layer.d/
|
||||
fi
|
||||
|
||||
############### Build apitrace
|
||||
. .gitlab-ci/container/build-apitrace.sh
|
||||
mkdir -p $ROOTFS/apitrace
|
||||
mv /apitrace/build $ROOTFS/apitrace
|
||||
rm -rf /apitrace
|
||||
|
||||
############### Build ANGLE
|
||||
if [ "$DEBIAN_ARCH" != "armhf" ]; then
|
||||
ANGLE_TARGET=linux \
|
||||
. .gitlab-ci/container/build-angle.sh
|
||||
mv /angle $ROOTFS/.
|
||||
rm -rf /angle
|
||||
fi
|
||||
|
||||
############### Build dEQP runner
|
||||
. .gitlab-ci/container/build-deqp-runner.sh
|
||||
mkdir -p $ROOTFS/usr/bin
|
||||
mv /usr/local/bin/*-runner $ROOTFS/usr/bin/.
|
||||
|
||||
|
||||
############### Build dEQP
|
||||
|
||||
DEQP_API=tools \
|
||||
DEQP_TARGET=default \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
DEQP_API=GL \
|
||||
DEQP_TARGET=surfaceless \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
DEQP_API=GLES \
|
||||
DEQP_TARGET=surfaceless \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
if [ "$BUILD_VK" == "ON" ]; then
|
||||
DEQP_API=VK \
|
||||
DEQP_TARGET=default \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
if [ "$DEBIAN_ARCH" == "amd64" ]; then
|
||||
DEQP_API=VK-main \
|
||||
DEQP_TARGET=default \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -rf /VK-GL-CTS
|
||||
|
||||
mv /deqp-* $ROOTFS/.
|
||||
|
||||
|
||||
############### Build SKQP
|
||||
if [[ "$DEBIAN_ARCH" = "arm64" ]] \
|
||||
|| [[ "$DEBIAN_ARCH" = "amd64" ]]; then
|
||||
. .gitlab-ci/container/build-skqp.sh
|
||||
mv /skqp $ROOTFS/.
|
||||
fi
|
||||
|
||||
############### Build piglit
|
||||
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
|
||||
-DPIGLIT_USE_GBM=ON
|
||||
-DPIGLIT_USE_WAYLAND=ON
|
||||
-DPIGLIT_USE_X11=ON
|
||||
-DPIGLIT_BUILD_GLX_TESTS=ON
|
||||
-DPIGLIT_BUILD_EGL_TESTS=ON
|
||||
-DPIGLIT_BUILD_WGL_TESTS=OFF
|
||||
-DPIGLIT_BUILD_GL_TESTS=ON
|
||||
-DPIGLIT_BUILD_GLES1_TESTS=ON
|
||||
-DPIGLIT_BUILD_GLES2_TESTS=ON
|
||||
-DPIGLIT_BUILD_GLES3_TESTS=ON
|
||||
-DPIGLIT_BUILD_CL_TESTS=$BUILD_CL
|
||||
-DPIGLIT_BUILD_VK_TESTS=$BUILD_VK
|
||||
-DPIGLIT_BUILD_DMA_BUF_TESTS=ON" \
|
||||
. .gitlab-ci/container/build-piglit.sh
|
||||
mv /piglit $ROOTFS/.
|
||||
|
||||
############### Build libva tests
|
||||
if [[ "$DEBIAN_ARCH" = "amd64" ]]; then
|
||||
. .gitlab-ci/container/build-va-tools.sh
|
||||
mv /va/bin/* $ROOTFS/usr/bin/
|
||||
fi
|
||||
|
||||
############### Build Crosvm
|
||||
if [[ ${DEBIAN_ARCH} = "amd64" ]]; then
|
||||
. .gitlab-ci/container/build-crosvm.sh
|
||||
mv /usr/local/bin/crosvm $ROOTFS/usr/bin/
|
||||
mv /usr/local/lib/libvirglrenderer.* $ROOTFS/usr/lib/$GCC_ARCH/
|
||||
mkdir -p $ROOTFS/usr/local/libexec/
|
||||
mv /usr/local/libexec/virgl* $ROOTFS/usr/local/libexec/
|
||||
fi
|
||||
|
||||
############### Build ci-kdl
|
||||
. .gitlab-ci/container/build-kdl.sh
|
||||
mv /ci-kdl $ROOTFS/
|
||||
|
||||
############### Install fluster
|
||||
if [[ ${DEBIAN_ARCH} = "amd64" ]]; then
|
||||
section_start fluster "Install fluster"
|
||||
. .gitlab-ci/container/build-fluster.sh
|
||||
section_end fluster
|
||||
fi
|
||||
|
||||
############### Build local stuff for use by igt and kernel testing, which
|
||||
############### will reuse most of our container build process from a specific
|
||||
############### hash of the Mesa tree.
|
||||
if [[ -e ".gitlab-ci/local/build-rootfs.sh" ]]; then
|
||||
. .gitlab-ci/local/build-rootfs.sh
|
||||
fi
|
||||
|
||||
############### Delete rust, since the tests won't be compiling anything.
|
||||
rm -rf /root/.cargo
|
||||
rm -rf /root/.rustup
|
||||
|
||||
############### Delete firmware files we don't need
|
||||
if [ "$DEBIAN_ARCH" = "amd64" ]; then
|
||||
dpkg -L firmware-misc-nonfree | grep -v "i915" | xargs rm || true
|
||||
fi
|
||||
|
||||
############### Fill rootfs
|
||||
cp .gitlab-ci/setup-test-env.sh $ROOTFS/.
|
||||
cp .gitlab-ci/container/setup-rootfs.sh $ROOTFS/.
|
||||
cp .gitlab-ci/container/strip-rootfs.sh $ROOTFS/.
|
||||
cp .gitlab-ci/container/debian/llvm-snapshot.gpg.key $ROOTFS/.
|
||||
cp .gitlab-ci/container/debian/winehq.gpg.key $ROOTFS/.
|
||||
chroot $ROOTFS bash /setup-rootfs.sh
|
||||
rm $ROOTFS/{llvm-snapshot,winehq}.gpg.key
|
||||
rm "$ROOTFS/setup-test-env.sh"
|
||||
rm "$ROOTFS/setup-rootfs.sh"
|
||||
rm "$ROOTFS/strip-rootfs.sh"
|
||||
cp /etc/wgetrc $ROOTFS/etc/.
|
||||
|
||||
# Copy all tags to the rootfs, so test jobs can check if they are using the intended version
|
||||
TAG_FILE_DIR="$(get_tag_file)"
|
||||
if [ -d "${TAG_FILE_DIR}" ]; then
|
||||
cp --parents -r "${TAG_FILE_DIR}" $ROOTFS/.
|
||||
fi
|
||||
|
||||
if [ "${DEBIAN_ARCH}" = "arm64" ]; then
|
||||
mkdir -p /lava-files/rootfs-arm64/lib/firmware/qcom/sm8350/ # for firmware imported later
|
||||
fi
|
||||
|
||||
ROOTFSTAR="lava-rootfs.tar.zst"
|
||||
du -ah "$ROOTFS" | sort -h | tail -100
|
||||
pushd $ROOTFS
|
||||
tar --zstd -cf /lava-files/${ROOTFSTAR} .
|
||||
popd
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
||||
s3_upload /lava-files/"${ROOTFSTAR}" "https://${S3_PATH}/"
|
||||
|
||||
touch /lava-files/done
|
||||
s3_upload /lava-files/done "https://${S3_PATH}/"
|
@@ -1,4 +1,4 @@
|
||||
From ccdc2b9341c703507cba6017d2a494595335ffdc Mon Sep 17 00:00:00 2001
|
||||
From bcb1110cc00398dfb501aac83eddbd66d8fae425 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stone <daniels@collabora.com>
|
||||
Date: Wed, 29 Jan 2025 12:50:33 +0000
|
||||
Subject: [PATCH] Build: Don't build Vulkan utilities for GL builds
|
||||
@@ -55,7 +55,7 @@ index ec1deb5c2..49fe412a7 100644
|
||||
|
||||
# Always link to glutil as some platforms such as Win32 always support GL
|
||||
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
|
||||
index af56dabb8..6b0de6dba 100644
|
||||
index 0472fa615..40f523ee2 100644
|
||||
--- a/framework/platform/android/tcuAndroidPlatform.cpp
|
||||
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
|
||||
@@ -31,7 +31,6 @@
|
||||
@@ -76,7 +76,7 @@ index af56dabb8..6b0de6dba 100644
|
||||
-{
|
||||
-public:
|
||||
- VulkanLibrary(const char *libraryPath)
|
||||
- : m_library(libraryPath != nullptr ? libraryPath : "libvulkan.so")
|
||||
- : m_library(libraryPath != DE_NULL ? libraryPath : "libvulkan.so")
|
||||
- , m_driver(m_library)
|
||||
- {
|
||||
- }
|
||||
@@ -169,7 +169,7 @@ index af56dabb8..6b0de6dba 100644
|
||||
static size_t getTotalSystemMemory(ANativeActivity *activity)
|
||||
{
|
||||
const size_t MiB = (size_t)(1 << 20);
|
||||
@@ -341,8 +244,7 @@ static size_t getTotalSystemMemory(ANativeActivity *activity)
|
||||
@@ -338,8 +241,7 @@ static size_t getTotalSystemMemory(ANativeActivity *activity)
|
||||
// Platform
|
||||
|
||||
Platform::Platform(NativeActivity &activity)
|
||||
@@ -179,7 +179,7 @@ index af56dabb8..6b0de6dba 100644
|
||||
{
|
||||
m_nativeDisplayFactoryRegistry.registerFactory(new NativeDisplayFactory(m_windowRegistry));
|
||||
m_contextFactoryRegistry.registerFactory(new eglu::GLContextFactory(m_nativeDisplayFactoryRegistry));
|
||||
@@ -358,16 +260,6 @@ bool Platform::processEvents(void)
|
||||
@@ -355,16 +257,6 @@ bool Platform::processEvents(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ index af56dabb8..6b0de6dba 100644
|
||||
void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
|
||||
{
|
||||
// Worst-case estimates
|
||||
@@ -401,22 +293,6 @@ void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
|
||||
@@ -398,21 +290,5 @@ void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
|
||||
limits.devicePageTableHierarchyLevels = 3;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,6 @@ index af56dabb8..6b0de6dba 100644
|
||||
-
|
||||
} // namespace Android
|
||||
} // namespace tcu
|
||||
|
||||
diff --git a/framework/platform/android/tcuAndroidPlatform.hpp b/framework/platform/android/tcuAndroidPlatform.hpp
|
||||
index 32cc9068c..3c3f02d98 100644
|
||||
--- a/framework/platform/android/tcuAndroidPlatform.hpp
|
||||
@@ -309,7 +308,7 @@ index 8c0a3ef06..6b1a4985a 100644
|
||||
#if defined(DEQP_SUPPORT_GLX)
|
||||
m_glPlatform.registerFactory(x11::glx::createContextFactory(m_eventState));
|
||||
diff --git a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
|
||||
index 585bfbbae..9f386b3ca 100644
|
||||
index 1cea9dd97..3d5bd8b62 100644
|
||||
--- a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
|
||||
+++ b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
|
||||
@@ -43,7 +43,6 @@
|
||||
@@ -320,7 +319,7 @@ index 585bfbbae..9f386b3ca 100644
|
||||
|
||||
#include <EGL/egl.h>
|
||||
|
||||
@@ -99,52 +98,6 @@ namespace tcu
|
||||
@@ -93,52 +92,6 @@ namespace tcu
|
||||
namespace surfaceless
|
||||
{
|
||||
|
||||
@@ -328,7 +327,7 @@ index 585bfbbae..9f386b3ca 100644
|
||||
-{
|
||||
-public:
|
||||
- VulkanLibrary(const char *libraryPath)
|
||||
- : m_library(libraryPath != nullptr ? libraryPath : DEQP_VULKAN_LIBRARY_PATH)
|
||||
- : m_library(libraryPath != DE_NULL ? libraryPath : DEQP_VULKAN_LIBRARY_PATH)
|
||||
- , m_driver(m_library)
|
||||
- {
|
||||
- }
|
||||
@@ -373,7 +372,7 @@ index 585bfbbae..9f386b3ca 100644
|
||||
bool isEGLExtensionSupported(const eglw::Library &egl, eglw::EGLDisplay, const std::string &extName)
|
||||
{
|
||||
const vector<string> exts = eglu::getClientExtensions(egl);
|
||||
@@ -191,13 +144,6 @@ public:
|
||||
@@ -185,13 +138,6 @@ public:
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
@@ -388,5 +387,5 @@ index 585bfbbae..9f386b3ca 100644
|
||||
|
||||
class ContextFactory : public glu::ContextFactory
|
||||
--
|
||||
2.45.2
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,42 +0,0 @@
|
||||
From 067676253ad11846f420087d30021629f3c43382 Mon Sep 17 00:00:00 2001
|
||||
From: Valentine Burley <valentine.burley@collabora.com>
|
||||
Date: Fri, 11 Apr 2025 16:51:08 +0200
|
||||
Subject: Revert "Add missing context deletion"
|
||||
|
||||
This reverts commit 195ee2c99d3174e738506cc86828766805c0ede9.
|
||||
---
|
||||
.../modules/gles31/es31cComputeShaderTests.cpp | 11 -----------
|
||||
1 file changed, 11 deletions(-)
|
||||
|
||||
diff --git a/external/openglcts/modules/gles31/es31cComputeShaderTests.cpp b/external/openglcts/modules/gles31/es31cComputeShaderTests.cpp
|
||||
index 4c7349e59..ece33929d 100644
|
||||
--- a/external/openglcts/modules/gles31/es31cComputeShaderTests.cpp
|
||||
+++ b/external/openglcts/modules/gles31/es31cComputeShaderTests.cpp
|
||||
@@ -721,11 +721,6 @@ class LongRunningComputeFenceTest : public ComputeShaderBase
|
||||
glDeleteProgram(m_program2);
|
||||
glDeleteBuffers(2, &m_buffer);
|
||||
|
||||
- // Delete shared context and keep default context set
|
||||
- delete m_sharedContext;
|
||||
- m_sharedContext = NULL;
|
||||
- m_context.getRenderContext().makeCurrent();
|
||||
-
|
||||
return NO_ERROR;
|
||||
}
|
||||
};
|
||||
@@ -910,12 +905,6 @@ class LongRunningPersistentSSBOComputeTest : public ComputeShaderBase
|
||||
{
|
||||
glDeleteBuffers(2, &m_buffer);
|
||||
m_dataLoadStore = NULL;
|
||||
-
|
||||
- // Delete shared context and keep default context set
|
||||
- delete m_sharedContext;
|
||||
- m_sharedContext = NULL;
|
||||
- m_context.getRenderContext().makeCurrent();
|
||||
-
|
||||
return NO_ERROR;
|
||||
}
|
||||
};
|
||||
--
|
||||
2.45.2
|
||||
|
@@ -1,81 +0,0 @@
|
||||
From 6cd7a951f6a50d0f74c798035ac7ce201f2aa6f0 Mon Sep 17 00:00:00 2001
|
||||
From: Valentine Burley <valentine.burley@collabora.com>
|
||||
Date: Fri, 11 Apr 2025 16:51:03 +0200
|
||||
Subject: Revert "Fix issues with GLX reset notification strategy"
|
||||
|
||||
This reverts commit 3e6b3fb43eb9682641d8c880429255569a4472c0.
|
||||
---
|
||||
.../platform/lnx/X11/tcuLnxX11GlxPlatform.cpp | 23 ++++---------------
|
||||
1 file changed, 4 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/framework/platform/lnx/X11/tcuLnxX11GlxPlatform.cpp b/framework/platform/lnx/X11/tcuLnxX11GlxPlatform.cpp
|
||||
index b21e6bcbd..e1d33823c 100644
|
||||
--- a/framework/platform/lnx/X11/tcuLnxX11GlxPlatform.cpp
|
||||
+++ b/framework/platform/lnx/X11/tcuLnxX11GlxPlatform.cpp
|
||||
@@ -147,7 +147,6 @@ private:
|
||||
GlxDisplay &m_display;
|
||||
::Visual *m_visual;
|
||||
const GLXFBConfig m_fbConfig;
|
||||
- glu::ResetNotificationStrategy resetStrategy;
|
||||
};
|
||||
|
||||
class GlxDrawable
|
||||
@@ -220,7 +219,6 @@ public:
|
||||
virtual const tcu::RenderTarget &getRenderTarget(void) const;
|
||||
virtual glw::GenericFuncType getProcAddress(const char *name) const;
|
||||
const GLXContext &getGLXContext(void) const;
|
||||
- const GlxVisual &getGLXVisual(void) const;
|
||||
|
||||
private:
|
||||
GlxDisplay m_glxDisplay;
|
||||
@@ -412,31 +410,23 @@ GLXContext GlxVisual::createContext(const GlxContextFactory &factory, const Cont
|
||||
}
|
||||
}
|
||||
|
||||
- const GlxRenderContext *sharedGlxRenderContext = dynamic_cast<const GlxRenderContext *>(sharedContext);
|
||||
-
|
||||
- /* If there is a shared context, use same reset notification strategy. */
|
||||
- glu::ResetNotificationStrategy usedResetNotificationStrategy =
|
||||
- sharedGlxRenderContext ? sharedGlxRenderContext->getGLXVisual().resetStrategy : resetNotificationStrategy;
|
||||
-
|
||||
- if (usedResetNotificationStrategy != glu::RESET_NOTIFICATION_STRATEGY_NOT_SPECIFIED)
|
||||
+ if (resetNotificationStrategy != glu::RESET_NOTIFICATION_STRATEGY_NOT_SPECIFIED)
|
||||
{
|
||||
checkGlxExtension(m_display, "GLX_ARB_create_context_robustness");
|
||||
attribs.push_back(GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB);
|
||||
|
||||
- if (usedResetNotificationStrategy == glu::RESET_NOTIFICATION_STRATEGY_NO_RESET_NOTIFICATION)
|
||||
+ if (resetNotificationStrategy == glu::RESET_NOTIFICATION_STRATEGY_NO_RESET_NOTIFICATION)
|
||||
attribs.push_back(GLX_NO_RESET_NOTIFICATION_ARB);
|
||||
- else if (usedResetNotificationStrategy == glu::RESET_NOTIFICATION_STRATEGY_LOSE_CONTEXT_ON_RESET)
|
||||
+ else if (resetNotificationStrategy == glu::RESET_NOTIFICATION_STRATEGY_LOSE_CONTEXT_ON_RESET)
|
||||
attribs.push_back(GLX_LOSE_CONTEXT_ON_RESET_ARB);
|
||||
else
|
||||
TCU_THROW(InternalError, "Unknown reset notification strategy");
|
||||
}
|
||||
|
||||
- // Reset notification strategy used with this visual.
|
||||
- resetStrategy = resetNotificationStrategy;
|
||||
-
|
||||
// Terminate attrib list
|
||||
attribs.push_back(None);
|
||||
|
||||
+ const GlxRenderContext *sharedGlxRenderContext = dynamic_cast<const GlxRenderContext *>(sharedContext);
|
||||
const GLXContext &sharedGLXContext = sharedGlxRenderContext ? sharedGlxRenderContext->getGLXContext() : nullptr;
|
||||
|
||||
return TCU_CHECK_GLX(
|
||||
@@ -815,11 +805,6 @@ const GLXContext &GlxRenderContext::getGLXContext(void) const
|
||||
return m_GLXContext;
|
||||
}
|
||||
|
||||
-const GlxVisual &GlxRenderContext::getGLXVisual(void) const
|
||||
-{
|
||||
- return m_glxVisual;
|
||||
-}
|
||||
-
|
||||
MovePtr<ContextFactory> createContextFactory(EventState &eventState)
|
||||
{
|
||||
return MovePtr<ContextFactory>(new GlxContextFactory(eventState));
|
||||
--
|
||||
2.45.2
|
||||
|
@@ -1,56 +0,0 @@
|
||||
From b512e6d5a0c79b194293936bd06656646913704e Mon Sep 17 00:00:00 2001
|
||||
From: Valentine Burley <valentine.burley@collabora.com>
|
||||
Date: Fri, 11 Apr 2025 16:50:57 +0200
|
||||
Subject: Revert "Fix spurious failures when using a config without
|
||||
pbuffer support"
|
||||
|
||||
This reverts commit 415a0ba8ecde404ef37ce96ece55b46854b44888.
|
||||
---
|
||||
external/openglcts/modules/common/glcTestSubcase.cpp | 10 ----------
|
||||
framework/egl/egluGLContextFactory.cpp | 2 --
|
||||
2 files changed, 12 deletions(-)
|
||||
|
||||
diff --git a/external/openglcts/modules/common/glcTestSubcase.cpp b/external/openglcts/modules/common/glcTestSubcase.cpp
|
||||
index 93e58c18a..cd43cc068 100644
|
||||
--- a/external/openglcts/modules/common/glcTestSubcase.cpp
|
||||
+++ b/external/openglcts/modules/common/glcTestSubcase.cpp
|
||||
@@ -233,11 +233,6 @@ TestSubcase::IterateResult TestSubcase::iterate(void)
|
||||
if (subError == ERROR)
|
||||
log.writeMessage("Test Setup() failed");
|
||||
}
|
||||
- catch (const tcu::NotSupportedError &ex)
|
||||
- {
|
||||
- log.writeMessage(ex.what());
|
||||
- subError = NOT_SUPPORTED;
|
||||
- }
|
||||
catch (const runtime_error &ex)
|
||||
{
|
||||
log.writeMessage(ex.what());
|
||||
@@ -258,11 +253,6 @@ TestSubcase::IterateResult TestSubcase::iterate(void)
|
||||
if (subError == ERROR)
|
||||
log.writeMessage("Test Run() failed");
|
||||
}
|
||||
- catch (const tcu::NotSupportedError &ex)
|
||||
- {
|
||||
- log.writeMessage(ex.what());
|
||||
- subError = NOT_SUPPORTED;
|
||||
- }
|
||||
catch (const runtime_error &ex)
|
||||
{
|
||||
log.writeMessage(ex.what());
|
||||
diff --git a/framework/egl/egluGLContextFactory.cpp b/framework/egl/egluGLContextFactory.cpp
|
||||
index 66783ad8b..f347b40ad 100644
|
||||
--- a/framework/egl/egluGLContextFactory.cpp
|
||||
+++ b/framework/egl/egluGLContextFactory.cpp
|
||||
@@ -539,8 +539,6 @@ void RenderContext::postIterate(void)
|
||||
|
||||
if (m_window)
|
||||
{
|
||||
- EGLU_CHECK_CALL(egl, makeCurrent(m_eglDisplay, m_eglSurface, m_eglSurface, m_eglContext));
|
||||
-
|
||||
EGLBoolean swapOk = egl.swapBuffers(m_eglDisplay, m_eglSurface);
|
||||
EGLint error = egl.getError();
|
||||
const bool badWindow = error == EGL_BAD_SURFACE || error == EGL_BAD_NATIVE_WINDOW;
|
||||
--
|
||||
2.45.2
|
||||
|
@@ -0,0 +1,182 @@
|
||||
From 2503bf1be98eaa810672f6a6eb8f735a33511a4f 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>
|
||||
---
|
||||
CMakeLists.txt | 38 ++-----------------
|
||||
.../android/tcuAndroidNativeActivity.cpp | 36 +++++++++---------
|
||||
.../platform/android/tcuAndroidPlatform.cpp | 12 +++++-
|
||||
3 files changed, 34 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 309bdda18..7c833751f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -275,7 +275,7 @@ include_directories(
|
||||
external/vulkancts/framework/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 )
|
||||
@@ -319,7 +319,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}")
|
||||
@@ -341,7 +341,7 @@ macro (add_deqp_module_skip_android MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
|
||||
add_library("${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}" STATIC ${SRCS})
|
||||
target_link_libraries("${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}" ${LIBS})
|
||||
|
||||
- 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}")
|
||||
@@ -393,37 +393,7 @@ add_subdirectory(external/vulkancts/vkscpc ${MAYBE_EXCLUDE_FROM_ALL})
|
||||
add_subdirectory(external/openglcts ${MAYBE_EXCLUDE_FROM_ALL})
|
||||
|
||||
# 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 82a9ab699..4eab14a39 100644
|
||||
--- a/framework/platform/android/tcuAndroidNativeActivity.cpp
|
||||
+++ b/framework/platform/android/tcuAndroidNativeActivity.cpp
|
||||
@@ -115,23 +115,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 0472fa615..ff8929409 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"
|
||||
@@ -198,7 +199,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);
|
||||
}
|
||||
@@ -319,6 +320,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;
|
||||
@@ -416,3 +420,9 @@ bool Platform::hasDisplay(vk::wsi::Type wsiType) const
|
||||
|
||||
} // namespace Android
|
||||
} // namespace tcu
|
||||
+
|
||||
+tcu::Platform* createPlatform (void)
|
||||
+{
|
||||
+ tcu::Android::NativeActivity activity(NULL);
|
||||
+ return new tcu::Android::Platform(activity);
|
||||
+}
|
||||
--
|
||||
2.45.2
|
||||
|
@@ -0,0 +1,26 @@
|
||||
From a602822c53e22e985f942f843ccadbfb64613212 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>
|
||||
---
|
||||
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 6579e9f48..c200c6f6b 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.42.0
|
||||
|
18
.gitlab-ci/container/setup-rootfs.sh
Executable file → Normal file
18
.gitlab-ci/container/setup-rootfs.sh
Executable file → Normal file
@@ -2,11 +2,19 @@
|
||||
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
|
||||
# When changing this file, you need to bump the following
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# DEBIAN_TEST_VIDEO_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
set -ex
|
||||
|
||||
set -eux -o pipefail
|
||||
. setup-test-env.sh
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Needed for ci-fairy, this revision is able to upload files to
|
||||
# MinIO and doesn't depend on git
|
||||
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
# Needed for manipulation with traces yaml files.
|
||||
pip3 install --break-system-packages yq
|
||||
|
||||
passwd root -d
|
||||
chsh -s /bin/sh
|
||||
@@ -21,3 +29,5 @@ chmod +x /init
|
||||
# Copy timezone file and remove tzdata package
|
||||
rm -rf /etc/localtime
|
||||
cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
||||
|
||||
. strip-rootfs.sh
|
||||
|
@@ -4,8 +4,8 @@
|
||||
# .gitlab-ci/image-tags.yml tags:
|
||||
# DEBIAN_TEST_ANDROID_TAG
|
||||
# DEBIAN_TEST_GL_TAG
|
||||
# DEBIAN_TEST_VIDEO_TAG
|
||||
# DEBIAN_TEST_VK_TAG
|
||||
# KERNEL_ROOTFS_TAG
|
||||
set -ex
|
||||
|
||||
section_start strip-rootfs "Stripping rootfs"
|
||||
@@ -38,6 +38,7 @@ UNNEEDED_PACKAGES=(
|
||||
udev
|
||||
init-system-helpers
|
||||
cpio
|
||||
passwd
|
||||
libsemanage1 libsemanage-common
|
||||
libsepol1
|
||||
gpgv
|
||||
|
@@ -1,110 +0,0 @@
|
||||
# Native Windows docker builds
|
||||
#
|
||||
# Unlike the above Linux-based builds - including MinGW builds which
|
||||
# cross-compile for Windows - which use the freedesktop ci-templates, we
|
||||
# cannot use the same scheme here. As Windows lacks support for
|
||||
# Docker-in-Docker, and Podman does not run natively on Windows, we have
|
||||
# to open-code much of the same ourselves.
|
||||
#
|
||||
# This is achieved by first running in a native Windows shell instance
|
||||
# (host PowerShell) in the container stage to build and push the image,
|
||||
# then in the build stage by executing inside Docker.
|
||||
|
||||
.windows-docker-msvc:
|
||||
variables:
|
||||
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}"
|
||||
MESA_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MESA_IMAGE_PATH:${MESA_IMAGE_TAG}"
|
||||
extends:
|
||||
- .windows-docker-tags
|
||||
|
||||
.windows_container_build:
|
||||
inherit:
|
||||
default: [retry]
|
||||
extends:
|
||||
- .container
|
||||
- .windows-docker-msvc
|
||||
- .windows-shell-tags
|
||||
rules:
|
||||
- !reference [.common-rules, rules]
|
||||
- !reference [.microsoft-farm-container-rules, rules]
|
||||
- !reference [.container-rules, rules]
|
||||
variables:
|
||||
GIT_STRATEGY: fetch # we do actually need the full repository though
|
||||
MESA_BASE_IMAGE: None
|
||||
before_script: null # remove .container before_script as it's unix-only
|
||||
script:
|
||||
- .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $MESA_IMAGE $MESA_UPSTREAM_IMAGE ${DOCKERFILE} ${MESA_BASE_IMAGE}
|
||||
|
||||
windows_msvc:
|
||||
inherit:
|
||||
default: [retry]
|
||||
extends:
|
||||
- .windows_container_build
|
||||
variables:
|
||||
MESA_IMAGE_PATH: &windows_msvc_image_path "windows/x86_64_msvc"
|
||||
MESA_IMAGE_TAG: ${WINDOWS_X64_MSVC_TAG}
|
||||
DOCKERFILE: Dockerfile_msvc
|
||||
MESA_BASE_IMAGE: "mcr.microsoft.com/windows/server:ltsc2022"
|
||||
|
||||
windows_build_msvc:
|
||||
inherit:
|
||||
default: [retry]
|
||||
extends:
|
||||
- .windows_container_build
|
||||
rules:
|
||||
- !reference [.common-rules, rules]
|
||||
- !reference [.microsoft-farm-rules, rules]
|
||||
- !reference [.container-rules, rules]
|
||||
variables:
|
||||
MESA_IMAGE_PATH: &windows_build_image_path "windows/x86_64_build"
|
||||
MESA_IMAGE_TAG: &windows_build_image_tag ${WINDOWS_X64_MSVC_TAG}--${WINDOWS_X64_BUILD_TAG}
|
||||
DOCKERFILE: Dockerfile_build
|
||||
MESA_BASE_IMAGE_PATH: *windows_msvc_image_path
|
||||
MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${WINDOWS_X64_MSVC_TAG}"
|
||||
timeout: 2h 30m # LLVM takes ages
|
||||
needs:
|
||||
- job: windows_msvc
|
||||
optional: true
|
||||
|
||||
windows_test_msvc:
|
||||
inherit:
|
||||
default: [retry]
|
||||
extends:
|
||||
- .windows_container_build
|
||||
rules:
|
||||
- !reference [.common-rules, rules]
|
||||
- !reference [.microsoft-farm-rules, rules]
|
||||
- !reference [.container-rules, rules]
|
||||
variables:
|
||||
MESA_IMAGE_PATH: &windows_test_image_path "windows/x86_64_test"
|
||||
MESA_IMAGE_TAG: &windows_test_image_tag ${WINDOWS_X64_MSVC_TAG}--${WINDOWS_X64_TEST_TAG}
|
||||
DOCKERFILE: Dockerfile_test
|
||||
MESA_BASE_IMAGE_PATH: *windows_msvc_image_path
|
||||
MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${WINDOWS_X64_MSVC_TAG}"
|
||||
timeout: 2h 30m
|
||||
needs:
|
||||
- job: windows_msvc
|
||||
optional: true
|
||||
|
||||
.use-windows_build_msvc:
|
||||
inherit:
|
||||
default: [retry]
|
||||
extends: .windows-docker-msvc
|
||||
image: "$MESA_IMAGE"
|
||||
variables:
|
||||
MESA_IMAGE_PATH: *windows_build_image_path
|
||||
MESA_IMAGE_TAG: *windows_build_image_tag
|
||||
needs:
|
||||
- job: sanity
|
||||
optional: true
|
||||
- job: windows_build_msvc
|
||||
optional: true
|
||||
|
||||
.use-windows_test_msvc:
|
||||
inherit:
|
||||
default: [retry]
|
||||
extends: .windows-docker-msvc
|
||||
image: "$MESA_IMAGE"
|
||||
variables:
|
||||
MESA_IMAGE_PATH: *windows_test_image_path
|
||||
MESA_IMAGE_TAG: *windows_test_image_tag
|
@@ -3,14 +3,6 @@
|
||||
|
||||
set -ue
|
||||
|
||||
if [ -z "$CROSVM_TAG" ]; then
|
||||
echo "CROSVM_TAG must be set to the conditional build tag"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Are we using the right crosvm version?
|
||||
ci_tag_test_time_check "CROSVM_TAG"
|
||||
|
||||
# Instead of starting one dEQP instance per available CPU core, pour our
|
||||
# concurrency at llvmpipe threads instead. This is mostly useful for VirGL and
|
||||
# Venus, which serialise quite a bit at the host level. So instead of smashing
|
||||
@@ -84,7 +76,7 @@ set_vsock_context || { echo "Could not generate crosvm vsock CID" >&2; exit 1; }
|
||||
# Securely pass the current variables to the crosvm environment
|
||||
echo "Variables passed through:"
|
||||
SCRIPTS_DIR=$(readlink -en "${0%/*}")
|
||||
filter_env_vars | tee ${VM_TEMP_DIR}/crosvm-env.sh
|
||||
${SCRIPTS_DIR}/common/export-gitlab-job-env-for-dut.sh | tee ${VM_TEMP_DIR}/crosvm-env.sh
|
||||
cp ${SCRIPTS_DIR}/setup-test-env.sh ${VM_TEMP_DIR}/setup-test-env.sh
|
||||
|
||||
# Set the crosvm-script as the arguments of the current script
|
||||
@@ -120,13 +112,6 @@ then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ ! -f "/kernel/${KERNEL_IMAGE_NAME:-bzImage}" ]; then
|
||||
mkdir -p /kernel
|
||||
# shellcheck disable=SC2153
|
||||
curl -L --retry 4 -f --retry-connrefused --retry-delay 30 \
|
||||
-o "/kernel/${KERNEL_IMAGE_NAME:-bzImage}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH:-amd64}/${KERNEL_IMAGE_NAME:-bzImage}"
|
||||
fi
|
||||
|
||||
# We aren't testing the host driver here, so we don't need to validate NIR on the host
|
||||
NIR_DEBUG="novalidate" \
|
||||
LIBGL_ALWAYS_SOFTWARE=${CROSVM_LIBGL_ALWAYS_SOFTWARE:-} \
|
||||
|
@@ -4,22 +4,21 @@
|
||||
|
||||
. "${SCRIPTS_DIR}/setup-test-env.sh"
|
||||
|
||||
set -uex
|
||||
|
||||
section_start cuttlefish_setup "cuttlefish: setup"
|
||||
set -xe
|
||||
|
||||
# Structured tagging check for angle
|
||||
if [ -n "${ANGLE_TAG:-}" ]; then
|
||||
if [ -n "$ANGLE_TAG" ]; then
|
||||
# Bail out if the ANGLE_TAG differs from what is offered in the system
|
||||
ci_tag_test_time_check "ANGLE_TAG"
|
||||
fi
|
||||
|
||||
export PATH=/cuttlefish/bin:$PATH
|
||||
export LD_LIBRARY_PATH=/cuttlefish/lib64:${CI_PROJECT_DIR}/install/lib:${LD_LIBRARY_PATH:-}
|
||||
export LD_LIBRARY_PATH=/cuttlefish/lib64:${CI_PROJECT_DIR}/install/lib:$LD_LIBRARY_PATH
|
||||
|
||||
# Pick up a vulkan driver
|
||||
ARCH=$(uname -m)
|
||||
export VK_DRIVER_FILES=${CI_PROJECT_DIR}/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json
|
||||
export VK_DRIVER_FILES=${CI_PROJECT_DIR}/install/share/vulkan/icd.d/${VK_DRIVER:-}_icd.$ARCH.json
|
||||
|
||||
syslogd
|
||||
|
||||
@@ -30,43 +29,26 @@ pushd /cuttlefish
|
||||
# Add a function to perform some tasks when exiting the script
|
||||
function my_atexit()
|
||||
{
|
||||
section_switch cuttlefish_stop "cuttlefish: stop + storing logs"
|
||||
set -x
|
||||
set +e # Be resilient and get logs even if stop_cvd fails
|
||||
|
||||
# shellcheck disable=SC2317
|
||||
HOME=/cuttlefish stop_cvd -wait_for_launcher=40
|
||||
|
||||
# shellcheck disable=SC2317
|
||||
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/logcat $RESULTS_DIR
|
||||
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/logcat $RESULTS_DIR || true
|
||||
# shellcheck disable=SC2317
|
||||
cp /cuttlefish/cuttlefish/instances/cvd-1/kernel.log $RESULTS_DIR
|
||||
cp /cuttlefish/cuttlefish/instances/cvd-1/kernel.log $RESULTS_DIR || true
|
||||
# shellcheck disable=SC2317
|
||||
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/launcher.log $RESULTS_DIR
|
||||
|
||||
set -e
|
||||
set +x
|
||||
section_end cuttlefish_stop
|
||||
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/launcher.log $RESULTS_DIR || true
|
||||
}
|
||||
|
||||
# stop cuttlefish if the script ends prematurely or is interrupted
|
||||
trap 'my_atexit' EXIT
|
||||
trap 'exit 2' HUP INT PIPE TERM
|
||||
|
||||
ulimit -n 32768
|
||||
ulimit -S -n 32768
|
||||
|
||||
VSOCK_BASE=10000 # greater than all the default vsock ports
|
||||
VSOCK_CID=$((VSOCK_BASE + (CI_JOB_ID & 0xfff)))
|
||||
|
||||
# Venus requires a custom kernel for now
|
||||
CUSTOM_KERNEL_ARGS=""
|
||||
if [ "$ANDROID_GPU_MODE" = "venus" ] || [ "$ANDROID_GPU_MODE" = "venus_guest_angle" ]; then
|
||||
CUSTOM_KERNEL_ARGS="
|
||||
-kernel_path=/cuttlefish/bzImage
|
||||
-initramfs_path=/cuttlefish/initramfs.img
|
||||
"
|
||||
fi
|
||||
|
||||
HOME=/cuttlefish launch_cvd \
|
||||
-daemon \
|
||||
-verbosity=VERBOSE \
|
||||
@@ -81,21 +63,14 @@ HOME=/cuttlefish launch_cvd \
|
||||
-report_anonymous_usage_stats=no \
|
||||
-gpu_mode="$ANDROID_GPU_MODE" \
|
||||
-cpus=${FDO_CI_CONCURRENT:-4} \
|
||||
-memory_mb ${CUTTLEFISH_MEMORY:-4096} \
|
||||
$CUSTOM_KERNEL_ARGS
|
||||
-memory_mb 8192 \
|
||||
-kernel_path="/cuttlefish/bzImage" \
|
||||
-initramfs_path="/cuttlefish/initramfs.img"
|
||||
|
||||
sleep 1
|
||||
|
||||
popd
|
||||
|
||||
# download Android Mesa from S3
|
||||
curl-with-retry -O "${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${S3_ANDROID_ARTIFACT_NAME}.tar.zst"
|
||||
mkdir /mesa-android
|
||||
tar -C /mesa-android -xvf ${S3_ANDROID_ARTIFACT_NAME}.tar.zst
|
||||
|
||||
# shellcheck disable=SC2034 # used externally
|
||||
INSTALL="/mesa-android/install"
|
||||
|
||||
# shellcheck disable=SC2034 # used externally
|
||||
ADB=adb
|
||||
|
||||
|
@@ -25,22 +25,12 @@ ARCH=$(uname -m)
|
||||
export VK_DRIVER_FILES="$PWD"/install/share/vulkan/icd.d/"$VK_DRIVER"_icd."$ARCH".json
|
||||
export OCL_ICD_VENDORS="$PWD"/install/etc/OpenCL/vendors/
|
||||
|
||||
if [ -n "${ANGLE_TAG:-}" ]; then
|
||||
# Are we using the right ANGLE version?
|
||||
if [ -n "$ANGLE_TAG" ]; then
|
||||
# Are we using the right angle version?
|
||||
ci_tag_test_time_check "ANGLE_TAG"
|
||||
export LD_LIBRARY_PATH=/angle:$LD_LIBRARY_PATH
|
||||
fi
|
||||
|
||||
if [ -n "$PIGLIT_TAG" ]; then
|
||||
# Are we using the right Piglit version?
|
||||
ci_tag_test_time_check "PIGLIT_TAG"
|
||||
elif [ -d "/piglit" ]; then
|
||||
# The job does not inherit from .test-piglit, so we remove it.
|
||||
# This makes sure that we can both do the right version checks when needed,
|
||||
# and also optimise our dependencies so we don't pull unneeded stuff.
|
||||
rm -r /piglit
|
||||
fi
|
||||
|
||||
# Ensure Mesa Shader Cache resides on tmpfs.
|
||||
SHADER_CACHE_HOME=${XDG_CACHE_HOME:-${HOME}/.cache}
|
||||
SHADER_CACHE_DIR=${MESA_SHADER_CACHE_DIR:-${SHADER_CACHE_HOME}/mesa_shader_cache}
|
||||
@@ -79,7 +69,7 @@ if [ -e "$INSTALL/$GPU_VERSION-slow-skips.txt" ] && [[ $CI_JOB_NAME != *full* ]]
|
||||
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/$GPU_VERSION-slow-skips.txt"
|
||||
fi
|
||||
|
||||
if [ -n "${ANGLE_TAG:-}" ]; then
|
||||
if [ -n "$ANGLE_TAG" ]; then
|
||||
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/angle-skips.txt"
|
||||
fi
|
||||
|
||||
|
@@ -16,8 +16,8 @@ fi
|
||||
TMP_DIR=$(mktemp -d)
|
||||
|
||||
echo "$(date +"%F %T") Downloading archived master..."
|
||||
if ! curl --location --fail --retry-connrefused --retry 3 --retry-delay 10 \
|
||||
--output "$TMP_DIR/$CI_PROJECT_NAME.tar.gz" \
|
||||
if ! /usr/bin/wget \
|
||||
-O "$TMP_DIR/$CI_PROJECT_NAME.tar.gz" \
|
||||
"https://${S3_HOST}/${S3_GITCACHE_BUCKET}/${FDO_UPSTREAM_REPO}/$CI_PROJECT_NAME.tar.gz";
|
||||
then
|
||||
echo "Repository cache not available"
|
||||
|
@@ -31,11 +31,11 @@
|
||||
# In case of issues with a farm, here are the people to contact:
|
||||
# farm name | ci infrastructure used | admin(s)
|
||||
# -----------------|----------------------------------|---------
|
||||
# anholt | (decommissioned) | @anholt
|
||||
# anholt | baremetal/poe-powered | @anholt
|
||||
# austriancoder | ci-tron | @austriancoder
|
||||
# collabora | lava | @daniels, @sergi
|
||||
# google-freedreno | none (moving to LAVA) | @daniels, @sergi
|
||||
# igalia | baremetal/poe-powered, ci-tron | @jasuarez, @chema
|
||||
# google-freedreno | baremetal/{fastboot,cros-servo} | @robclark
|
||||
# igalia | baremetal/poe-powered | @jasuarez, @chema
|
||||
# lima | lava | @enunes
|
||||
# microsoft | custom | @jenatali, @alatiera
|
||||
# ondracka | ci-tron | @ondracka
|
||||
@@ -211,6 +211,7 @@
|
||||
when: never
|
||||
- !reference [.valve-farm-rules, rules]
|
||||
|
||||
|
||||
.austriancoder-farm-rules:
|
||||
rules:
|
||||
- exists: [ .ci-farms-disabled/austriancoder ]
|
||||
@@ -231,6 +232,27 @@
|
||||
when: never
|
||||
- !reference [.austriancoder-farm-rules, rules]
|
||||
|
||||
|
||||
.google-freedreno-farm-rules:
|
||||
rules:
|
||||
- exists: [ .ci-farms-disabled/google-freedreno ]
|
||||
when: never
|
||||
- changes: [ .ci-farms-disabled/google-freedreno ]
|
||||
if: '$CI_PIPELINE_SOURCE != "schedule"'
|
||||
when: on_success
|
||||
- changes: [ .ci-farms-disabled/* ]
|
||||
if: '$CI_PIPELINE_SOURCE != "schedule"'
|
||||
when: never
|
||||
|
||||
.google-freedreno-farm-manual-rules:
|
||||
rules:
|
||||
- exists: [ .ci-farms-disabled/google-freedreno ]
|
||||
when: never
|
||||
- changes: [ .ci-farms-disabled/google-freedreno ]
|
||||
if: '$CI_PIPELINE_SOURCE != "schedule"'
|
||||
when: never
|
||||
- !reference [.google-freedreno-farm-rules, rules]
|
||||
|
||||
.vmware-farm-rules:
|
||||
rules:
|
||||
- exists: [ .ci-farms-disabled/vmware ]
|
||||
@@ -293,15 +315,6 @@
|
||||
- !reference [.pengutronix-farm-rules, rules]
|
||||
|
||||
|
||||
# Temporary placeholder as the devices move across to LAVA.
|
||||
.google-freedreno-farm-rules:
|
||||
rules:
|
||||
- when: never
|
||||
|
||||
.google-freedreno-farm-manual-rules:
|
||||
rules:
|
||||
- when: never
|
||||
|
||||
# Skip container & build jobs when disabling any farm, and run them if any
|
||||
# farm gets re-enabled.
|
||||
# Only apply these rules in MR context, because otherwise we get a false
|
||||
@@ -346,6 +359,10 @@
|
||||
changes: [ .ci-farms-disabled/austriancoder ]
|
||||
exists: [ .ci-farms-disabled/austriancoder ]
|
||||
when: never
|
||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
changes: [ .ci-farms-disabled/google-freedreno ]
|
||||
exists: [ .ci-farms-disabled/google-freedreno ]
|
||||
when: never
|
||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
changes: [ .ci-farms-disabled/ondracka ]
|
||||
exists: [ .ci-farms-disabled/ondracka ]
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user