mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
ci/deqp-runner: build from git checkout even on linux
This allows things like patching deqp-runner, and unifies linux and android. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30866>
This commit is contained in:
parent
03e50318ff
commit
83d9cfa58d
1 changed files with 14 additions and 25 deletions
|
|
@ -14,25 +14,19 @@ DEQP_RUNNER_VERSION=0.20.0
|
||||||
|
|
||||||
DEQP_RUNNER_GIT_URL="${DEQP_RUNNER_GIT_URL:-https://gitlab.freedesktop.org/mesa/deqp-runner.git}"
|
DEQP_RUNNER_GIT_URL="${DEQP_RUNNER_GIT_URL:-https://gitlab.freedesktop.org/mesa/deqp-runner.git}"
|
||||||
|
|
||||||
if [ -n "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
|
if [ -n "$DEQP_RUNNER_GIT_TAG" ]; then
|
||||||
# Build and install from source
|
DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_TAG"
|
||||||
DEQP_RUNNER_CARGO_ARGS="--git $DEQP_RUNNER_GIT_URL"
|
elif [ -n "$DEQP_RUNNER_GIT_REV" ]; then
|
||||||
|
DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_REV"
|
||||||
if [ -n "${DEQP_RUNNER_GIT_TAG}" ]; then
|
|
||||||
DEQP_RUNNER_CARGO_ARGS="--tag ${DEQP_RUNNER_GIT_TAG} ${DEQP_RUNNER_CARGO_ARGS}"
|
|
||||||
DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_TAG"
|
|
||||||
else
|
|
||||||
DEQP_RUNNER_CARGO_ARGS="--rev ${DEQP_RUNNER_GIT_REV} ${DEQP_RUNNER_CARGO_ARGS}"
|
|
||||||
DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_REV"
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEQP_RUNNER_CARGO_ARGS="${DEQP_RUNNER_CARGO_ARGS} ${EXTRA_CARGO_ARGS}"
|
|
||||||
else
|
else
|
||||||
# Install from package registry
|
|
||||||
DEQP_RUNNER_CARGO_ARGS="--version ${DEQP_RUNNER_VERSION} ${EXTRA_CARGO_ARGS} -- deqp-runner"
|
|
||||||
DEQP_RUNNER_GIT_CHECKOUT="v$DEQP_RUNNER_VERSION"
|
DEQP_RUNNER_GIT_CHECKOUT="v$DEQP_RUNNER_VERSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir -p /deqp-runner
|
||||||
|
pushd /deqp-runner
|
||||||
|
git clone --branch "$DEQP_RUNNER_GIT_CHECKOUT" --depth 1 "$DEQP_RUNNER_GIT_URL" deqp-runner-git
|
||||||
|
pushd deqp-runner-git
|
||||||
|
|
||||||
if [[ "$RUST_TARGET" != *-android ]]; then
|
if [[ "$RUST_TARGET" != *-android ]]; then
|
||||||
# When CC (/usr/lib/ccache/gcc) variable is set, the rust compiler uses
|
# When CC (/usr/lib/ccache/gcc) variable is set, the rust compiler uses
|
||||||
# this variable when cross-compiling arm32 and build fails for zsys-sys.
|
# this variable when cross-compiling arm32 and build fails for zsys-sys.
|
||||||
|
|
@ -44,14 +38,9 @@ if [[ "$RUST_TARGET" != *-android ]]; then
|
||||||
cargo install --locked \
|
cargo install --locked \
|
||||||
-j ${FDO_CI_CONCURRENT:-4} \
|
-j ${FDO_CI_CONCURRENT:-4} \
|
||||||
--root /usr/local \
|
--root /usr/local \
|
||||||
${DEQP_RUNNER_CARGO_ARGS}
|
--path .
|
||||||
CC=$SAVEDCC
|
CC=$SAVEDCC
|
||||||
else
|
else
|
||||||
mkdir -p /deqp-runner
|
|
||||||
pushd /deqp-runner
|
|
||||||
git clone --branch "$DEQP_RUNNER_GIT_CHECKOUT" --depth 1 "$DEQP_RUNNER_GIT_URL" deqp-runner-git
|
|
||||||
pushd deqp-runner-git
|
|
||||||
|
|
||||||
cargo install --locked \
|
cargo install --locked \
|
||||||
-j ${FDO_CI_CONCURRENT:-4} \
|
-j ${FDO_CI_CONCURRENT:-4} \
|
||||||
--root /usr/local --version 2.10.0 \
|
--root /usr/local --version 2.10.0 \
|
||||||
|
|
@ -65,12 +54,12 @@ else
|
||||||
cargo uninstall --locked \
|
cargo uninstall --locked \
|
||||||
--root /usr/local \
|
--root /usr/local \
|
||||||
cargo-ndk
|
cargo-ndk
|
||||||
|
|
||||||
popd
|
|
||||||
rm -rf deqp-runner-git
|
|
||||||
popd
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
|
rm -rf deqp-runner-git
|
||||||
|
popd
|
||||||
|
|
||||||
# remove unused test runners to shrink images for the Mesa CI build (not kernel,
|
# remove unused test runners to shrink images for the Mesa CI build (not kernel,
|
||||||
# which chooses its own deqp branch)
|
# which chooses its own deqp branch)
|
||||||
if [ -z "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
|
if [ -z "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue