Compare commits
121 Commits
22.2
...
mesa-20.3.
Author | SHA1 | Date | |
---|---|---|---|
|
08169ff176 | ||
|
b9d2f63f2f | ||
|
404c440015 | ||
|
01f9a5e822 | ||
|
faeaa8171e | ||
|
8258c5867a | ||
|
d0d3a589a1 | ||
|
0ee24d08fa | ||
|
531b15c22a | ||
|
cddf1bf5f9 | ||
|
12c40b0477 | ||
|
1578dde278 | ||
|
2b9da404c1 | ||
|
b7659c5ed7 | ||
|
4e39cdaa50 | ||
|
bcbc20bf6e | ||
|
7a4f33b1f5 | ||
|
f4a059eb98 | ||
|
b52bb0dc5c | ||
|
770f46c781 | ||
|
ded8b21e2a | ||
|
db68b97f25 | ||
|
5355ff3744 | ||
|
25f01a7d4b | ||
|
3e2a3b402b | ||
|
1891d30031 | ||
|
bf76f2b21c | ||
|
099804865a | ||
|
6e72700f84 | ||
|
0eabed30a4 | ||
|
bfb711b209 | ||
|
9c6e0fb476 | ||
|
7770f9a27d | ||
|
39bfa34231 | ||
|
45f5e8d455 | ||
|
e1e31f6126 | ||
|
b2c70c3b11 | ||
|
deccfbc0d7 | ||
|
0464d64d6c | ||
|
e9cdf398fa | ||
|
10a9d8a10f | ||
|
092a65b0d1 | ||
|
7e90c4d148 | ||
|
ad4d87a537 | ||
|
904811faac | ||
|
6e3894d52d | ||
|
c7fdc10cba | ||
|
0a39350572 | ||
|
f998d5bddb | ||
|
162a0678ac | ||
|
8464a6e3d7 | ||
|
60bf76735c | ||
|
6adf918d34 | ||
|
29f1078c18 | ||
|
33d7087682 | ||
|
48bcf3bcc3 | ||
|
921bd0eabe | ||
|
f56cbdf995 | ||
|
43697f6c5f | ||
|
2d1e15236b | ||
|
d8e73329de | ||
|
84e77da244 | ||
|
e169782710 | ||
|
650e2a15ad | ||
|
2ce2c22d1a | ||
|
5bf5eb452f | ||
|
32b5779ade | ||
|
f396e154f1 | ||
|
d247a0720a | ||
|
cd3cd16783 | ||
|
fe27a78d31 | ||
|
825a8846cc | ||
|
40e3de32e1 | ||
|
0201fc95e7 | ||
|
827c0cc14f | ||
|
654376faad | ||
|
c9d10b391c | ||
|
1534e28669 | ||
|
f076b4d3ab | ||
|
f6a73228a4 | ||
|
5953d04aec | ||
|
94f202c6bc | ||
|
d7366262d2 | ||
|
ce29a107f4 | ||
|
9d399939e0 | ||
|
dc0580d344 | ||
|
ded5cd528a | ||
|
15367d2969 | ||
|
ee3ed20f3d | ||
|
e5327be5ac | ||
|
b8ddfc0bb7 | ||
|
159ded9481 | ||
|
4de41dea58 | ||
|
b37d613da5 | ||
|
d47cb4124a | ||
|
5b83eb0b09 | ||
|
14167715cc | ||
|
004b8b105f | ||
|
46ab4f9171 | ||
|
afe279ad86 | ||
|
cdb5bcc059 | ||
|
0724abde7a | ||
|
0e3bb4aa91 | ||
|
7762b3cda4 | ||
|
fe8c524c82 | ||
|
51d4d91f7d | ||
|
a442fc2955 | ||
|
bc3e92a1df | ||
|
0e4e0a0d09 | ||
|
3ee324d4ec | ||
|
4de4f55228 | ||
|
f4d976d591 | ||
|
966b55c6da | ||
|
60ffcfe6a9 | ||
|
46c08b73de | ||
|
23f4120491 | ||
|
f3ff1265ba | ||
|
5c167e8d92 | ||
|
2940fb13eb | ||
|
5634699a2c | ||
|
f44896c12a |
66
.appveyor/appveyor_msvc.bat
Normal file
66
.appveyor/appveyor_msvc.bat
Normal file
@@ -0,0 +1,66 @@
|
||||
goto %1
|
||||
|
||||
:install
|
||||
rem Check pip
|
||||
python --version
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip --version
|
||||
if "%buildsystem%" == "scons" (
|
||||
rem Install Mako
|
||||
python -m pip install Mako==1.1.3
|
||||
rem Install pywin32 extensions, needed by SCons
|
||||
python -m pip install pypiwin32
|
||||
rem Install python wheels, necessary to install SCons via pip
|
||||
python -m pip install wheel
|
||||
rem Install SCons
|
||||
python -m pip install scons==3.1.2
|
||||
call scons --version
|
||||
) else (
|
||||
python -m pip install Mako meson
|
||||
meson --version
|
||||
|
||||
rem Install pkg-config, which meson requires even on windows
|
||||
cinst -y pkgconfiglite
|
||||
)
|
||||
|
||||
rem Install flex/bison
|
||||
set WINFLEXBISON_ARCHIVE=win_flex_bison-%WINFLEXBISON_VERSION%.zip
|
||||
if not exist "%WINFLEXBISON_ARCHIVE%" appveyor DownloadFile "https://github.com/lexxmark/winflexbison/releases/download/v%WINFLEXBISON_VERSION%/%WINFLEXBISON_ARCHIVE%"
|
||||
7z x -y -owinflexbison\ "%WINFLEXBISON_ARCHIVE%" > nul
|
||||
set Path=%CD%\winflexbison;%Path%
|
||||
win_flex --version
|
||||
win_bison --version
|
||||
rem Download and extract LLVM
|
||||
if not exist "%LLVM_ARCHIVE%" appveyor DownloadFile "https://people.freedesktop.org/~jrfonseca/llvm/%LLVM_ARCHIVE%"
|
||||
7z x -y "%LLVM_ARCHIVE%" > nul
|
||||
if "%buildsystem%" == "scons" (
|
||||
mkdir llvm\bin
|
||||
set LLVM=%CD%\llvm
|
||||
) else (
|
||||
move llvm subprojects\
|
||||
copy .appveyor\llvm-wrap.meson subprojects\llvm\meson.build
|
||||
)
|
||||
goto :eof
|
||||
|
||||
:build_script
|
||||
if "%buildsystem%" == "scons" (
|
||||
call scons -j%NUMBER_OF_PROCESSORS% MSVC_VERSION=14.2 machine=x86 llvm=1
|
||||
) else (
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=x86
|
||||
rem We use default-library as static to affect any wraps (such as expat and zlib)
|
||||
rem it would be better if we could set subprojects buildtype independently,
|
||||
rem but I haven't written that patch yet :)
|
||||
call meson builddir --backend=vs2017 --default-library=static -Dbuild-tests=true -Db_vscrt=mtd --buildtype=release -Dllvm=true -Dgallium-drivers=swrast -Dosmesa=gallium
|
||||
pushd builddir
|
||||
call msbuild mesa.sln /m
|
||||
popd
|
||||
)
|
||||
goto :eof
|
||||
|
||||
:test_script
|
||||
if "%buildsystem%" == "scons" (
|
||||
call scons -j%NUMBER_OF_PROCESSORS% MSVC_VERSION=14.2 machine=x86 llvm=1 check
|
||||
) else (
|
||||
call meson test -C builddir
|
||||
)
|
||||
goto :eof
|
36
.appveyor/llvm-wrap.meson
Normal file
36
.appveyor/llvm-wrap.meson
Normal file
@@ -0,0 +1,36 @@
|
||||
# A meson.build file for binary wrapping the LLVM used in the appvyeor CI
|
||||
project('llvm', ['cpp'])
|
||||
|
||||
cpp = meson.get_compiler('cpp')
|
||||
|
||||
_deps = []
|
||||
_search = join_paths(meson.current_source_dir(), 'lib')
|
||||
foreach d : ['LLVMAnalysis', 'LLVMAsmParser', 'LLVMAsmPrinter',
|
||||
'LLVMBinaryFormat', 'LLVMBitReader', 'LLVMBitWriter',
|
||||
'LLVMCodeGen', 'LLVMCore', 'LLVMCoroutines', 'LLVMCoverage',
|
||||
'LLVMDebugInfoCodeView', 'LLVMDebugInfoDWARF',
|
||||
'LLVMDebugInfoMSF', 'LLVMDebugInfoPDB', 'LLVMDemangle',
|
||||
'LLVMDlltoolDriver', 'LLVMExecutionEngine', 'LLVMGlobalISel',
|
||||
'LLVMInstCombine', 'LLVMInstrumentation', 'LLVMInterpreter',
|
||||
'LLVMipo', 'LLVMIRReader', 'LLVMLibDriver', 'LLVMLineEditor',
|
||||
'LLVMLinker', 'LLVMLTO', 'LLVMMCDisassembler', 'LLVMMCJIT',
|
||||
'LLVMMC', 'LLVMMCParser', 'LLVMMIRParser', 'LLVMObjCARCOpts',
|
||||
'LLVMObject', 'LLVMObjectYAML', 'LLVMOption', 'LLVMOrcJIT',
|
||||
'LLVMPasses', 'LLVMProfileData', 'LLVMRuntimeDyld',
|
||||
'LLVMScalarOpts', 'LLVMSelectionDAG', 'LLVMSupport',
|
||||
'LLVMSymbolize', 'LLVMTableGen', 'LLVMTarget',
|
||||
'LLVMTransformUtils', 'LLVMVectorize', 'LLVMX86AsmParser',
|
||||
'LLVMX86AsmPrinter', 'LLVMX86CodeGen', 'LLVMX86Desc',
|
||||
'LLVMX86Disassembler', 'LLVMX86Info', 'LLVMX86Utils',
|
||||
'LLVMXRay']
|
||||
_deps += cpp.find_library(d, dirs : _search)
|
||||
endforeach
|
||||
|
||||
dep_llvm = declare_dependency(
|
||||
include_directories : include_directories('include'),
|
||||
dependencies : _deps,
|
||||
version : '5.0.1',
|
||||
)
|
||||
|
||||
has_rtti = false
|
||||
irbuilder_h = files('include/llvm/IR/IRBuilder.h')
|
@@ -16,17 +16,25 @@ max_line_length = 78
|
||||
[{Makefile*,*.mk}]
|
||||
indent_style = tab
|
||||
|
||||
[*.py]
|
||||
[{*.py,SCons*}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.pl]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.m4]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.rst]
|
||||
[*.html]
|
||||
indent_style = space
|
||||
indent_size = 3
|
||||
indent_size = 2
|
||||
|
||||
[*.patch]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -34,8 +42,3 @@ trim_trailing_whitespace = false
|
||||
[{meson.build,meson_options.txt}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
|
||||
[*.ps1]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
6
.gitattributes
vendored
6
.gitattributes
vendored
@@ -1,6 +0,0 @@
|
||||
*.csv eol=crlf
|
||||
* text=auto
|
||||
*.jpg binary
|
||||
*.png binary
|
||||
*.gif binary
|
||||
*.ico binary
|
59
.github/workflows/macos.yml
vendored
59
.github/workflows/macos.yml
vendored
@@ -1,59 +0,0 @@
|
||||
name: macOS-CI
|
||||
on: push
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
macOS-CI:
|
||||
strategy:
|
||||
matrix:
|
||||
glx_option: ['dri', 'xlib']
|
||||
runs-on: macos-11
|
||||
env:
|
||||
GALLIUM_DUMP_CPU: true
|
||||
MESON_EXEC: /Users/runner/Library/Python/3.11/bin/meson
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
cat > Brewfile <<EOL
|
||||
brew "bison"
|
||||
brew "expat"
|
||||
brew "gettext"
|
||||
brew "libx11"
|
||||
brew "libxcb"
|
||||
brew "libxdamage"
|
||||
brew "libxext"
|
||||
brew "ninja"
|
||||
brew "pkg-config"
|
||||
brew "python@3.10"
|
||||
EOL
|
||||
|
||||
brew update
|
||||
brew bundle --verbose
|
||||
- name: Install Mako and meson
|
||||
run: pip3 install --user mako meson
|
||||
- name: Configure
|
||||
run: |
|
||||
cat > native_config <<EOL
|
||||
[binaries]
|
||||
llvm-config = '/usr/local/opt/llvm/bin/llvm-config'
|
||||
EOL
|
||||
$MESON_EXEC . build --native-file=native_config -Dbuild-tests=true -Dosmesa=true -Dgallium-drivers=swrast -Dglx=${{ matrix.glx_option }}
|
||||
- name: Build
|
||||
run: $MESON_EXEC compile -C build
|
||||
- name: Test
|
||||
run: $MESON_EXEC test -C build --print-errorlogs
|
||||
- name: Install
|
||||
run: $MESON_EXEC install -C build --destdir $PWD/install
|
||||
- name: 'Upload Artifact'
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macos-${{ matrix.glx_option }}-result
|
||||
path: |
|
||||
build/meson-logs/
|
||||
install/
|
||||
retention-days: 5
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.out
|
||||
/build
|
||||
build
|
||||
|
1587
.gitlab-ci.yml
1587
.gitlab-ci.yml
File diff suppressed because it is too large
Load Diff
@@ -1,17 +0,0 @@
|
||||
# Note: skips lists for CI are just a list of lines that, when
|
||||
# non-zero-length and not starting with '#', will regex match to
|
||||
# delete lines from the test list. Be careful.
|
||||
|
||||
# These are tremendously slow (pushing toward a minute), and aren't
|
||||
# reliable to be run in parallel with other tests due to CPU-side timing.
|
||||
dEQP-GLES[0-9]*.functional.flush_finish.*
|
||||
|
||||
# piglit: WGL is Windows-only
|
||||
wgl@.*
|
||||
|
||||
# These are sensitive to CPU timing, and would need to be run in isolation
|
||||
# on the system rather than in parallel with other tests.
|
||||
glx@glx_arb_sync_control@timing.*
|
||||
|
||||
# This test is not built with waffle, while we do build tests with waffle
|
||||
spec@!opengl 1.1@windowoverlap
|
@@ -1,8 +1,6 @@
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_LOCALVERSION="ccu"
|
||||
|
||||
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
|
||||
CONFIG_BLK_DEV_INITRD=n
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
@@ -11,7 +9,6 @@ CONFIG_DEVFREQ_GOV_PASSIVE=y
|
||||
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
|
||||
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_ETNAVIV=y
|
||||
CONFIG_DRM_ROCKCHIP=y
|
||||
CONFIG_DRM_PANFROST=y
|
||||
CONFIG_DRM_LIMA=y
|
@@ -1,8 +1,6 @@
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_LOCALVERSION="ccu"
|
||||
|
||||
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
|
||||
CONFIG_BLK_DEV_INITRD=n
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
@@ -14,9 +12,9 @@ CONFIG_DRM_ROCKCHIP=y
|
||||
CONFIG_DRM_PANFROST=y
|
||||
CONFIG_DRM_LIMA=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_DRM_PANEL_EDP=y
|
||||
CONFIG_DRM_MSM=y
|
||||
CONFIG_DRM_I2C_ADV7511=y
|
||||
CONFIG_DRM_I2C_ADV7533=y
|
||||
CONFIG_PWM_CROS_EC=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
|
||||
@@ -32,11 +30,6 @@ CONFIG_TYPEC=y
|
||||
CONFIG_TYPEC_TCPM=y
|
||||
|
||||
# MSM platform bits
|
||||
|
||||
# For CONFIG_QCOM_LMH
|
||||
CONFIG_OF=y
|
||||
|
||||
CONFIG_QCOM_COMMAND_DB=y
|
||||
CONFIG_QCOM_RPMHPD=y
|
||||
CONFIG_QCOM_RPMPD=y
|
||||
CONFIG_SDM_GPUCC_845=y
|
||||
@@ -50,11 +43,8 @@ CONFIG_I2C_QCOM_GENI=y
|
||||
CONFIG_SPI_QCOM_GENI=y
|
||||
CONFIG_PHY_QCOM_QUSB2=y
|
||||
CONFIG_PHY_QCOM_QMP=y
|
||||
CONFIG_QCOM_CLK_APCC_MSM8996=y
|
||||
CONFIG_QCOM_LLCC=y
|
||||
CONFIG_QCOM_LMH=y
|
||||
CONFIG_QCOM_SPMI_TEMP_ALARM=y
|
||||
CONFIG_QCOM_WDT=y
|
||||
CONFIG_POWER_RESET_QCOM_PON=y
|
||||
CONFIG_RTC_DRV_PM8XXX=y
|
||||
CONFIG_INTERCONNECT=y
|
||||
@@ -63,9 +53,8 @@ CONFIG_INTERCONNECT_QCOM_SDM845=y
|
||||
CONFIG_INTERCONNECT_QCOM_MSM8916=y
|
||||
CONFIG_INTERCONNECT_QCOM_OSM_L3=y
|
||||
CONFIG_INTERCONNECT_QCOM_SC7180=y
|
||||
CONFIG_QCOM_WDT=y
|
||||
CONFIG_CRYPTO_DEV_QCOM_RNG=y
|
||||
CONFIG_SC_DISPCC_7180=y
|
||||
CONFIG_SC_GPUCC_7180=y
|
||||
|
||||
# db410c ethernet
|
||||
CONFIG_USB_RTL8152=y
|
||||
@@ -82,6 +71,7 @@ CONFIG_ARCH_K3=n
|
||||
CONFIG_ARCH_LAYERSCAPE=n
|
||||
CONFIG_ARCH_LG1K=n
|
||||
CONFIG_ARCH_HISI=n
|
||||
CONFIG_ARCH_MEDIATEK=n
|
||||
CONFIG_ARCH_MVEBU=n
|
||||
CONFIG_ARCH_SEATTLE=n
|
||||
CONFIG_ARCH_SYNQUACER=n
|
||||
@@ -144,29 +134,3 @@ CONFIG_USB_NET_SMSC95XX=y
|
||||
# For amlogic
|
||||
CONFIG_MESON_GXL_PHY=y
|
||||
CONFIG_MDIO_BUS_MUX_MESON_G12A=y
|
||||
CONFIG_DRM_MESON=y
|
||||
|
||||
# For Mediatek
|
||||
CONFIG_DRM_MEDIATEK=y
|
||||
CONFIG_PWM_MEDIATEK=y
|
||||
CONFIG_DRM_MEDIATEK_HDMI=y
|
||||
CONFIG_GNSS=y
|
||||
CONFIG_GNSS_MTK_SERIAL=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_MTK=y
|
||||
CONFIG_MTK_DEVAPC=y
|
||||
CONFIG_PWM_MTK_DISP=y
|
||||
CONFIG_MTK_CMDQ=y
|
||||
|
||||
# For nouveau. Note that DRM must be a module so that it's loaded after NFS is up to provide the firmware.
|
||||
CONFIG_ARCH_TEGRA=y
|
||||
CONFIG_DRM_NOUVEAU=m
|
||||
CONFIG_DRM_TEGRA=m
|
||||
CONFIG_R8169=y
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_DRM_TEGRA_STAGING=y
|
||||
CONFIG_TEGRA_HOST1X=y
|
||||
CONFIG_ARM_TEGRA_DEVFREQ=y
|
||||
CONFIG_TEGRA_SOCTHERM=y
|
||||
CONFIG_DRM_TEGRA_DEBUG=y
|
||||
CONFIG_PWM_TEGRA=y
|
@@ -1,67 +0,0 @@
|
||||
version: 1
|
||||
|
||||
# Rules to match for a machine to qualify
|
||||
target:
|
||||
{% if tags %}
|
||||
{% set b2ctags = tags.split(',') %}
|
||||
tags:
|
||||
{% for tag in b2ctags %}
|
||||
- '{{ tag | trim }}'
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
timeouts:
|
||||
first_console_activity: # This limits the time it can take to receive the first console log
|
||||
minutes: {{ timeout_first_minutes }}
|
||||
retries: {{ timeout_first_retries }}
|
||||
console_activity: # Reset every time we receive a message from the logs
|
||||
minutes: {{ timeout_minutes }}
|
||||
retries: {{ timeout_retries }}
|
||||
boot_cycle:
|
||||
minutes: {{ timeout_boot_minutes }}
|
||||
retries: {{ timeout_boot_retries }}
|
||||
overall: # Maximum time the job can take, not overrideable by the "continue" deployment
|
||||
minutes: {{ timeout_overall_minutes }}
|
||||
retries: 0
|
||||
# no retries possible here
|
||||
|
||||
console_patterns:
|
||||
session_end:
|
||||
regex: >-
|
||||
{{ session_end_regex }}
|
||||
session_reboot:
|
||||
regex: >-
|
||||
{{ session_reboot_regex }}
|
||||
job_success:
|
||||
regex: >-
|
||||
{{ job_success_regex }}
|
||||
job_warn:
|
||||
regex: >-
|
||||
{{ job_warn_regex }}
|
||||
|
||||
# Environment to deploy
|
||||
deployment:
|
||||
# Initial boot
|
||||
start:
|
||||
kernel:
|
||||
url: '{{ kernel_url }}'
|
||||
cmdline: >
|
||||
SALAD.machine_id={{ '{{' }} machine_id }}
|
||||
console={{ '{{' }} local_tty_device }},115200 earlyprintk=vga,keep
|
||||
loglevel={{ log_level }} no_hash_pointers
|
||||
b2c.service="--privileged --tls-verify=false --pid=host docker://{{ '{{' }} fdo_proxy_registry }}/mupuf/valve-infra/telegraf-container:latest" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
|
||||
b2c.container="-ti --tls-verify=false docker://{{ '{{' }} fdo_proxy_registry }}/mupuf/valve-infra/machine_registration:latest check"
|
||||
b2c.ntp_peer=10.42.0.1 b2c.pipefail b2c.cache_device=auto b2c.poweroff_delay={{ poweroff_delay }}
|
||||
b2c.minio="gateway,{{ '{{' }} minio_url }},{{ '{{' }} job_bucket_access_key }},{{ '{{' }} job_bucket_secret_key }}"
|
||||
b2c.volume="{{ '{{' }} job_bucket }}-results,mirror=gateway/{{ '{{' }} job_bucket }},pull_on=pipeline_start,push_on=changes,overwrite{% for excl in job_volume_exclusions %},exclude={{ excl }}{% endfor %},expiration=pipeline_end,preserve"
|
||||
{% for volume in volumes %}
|
||||
b2c.volume={{ volume }}
|
||||
{% endfor %}
|
||||
b2c.container="-v {{ '{{' }} job_bucket }}-results:{{ working_dir }} -w {{ working_dir }} {% for mount_volume in mount_volumes %} -v {{ mount_volume }}{% endfor %} --tls-verify=false docker://{{ local_container }} {{ container_cmd }}"
|
||||
{% if cmdline_extras is defined %}
|
||||
{{ cmdline_extras }}
|
||||
{% endif %}
|
||||
|
||||
initramfs:
|
||||
url: '{{ initramfs_url }}'
|
||||
|
@@ -1,101 +0,0 @@
|
||||
#!/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 argparse import ArgumentParser
|
||||
from os import environ, path
|
||||
|
||||
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument('--ci-job-id')
|
||||
parser.add_argument('--container-cmd')
|
||||
parser.add_argument('--initramfs-url')
|
||||
parser.add_argument('--job-success-regex')
|
||||
parser.add_argument('--job-warn-regex')
|
||||
parser.add_argument('--kernel-url')
|
||||
parser.add_argument('--log-level', type=int)
|
||||
parser.add_argument('--poweroff-delay', type=int)
|
||||
parser.add_argument('--session-end-regex')
|
||||
parser.add_argument('--session-reboot-regex')
|
||||
parser.add_argument('--tags', nargs='?', default='')
|
||||
parser.add_argument('--template', default='b2c.yml.jinja2.jinja2')
|
||||
parser.add_argument('--timeout-boot-minutes', type=int)
|
||||
parser.add_argument('--timeout-boot-retries', type=int)
|
||||
parser.add_argument('--timeout-first-minutes', type=int)
|
||||
parser.add_argument('--timeout-first-retries', type=int)
|
||||
parser.add_argument('--timeout-minutes', type=int)
|
||||
parser.add_argument('--timeout-overall-minutes', type=int)
|
||||
parser.add_argument('--timeout-retries', type=int)
|
||||
parser.add_argument('--job-volume-exclusions', nargs='?', default='')
|
||||
parser.add_argument('--volume', action='append')
|
||||
parser.add_argument('--mount-volume', action='append')
|
||||
parser.add_argument('--local-container', default=environ.get('B2C_LOCAL_CONTAINER', 'alpine:latest'))
|
||||
parser.add_argument('--working-dir')
|
||||
args = parser.parse_args()
|
||||
|
||||
env = Environment(loader=FileSystemLoader(path.dirname(args.template)),
|
||||
trim_blocks=True, lstrip_blocks=True)
|
||||
|
||||
template = env.get_template(path.basename(args.template))
|
||||
|
||||
values = {}
|
||||
values['ci_job_id'] = args.ci_job_id
|
||||
values['container_cmd'] = args.container_cmd
|
||||
values['initramfs_url'] = args.initramfs_url
|
||||
values['job_success_regex'] = args.job_success_regex
|
||||
values['job_warn_regex'] = args.job_warn_regex
|
||||
values['kernel_url'] = args.kernel_url
|
||||
values['log_level'] = args.log_level
|
||||
values['poweroff_delay'] = args.poweroff_delay
|
||||
values['session_end_regex'] = args.session_end_regex
|
||||
values['session_reboot_regex'] = args.session_reboot_regex
|
||||
values['tags'] = args.tags
|
||||
values['template'] = args.template
|
||||
values['timeout_boot_minutes'] = args.timeout_boot_minutes
|
||||
values['timeout_boot_retries'] = args.timeout_boot_retries
|
||||
values['timeout_first_minutes'] = args.timeout_first_minutes
|
||||
values['timeout_first_retries'] = args.timeout_first_retries
|
||||
values['timeout_minutes'] = args.timeout_minutes
|
||||
values['timeout_overall_minutes'] = args.timeout_overall_minutes
|
||||
values['timeout_retries'] = args.timeout_retries
|
||||
if len(args.job_volume_exclusions) > 0:
|
||||
exclusions = args.job_volume_exclusions.split(",")
|
||||
values['job_volume_exclusions'] = [excl for excl in exclusions if len(excl) > 0]
|
||||
if args.volume is not None:
|
||||
values['volumes'] = args.volume
|
||||
if args.mount_volume is not None:
|
||||
values['mount_volumes'] = args.mount_volume
|
||||
values['working_dir'] = args.working_dir
|
||||
|
||||
assert(len(args.local_container) > 0)
|
||||
values['local_container'] = args.local_container.replace(
|
||||
# Use the gateway's pull-through registry cache to reduce load on fd.o.
|
||||
'registry.freedesktop.org', '{{ fdo_proxy_registry }}'
|
||||
)
|
||||
|
||||
if 'B2C_KERNEL_CMDLINE_EXTRAS' in environ:
|
||||
values['cmdline_extras'] = environ['B2C_KERNEL_CMDLINE_EXTRAS']
|
||||
|
||||
f = open(path.splitext(path.basename(args.template))[0], "w")
|
||||
f.write(template.render(values))
|
||||
f.close()
|
@@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This test script groups together a bunch of fast dEQP variant runs
|
||||
# to amortize the cost of rebooting the board.
|
||||
|
||||
set -ex
|
||||
|
||||
EXIT=0
|
||||
|
||||
# Run reset tests without parallelism:
|
||||
if ! env \
|
||||
DEQP_RESULTS_DIR=results/reset \
|
||||
FDO_CI_CONCURRENT=1 \
|
||||
DEQP_CASELIST_FILTER='.*reset.*' \
|
||||
/install/deqp-runner.sh; then
|
||||
EXIT=1
|
||||
fi
|
||||
|
||||
# Then run everything else with parallelism:
|
||||
if ! env \
|
||||
DEQP_RESULTS_DIR=results/nonrobustness \
|
||||
DEQP_CASELIST_INV_FILTER='.*reset.*' \
|
||||
/install/deqp-runner.sh; then
|
||||
EXIT=1
|
||||
fi
|
||||
|
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Init entrypoint for bare-metal devices; calls common init code.
|
||||
|
||||
# First stage: very basic setup to bring up network and /dev etc
|
||||
/init-stage1.sh
|
||||
|
||||
# Second stage: run jobs
|
||||
test $? -eq 0 && /init-stage2.sh
|
||||
|
||||
# Wait until the job would have timed out anyway, so we don't spew a "init
|
||||
# exited" panic.
|
||||
sleep 6000
|
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
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_ON="i 1"
|
||||
SNMP_OFF="i 4"
|
||||
|
||||
snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF
|
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
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
|
@@ -5,7 +5,6 @@
|
||||
|
||||
# We're run from the root of the repo, make a helper var for our paths
|
||||
BM=$CI_PROJECT_DIR/install/bare-metal
|
||||
CI_COMMON=$CI_PROJECT_DIR/install/common
|
||||
|
||||
# Runner config checks
|
||||
if [ -z "$BM_SERIAL" ]; then
|
||||
@@ -90,8 +89,7 @@ echo "$BM_CMDLINE" > /tftp/cmdline
|
||||
set +e
|
||||
python3 $BM/cros_servo_run.py \
|
||||
--cpu $BM_SERIAL \
|
||||
--ec $BM_SERIAL_EC \
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT:-20}
|
||||
--ec $BM_SERIAL_EC
|
||||
ret=$?
|
||||
set -e
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright © 2020 Google LLC
|
||||
@@ -31,18 +30,46 @@ import threading
|
||||
|
||||
|
||||
class CrosServoRun:
|
||||
def __init__(self, cpu, ec, test_timeout):
|
||||
def __init__(self, cpu, ec):
|
||||
# Merged FIFO for the two serial buffers, fed by threads.
|
||||
self.serial_queue = queue.Queue()
|
||||
self.sentinel = object()
|
||||
self.threads_done = 0
|
||||
|
||||
self.ec_ser = SerialBuffer(
|
||||
ec, "results/serial-ec.txt", "R SERIAL-EC> ")
|
||||
self.cpu_ser = SerialBuffer(
|
||||
cpu, "results/serial.txt", "R SERIAL-CPU> ")
|
||||
# Merge the EC serial into the cpu_ser's line stream so that we can
|
||||
# effectively poll on both at the same time and not have to worry about
|
||||
self.ec_ser = SerialBuffer(
|
||||
ec, "results/serial-ec.txt", "R SERIAL-EC> ", line_queue=self.cpu_ser.line_queue)
|
||||
self.test_timeout = test_timeout
|
||||
|
||||
def close(self):
|
||||
self.ec_ser.close()
|
||||
self.cpu_ser.close()
|
||||
self.iter_feed_ec = threading.Thread(
|
||||
target=self.iter_feed_queue, daemon=True, args=(self.ec_ser.lines(),))
|
||||
self.iter_feed_ec.start()
|
||||
|
||||
self.iter_feed_cpu = threading.Thread(
|
||||
target=self.iter_feed_queue, daemon=True, args=(self.cpu_ser.lines(),))
|
||||
self.iter_feed_cpu.start()
|
||||
|
||||
# Feed lines from our serial queues into the merged queue, marking when our
|
||||
# input is done.
|
||||
def iter_feed_queue(self, it):
|
||||
for i in it:
|
||||
self.serial_queue.put(i)
|
||||
self.serial_queue.put(sentinel)
|
||||
|
||||
# Return the next line from the queue, counting how many threads have
|
||||
# terminated and joining when done
|
||||
def get_serial_queue_line(self):
|
||||
line = self.serial_queue.get()
|
||||
if line == self.sentinel:
|
||||
self.threads_done = self.threads_done + 1
|
||||
if self.threads_done == 2:
|
||||
self.iter_feed_cpu.join()
|
||||
self.iter_feed_ec.join()
|
||||
return line
|
||||
|
||||
# Returns an iterator for getting the next line.
|
||||
def serial_queue_lines(self):
|
||||
return iter(self.get_serial_queue_line, self.sentinel)
|
||||
|
||||
def ec_write(self, s):
|
||||
print("W SERIAL-EC> %s" % s)
|
||||
@@ -52,46 +79,28 @@ class CrosServoRun:
|
||||
print("W SERIAL-CPU> %s" % s)
|
||||
self.cpu_ser.serial.write(s.encode())
|
||||
|
||||
def print_error(self, message):
|
||||
RED = '\033[0;31m'
|
||||
NO_COLOR = '\033[0m'
|
||||
print(RED + message + NO_COLOR)
|
||||
|
||||
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
|
||||
# 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"):
|
||||
for line in self.serial_queue_lines():
|
||||
if re.search("load_archive: loading locale_en.bin", line):
|
||||
self.cpu_write("\016")
|
||||
bootloader_done = True
|
||||
break
|
||||
|
||||
# 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, restarting run...")
|
||||
print("Detected intermittent poweron failure, restarting run...")
|
||||
return 2
|
||||
|
||||
if not bootloader_done:
|
||||
print("Failed to make it through bootloader, restarting run...")
|
||||
return 2
|
||||
|
||||
tftp_failures = 0
|
||||
for line in self.cpu_ser.lines(timeout=self.test_timeout, phase="test"):
|
||||
for line in self.serial_queue_lines():
|
||||
if re.search("---. end Kernel panic", line):
|
||||
return 1
|
||||
|
||||
@@ -102,56 +111,18 @@ class CrosServoRun:
|
||||
if re.search("R8152: Bulk read error 0xffffffbf", line):
|
||||
tftp_failures += 1
|
||||
if tftp_failures >= 100:
|
||||
self.print_error(
|
||||
"Detected intermittent tftp failure, restarting run...")
|
||||
print("Detected intermittent tftp failure, restarting run...")
|
||||
return 2
|
||||
|
||||
# There are very infrequent bus errors during power management transitions
|
||||
# on cheza, which we don't expect to be the case on future boards.
|
||||
if re.search("Kernel panic - not syncing: Asynchronous SError Interrupt", line):
|
||||
self.print_error(
|
||||
"Detected cheza power management bus error, restarting run...")
|
||||
return 2
|
||||
|
||||
# If the network device dies, it's probably not graphics's fault, just try again.
|
||||
if re.search("NETDEV WATCHDOG", line):
|
||||
self.print_error(
|
||||
"Detected network device failure, restarting run...")
|
||||
return 2
|
||||
|
||||
# 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, restarting run...")
|
||||
return 2
|
||||
|
||||
if re.search("coreboot.*bootblock starting", line):
|
||||
self.print_error(
|
||||
"Detected spontaneous reboot, restarting run...")
|
||||
return 2
|
||||
|
||||
if re.search("arm-smmu 5040000.iommu: TLB sync timed out -- SMMU may be deadlocked", line):
|
||||
self.print_error("Detected cheza MMU fail, restarting run...")
|
||||
return 2
|
||||
|
||||
result = re.search("hwci: mesa: (\S*)", line)
|
||||
result = re.search("bare-metal result: (\S*)", line)
|
||||
if result:
|
||||
if result.group(1) == "pass":
|
||||
return 0
|
||||
else:
|
||||
return 1
|
||||
|
||||
self.print_error(
|
||||
"Reached the end of the CPU serial log without finding a result")
|
||||
return 2
|
||||
print("Reached the end of the CPU serial log without finding a result")
|
||||
return 1
|
||||
|
||||
|
||||
def main():
|
||||
@@ -160,11 +131,9 @@ def main():
|
||||
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()
|
||||
|
||||
servo = CrosServoRun(args.cpu, args.ec, args.test_timeout * 60)
|
||||
servo = CrosServoRun(args.cpu, args.ec)
|
||||
|
||||
while True:
|
||||
retval = servo.run()
|
||||
@@ -174,8 +143,6 @@ def main():
|
||||
# power down the CPU on the device
|
||||
servo.ec_write("power off\n")
|
||||
|
||||
servo.close()
|
||||
|
||||
sys.exit(retval)
|
||||
|
||||
|
||||
|
@@ -1,10 +0,0 @@
|
||||
#!/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
|
@@ -1,28 +0,0 @@
|
||||
#!/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)
|
@@ -1,12 +0,0 @@
|
||||
#!/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
|
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
BM=$CI_PROJECT_DIR/install/bare-metal
|
||||
CI_COMMON=$CI_PROJECT_DIR/install/common
|
||||
|
||||
if [ -z "$BM_SERIAL" -a -z "$BM_SERIAL_SCRIPT" ]; then
|
||||
echo "Must set BM_SERIAL OR BM_SERIAL_SCRIPT in your gitlab-runner config.toml [[runners]] environment"
|
||||
@@ -46,50 +45,32 @@ if [ -z "$BM_ROOTFS" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if echo $BM_CMDLINE | grep -q "root=/dev/nfs"; then
|
||||
BM_FASTBOOT_NFSROOT=1
|
||||
if [ -z "$BM_WEBDAV_IP" -o -z "$BM_WEBDAV_PORT" ]; then
|
||||
echo "BM_WEBDAV_IP and/or BM_WEBDAV_PORT is not set - no results will be uploaded from DUT!"
|
||||
WEBDAV_CMDLINE=""
|
||||
else
|
||||
WEBDAV_CMDLINE="webdav=http://$BM_WEBDAV_IP:$BM_WEBDAV_PORT"
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
# Clear out any previous run's artifacts.
|
||||
rm -rf results/
|
||||
mkdir -p 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
|
||||
# Create the rootfs in a temp dir
|
||||
rsync -a --delete $BM_ROOTFS/ rootfs/
|
||||
. $BM/rootfs-setup.sh rootfs
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -n "$PIGLIT_PROFILES" ]; then
|
||||
EXCLUDE_FILTER="deqp|arb_gpu_shader5|arb_gpu_shader_fp64|arb_gpu_shader_int64|glsl-4.[0123456]0|arb_tessellation_shader"
|
||||
else
|
||||
EXCLUDE_FILTER="piglit|python"
|
||||
fi
|
||||
|
||||
pushd rootfs
|
||||
find -H | \
|
||||
egrep -v "external/(openglcts|vulkancts|amber|glslang|spirv-tools)" |
|
||||
egrep -v "traces-db|apitrace|renderdoc" | \
|
||||
egrep -v $EXCLUDE_FILTER | \
|
||||
cpio -H newc -o | \
|
||||
xz --check=crc32 -T4 - > $CI_PROJECT_DIR/rootfs.cpio.gz
|
||||
popd
|
||||
fi
|
||||
# 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.
|
||||
pushd rootfs
|
||||
find -H | \
|
||||
egrep -v "external/(openglcts|vulkancts|amber|glslang|spirv-tools)" |
|
||||
egrep -v "traces-db|apitrace|renderdoc|python" | \
|
||||
cpio -H newc -o | \
|
||||
xz --check=crc32 -T4 - > $CI_PROJECT_DIR/rootfs.cpio.gz
|
||||
popd
|
||||
|
||||
# Make the combined kernel image and dtb for passing to fastboot. For normal
|
||||
# Mesa development, we build the kernel and store it in the docker container
|
||||
@@ -111,39 +92,34 @@ else
|
||||
cat $BM_KERNEL $BM_DTB > Image.gz-dtb
|
||||
fi
|
||||
|
||||
mkdir -p artifacts
|
||||
abootimg \
|
||||
--create artifacts/fastboot.img \
|
||||
-k Image.gz-dtb \
|
||||
-r rootfs.cpio.gz \
|
||||
-c cmdline="$BM_CMDLINE"
|
||||
-c cmdline="$BM_CMDLINE $WEBDAV_CMDLINE"
|
||||
rm Image.gz-dtb
|
||||
|
||||
# Start nginx to get results from DUT
|
||||
if [ -n "$WEBDAV_CMDLINE" ]; then
|
||||
ln -s `pwd`/results /results
|
||||
sed -i s/80/$BM_WEBDAV_PORT/g /etc/nginx/sites-enabled/default
|
||||
sed -i s/www-data/root/g /etc/nginx/nginx.conf
|
||||
nginx
|
||||
fi
|
||||
|
||||
export PATH=$BM:$PATH
|
||||
|
||||
# Start background command for talking to serial if we have one.
|
||||
if [ -n "$BM_SERIAL_SCRIPT" ]; then
|
||||
$BM_SERIAL_SCRIPT > results/serial-output.txt &
|
||||
$BM_SERIAL_SCRIPT | tee results/serial-output.txt &
|
||||
|
||||
while [ ! -e results/serial-output.txt ]; do
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
set +e
|
||||
$BM/fastboot_run.py \
|
||||
--dev="$BM_SERIAL" \
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT:-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
|
||||
|
@@ -22,143 +22,81 @@
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
import argparse
|
||||
import subprocess
|
||||
import os
|
||||
import re
|
||||
from serial_buffer import SerialBuffer
|
||||
import sys
|
||||
import threading
|
||||
|
||||
|
||||
class FastbootRun:
|
||||
def __init__(self, args, test_timeout):
|
||||
def __init__(self, args):
|
||||
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
|
||||
self.ser = SerialBuffer(args.dev, "results/serial-output.txt", "R SERIAL> ")
|
||||
self.fastboot="fastboot boot -s {ser} artifacts/fastboot.img".format(ser=args.fbserial)
|
||||
|
||||
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):
|
||||
def logged_system(self, cmd):
|
||||
print("Running '{}'".format(cmd))
|
||||
try:
|
||||
return subprocess.call(cmd, shell=True, timeout=timeout)
|
||||
except subprocess.TimeoutExpired:
|
||||
self.print_error("timeout, restarting run...")
|
||||
return 2
|
||||
return os.system(cmd)
|
||||
|
||||
def run(self):
|
||||
if ret := self.logged_system(self.powerup):
|
||||
return ret
|
||||
if self.logged_system(self.powerup) != 0:
|
||||
return 1
|
||||
|
||||
fastboot_ready = False
|
||||
for line in self.ser.lines(timeout=2 * 60, phase="bootloader"):
|
||||
for line in self.ser.lines():
|
||||
if re.search("fastboot: processing commands", line) or \
|
||||
re.search("Listening for fastboot command on", line):
|
||||
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, restarting run...")
|
||||
return 2
|
||||
return 1
|
||||
|
||||
if not fastboot_ready:
|
||||
self.print_error(
|
||||
"Failed to get to fastboot prompt, restarting run...")
|
||||
return 2
|
||||
print("Failed to get to fastboot prompt")
|
||||
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 2
|
||||
if print_more_lines > 0:
|
||||
print_more_lines -= 1
|
||||
if self.logged_system(self.fastboot) != 0:
|
||||
return 1
|
||||
|
||||
for line in self.ser.lines():
|
||||
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, restarting run...")
|
||||
print("Detected spontaneous reboot, restarting run...")
|
||||
return 2
|
||||
|
||||
# db820c sometimes wedges around iommu fault recovery
|
||||
if re.search("watchdog: BUG: soft lockup - CPU.* stuck", line):
|
||||
self.print_error(
|
||||
"Detected kernel soft lockup, restarting run...")
|
||||
return 2
|
||||
|
||||
# If the network device dies, it's probably not graphics's fault, just try again.
|
||||
if re.search("NETDEV WATCHDOG", line):
|
||||
self.print_error(
|
||||
"Detected network device failure, restarting run...")
|
||||
return 2
|
||||
|
||||
# A3xx recovery doesn't quite work. Sometimes the GPU will get
|
||||
# wedged and recovery will fail (because power can't be reset?)
|
||||
# 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, restarting run...")
|
||||
if print_more_lines == -1:
|
||||
print_more_lines = 30
|
||||
|
||||
result = re.search("hwci: mesa: (\S*)", line)
|
||||
result = re.search("bare-metal result: (\S*)", line)
|
||||
if result:
|
||||
if result.group(1) == "pass":
|
||||
return 0
|
||||
else:
|
||||
return 1
|
||||
|
||||
self.print_error(
|
||||
"Reached the end of the CPU serial log without finding a result, restarting run...")
|
||||
return 2
|
||||
|
||||
print("Reached the end of the CPU serial log without finding a result")
|
||||
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)
|
||||
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)
|
||||
args = parser.parse_args()
|
||||
|
||||
fastboot = FastbootRun(args, args.test_timeout * 60)
|
||||
fastboot = FastbootRun(args)
|
||||
|
||||
while True:
|
||||
retval = fastboot.run()
|
||||
fastboot.close()
|
||||
if retval != 2:
|
||||
break
|
||||
|
||||
fastboot = FastbootRun(args, args.test_timeout * 60)
|
||||
|
||||
fastboot.logged_system(args.powerdown)
|
||||
|
||||
sys.exit(retval)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@@ -8,8 +8,8 @@ relay = sys.argv[2]
|
||||
|
||||
# our relays are "off" means "board is powered".
|
||||
mode_swap = {
|
||||
"on": "off",
|
||||
"off": "on",
|
||||
"on" : "off",
|
||||
"off" : "on",
|
||||
}
|
||||
mode = mode_swap[mode]
|
||||
|
||||
|
46
.gitlab-ci/bare-metal/init.sh
Executable file
46
.gitlab-ci/bare-metal/init.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
mount -t devtmpfs none /dev || echo possibly already mounted
|
||||
mkdir -p /dev/pts
|
||||
mount -t devpts devpts /dev/pts
|
||||
mount -t tmpfs tmpfs /tmp
|
||||
|
||||
. /set-job-env-vars.sh
|
||||
|
||||
# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
|
||||
export XDG_CACHE_HOME=/tmp
|
||||
|
||||
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||
|
||||
# Not all DUTs have network
|
||||
sntp -sS pool.ntp.org || true
|
||||
|
||||
# Start a little daemon to capture the first devcoredump we encounter. (They
|
||||
# expire after 5 minutes, so we poll for them).
|
||||
./capture-devcoredump.sh &
|
||||
|
||||
if sh $BARE_METAL_TEST_SCRIPT; then
|
||||
OK=1
|
||||
else
|
||||
OK=0
|
||||
fi
|
||||
|
||||
# upload artifacts via webdav
|
||||
WEBDAV=$(cat /proc/cmdline | tr " " "\n" | grep webdav | cut -d '=' -f 2 || true)
|
||||
if [ -n "$WEBDAV" ]; then
|
||||
find /results -type f -exec curl -T {} $WEBDAV/{} \;
|
||||
fi
|
||||
|
||||
if [ $OK -eq 1 ]; then
|
||||
echo "bare-metal result: pass"
|
||||
else
|
||||
echo "bare-metal result: fail"
|
||||
fi
|
||||
|
||||
# Wait until the job would have timed out anyway, so we don't spew a "init
|
||||
# exited" panic.
|
||||
sleep 6000
|
20
.gitlab-ci/bare-metal/nginx-default-site
Normal file
20
.gitlab-ci/bare-metal/nginx-default-site
Normal file
@@ -0,0 +1,20 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name _;
|
||||
|
||||
location / {
|
||||
dav_methods PUT;
|
||||
dav_ext_methods PROPFIND OPTIONS;
|
||||
dav_access user:rw group:rw all:r;
|
||||
|
||||
client_body_temp_path /tmp;
|
||||
client_max_body_size 0;
|
||||
create_full_put_path on;
|
||||
|
||||
root /results;
|
||||
|
||||
autoindex on;
|
||||
}
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
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
|
||||
|
||||
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.`expr 48 + $BM_POE_INTERFACE`"
|
||||
SNMP_ON="i 1"
|
||||
SNMP_OFF="i 2"
|
||||
|
||||
flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF"
|
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
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
|
||||
|
||||
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.`expr 48 + $BM_POE_INTERFACE`"
|
||||
SNMP_ON="i 1"
|
||||
SNMP_OFF="i 2"
|
||||
|
||||
flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF"
|
||||
sleep 3s
|
||||
flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_ON"
|
@@ -1,149 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Boot script for devices attached to a PoE switch, using NFS for the root
|
||||
# filesystem.
|
||||
|
||||
# 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
|
||||
|
||||
# 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 serial port to listen the device."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POE_ADDRESS" ]; then
|
||||
echo "Must set BM_POE_ADDRESS in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is the PoE switch address to connect for powering up/down devices."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POE_INTERFACE" ]; then
|
||||
echo "Must set BM_POE_INTERFACE in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is the PoE switch interface where the device is connected."
|
||||
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 power up the device and begin its boot sequence."
|
||||
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 [ ! -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_ROOTFS" ]; then
|
||||
echo "Must set BM_ROOTFS to your board's rootfs directory in the job's variables"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_BOOTFS" ]; then
|
||||
echo "Must set /boot files for the TFTP boot 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
|
||||
|
||||
if [ -z "$BM_BOOTCONFIG" ]; then
|
||||
echo "Must set BM_BOOTCONFIG to your board's required boot configuration arguments"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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/
|
||||
|
||||
# If BM_BOOTFS is an URL, download it
|
||||
if echo $BM_BOOTFS | grep -q http; then
|
||||
apt install -y wget
|
||||
wget ${FDO_HTTP_CACHE_URI:-}$BM_BOOTFS -O /tmp/bootfs.tar
|
||||
BM_BOOTFS=/tmp/bootfs.tar
|
||||
fi
|
||||
|
||||
# If BM_BOOTFS is a file, assume it is a tarball and uncompress it
|
||||
if [ -f $BM_BOOTFS ]; then
|
||||
mkdir -p /tmp/bootfs
|
||||
tar xf $BM_BOOTFS -C /tmp/bootfs
|
||||
BM_BOOTFS=/tmp/bootfs
|
||||
fi
|
||||
|
||||
# Install kernel modules (it could be either in /lib/modules or
|
||||
# /usr/lib/modules, but we want to install in the latter)
|
||||
[ -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/
|
||||
|
||||
# Install kernel image + bootloader files
|
||||
rsync -aL --delete $BM_BOOTFS/boot/ /tftp/
|
||||
|
||||
# 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
|
||||
|
||||
# Create the rootfs in the NFS directory
|
||||
mkdir -p /nfs/results
|
||||
. $BM/rootfs-setup.sh /nfs
|
||||
|
||||
echo "$BM_CMDLINE" > /tftp/cmdline.txt
|
||||
|
||||
# Add some required options in config.txt
|
||||
printf "$BM_BOOTCONFIG" >> /tftp/config.txt
|
||||
|
||||
set +e
|
||||
ATTEMPTS=10
|
||||
while [ $((ATTEMPTS--)) -gt 0 ]; do
|
||||
python3 $BM/poe_run.py \
|
||||
--dev="$BM_SERIAL" \
|
||||
--powerup="$BM_POWERUP" \
|
||||
--powerdown="$BM_POWERDOWN" \
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT:-20}
|
||||
ret=$?
|
||||
|
||||
if [ $ret -eq 2 ]; then
|
||||
echo "Did not detect boot sequence, retrying..."
|
||||
else
|
||||
ATTEMPTS=0
|
||||
fi
|
||||
done
|
||||
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/
|
||||
|
||||
exit $ret
|
@@ -1,110 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright © 2020 Igalia, S.L.
|
||||
#
|
||||
# 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 os
|
||||
import re
|
||||
from serial_buffer import SerialBuffer
|
||||
import sys
|
||||
import threading
|
||||
|
||||
|
||||
class PoERun:
|
||||
def __init__(self, args, test_timeout):
|
||||
self.powerup = args.powerup
|
||||
self.powerdown = args.powerdown
|
||||
self.ser = SerialBuffer(
|
||||
args.dev, "results/serial-output.txt", "")
|
||||
self.test_timeout = test_timeout
|
||||
|
||||
def print_error(self, message):
|
||||
RED = '\033[0;31m'
|
||||
NO_COLOR = '\033[0m'
|
||||
print(RED + message + NO_COLOR)
|
||||
|
||||
def logged_system(self, cmd):
|
||||
print("Running '{}'".format(cmd))
|
||||
return os.system(cmd)
|
||||
|
||||
def run(self):
|
||||
if self.logged_system(self.powerup) != 0:
|
||||
return 1
|
||||
|
||||
boot_detected = False
|
||||
for line in self.ser.lines(timeout=5 * 60, phase="bootloader"):
|
||||
if re.search("Booting Linux", line):
|
||||
boot_detected = True
|
||||
break
|
||||
|
||||
if not boot_detected:
|
||||
self.print_error(
|
||||
"Something wrong; couldn't detect the boot start up sequence")
|
||||
return 2
|
||||
|
||||
for line in self.ser.lines(timeout=self.test_timeout, phase="test"):
|
||||
if re.search("---. end Kernel panic", line):
|
||||
return 1
|
||||
|
||||
# Binning memory problems
|
||||
if re.search("binner overflow mem", line):
|
||||
self.print_error("Memory overflow in the binner; GPU hang")
|
||||
return 1
|
||||
|
||||
if re.search("nouveau 57000000.gpu: bus: MMIO read of 00000000 FAULT at 137000", line):
|
||||
self.print_error("nouveau jetson boot bug, retrying.")
|
||||
return 2
|
||||
|
||||
result = re.search("hwci: mesa: (\S*)", line)
|
||||
if result:
|
||||
if result.group(1) == "pass":
|
||||
return 0
|
||||
else:
|
||||
return 1
|
||||
|
||||
self.print_error(
|
||||
"Reached the end of the CPU serial log without finding a result")
|
||||
return 2
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--dev', type=str,
|
||||
help='Serial device to monitor', required=True)
|
||||
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(
|
||||
'--test-timeout', type=int, help='Test phase timeout (minutes)', required=True)
|
||||
args = parser.parse_args()
|
||||
|
||||
poe = PoERun(args, args.test_timeout * 60)
|
||||
retval = poe.run()
|
||||
|
||||
poe.logged_system(args.powerdown)
|
||||
|
||||
sys.exit(retval)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@@ -5,26 +5,64 @@ rootfs_dst=$1
|
||||
mkdir -p $rootfs_dst/results
|
||||
|
||||
# Set up the init script that brings up the system.
|
||||
cp $BM/bm-init.sh $rootfs_dst/init
|
||||
cp $CI_COMMON/init*.sh $rootfs_dst/
|
||||
cp $BM/init.sh $rootfs_dst/init
|
||||
|
||||
# Make JWT token available as file in the bare-metal storage to enable access
|
||||
# to MinIO
|
||||
cp "${CI_JOB_JWT_FILE}" "${rootfs_dst}${CI_JOB_JWT_FILE}"
|
||||
|
||||
cp $CI_COMMON/capture-devcoredump.sh $rootfs_dst/
|
||||
cp $CI_COMMON/intel-gpu-freq.sh $rootfs_dst/
|
||||
cp $BM/capture-devcoredump.sh $rootfs_dst/
|
||||
|
||||
set +x
|
||||
|
||||
# Pass through relevant env vars from the gitlab job to the baremetal init script
|
||||
"$CI_COMMON"/generate-env.sh > $rootfs_dst/set-job-env-vars.sh
|
||||
touch $rootfs_dst/set-job-env-vars.sh
|
||||
chmod +x $rootfs_dst/set-job-env-vars.sh
|
||||
for var in \
|
||||
BARE_METAL_TEST_SCRIPT \
|
||||
CI_COMMIT_BRANCH \
|
||||
CI_COMMIT_TITLE \
|
||||
CI_JOB_JWT \
|
||||
CI_JOB_ID \
|
||||
CI_JOB_URL \
|
||||
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME \
|
||||
CI_MERGE_REQUEST_TITLE \
|
||||
CI_NODE_INDEX \
|
||||
CI_NODE_TOTAL \
|
||||
CI_PIPELINE_ID \
|
||||
CI_PROJECT_PATH \
|
||||
CI_RUNNER_DESCRIPTION \
|
||||
DEQP_CASELIST_FILTER \
|
||||
DEQP_CONFIG \
|
||||
DEQP_EXPECTED_FAILS \
|
||||
DEQP_EXPECTED_RENDERER \
|
||||
DEQP_HEIGHT \
|
||||
DEQP_NO_SAVE_RESULTS \
|
||||
DEQP_FLAKES \
|
||||
DEQP_PARALLEL \
|
||||
DEQP_RESULTS_DIR \
|
||||
DEQP_SKIPS \
|
||||
DEQP_VARIANT \
|
||||
DEQP_VER \
|
||||
DEQP_WIDTH \
|
||||
DEVICE_NAME \
|
||||
DRIVER_NAME \
|
||||
FD_MESA_DEBUG \
|
||||
FLAKES_CHANNEL \
|
||||
IR3_SHADER_DEBUG \
|
||||
MESA_GL_VERSION_OVERRIDE \
|
||||
MESA_GLSL_VERSION_OVERRIDE \
|
||||
MESA_GLES_VERSION_OVERRIDE \
|
||||
NIR_VALIDATE \
|
||||
TRACIE_NO_UNIT_TESTS \
|
||||
TRACIE_UPLOAD_TO_MINIO \
|
||||
TU_DEBUG \
|
||||
VK_DRIVER \
|
||||
; do
|
||||
if [ -n "${!var+x}" ]; then
|
||||
echo "export $var=${!var@Q}" >> $rootfs_dst/set-job-env-vars.sh
|
||||
fi
|
||||
done
|
||||
echo "Variables passed through:"
|
||||
cat $rootfs_dst/set-job-env-vars.sh
|
||||
|
||||
set -x
|
||||
|
||||
# Add the Mesa drivers we built, and make a consistent symlink to them.
|
||||
mkdir -p $rootfs_dst/$CI_PROJECT_DIR
|
||||
rsync -aH --delete $CI_PROJECT_DIR/install/ $rootfs_dst/$CI_PROJECT_DIR/install/
|
||||
tar -C $rootfs_dst/$CI_PROJECT_DIR/ -xf $CI_PROJECT_DIR/artifacts/install.tar
|
||||
ln -sf $CI_PROJECT_DIR/install $rootfs_dst/install
|
||||
|
@@ -30,29 +30,20 @@ import time
|
||||
|
||||
|
||||
class SerialBuffer:
|
||||
def __init__(self, dev, filename, prefix, timeout=None, line_queue=None):
|
||||
def __init__(self, dev, filename, prefix):
|
||||
self.filename = filename
|
||||
self.dev = dev
|
||||
|
||||
if dev:
|
||||
self.f = open(filename, "wb+")
|
||||
self.serial = serial.Serial(dev, 115200, timeout=timeout)
|
||||
self.serial = serial.Serial(dev, 115200, timeout=10)
|
||||
else:
|
||||
self.f = open(filename, "rb")
|
||||
self.serial = None
|
||||
|
||||
self.byte_queue = queue.Queue()
|
||||
# allow multiple SerialBuffers to share a line queue so you can merge
|
||||
# servo's CPU and EC streams into one thing to watch the boot/test
|
||||
# progress on.
|
||||
if line_queue:
|
||||
self.line_queue = line_queue
|
||||
else:
|
||||
self.line_queue = queue.Queue()
|
||||
self.line_queue = queue.Queue()
|
||||
self.prefix = prefix
|
||||
self.timeout = timeout
|
||||
self.sentinel = object()
|
||||
self.closing = False
|
||||
|
||||
if self.dev:
|
||||
self.read_thread = threading.Thread(
|
||||
@@ -66,31 +57,19 @@ class SerialBuffer:
|
||||
target=self.serial_lines_thread_loop, daemon=True)
|
||||
self.lines_thread.start()
|
||||
|
||||
def close(self):
|
||||
self.closing = True
|
||||
if self.serial:
|
||||
self.serial.cancel_read()
|
||||
self.read_thread.join()
|
||||
self.lines_thread.join()
|
||||
if self.serial:
|
||||
self.serial.close()
|
||||
|
||||
# Thread that just reads the bytes from the serial device to try to keep from
|
||||
# buffer overflowing it. If nothing is received in 1 minute, it finalizes.
|
||||
# buffer overflowing it.
|
||||
def serial_read_thread_loop(self):
|
||||
greet = "Serial thread reading from %s\n" % self.dev
|
||||
self.byte_queue.put(greet.encode())
|
||||
|
||||
while not self.closing:
|
||||
while True:
|
||||
try:
|
||||
b = self.serial.read()
|
||||
if len(b) == 0:
|
||||
break
|
||||
self.byte_queue.put(b)
|
||||
self.byte_queue.put(self.serial.read())
|
||||
except Exception as err:
|
||||
print(self.prefix + str(err))
|
||||
self.byte_queue.put(self.sentinel)
|
||||
break
|
||||
self.byte_queue.put(self.sentinel)
|
||||
|
||||
# Thread that just reads the bytes from the file of serial output that some
|
||||
# other process is appending to.
|
||||
@@ -98,13 +77,12 @@ class SerialBuffer:
|
||||
greet = "Serial thread reading from %s\n" % self.filename
|
||||
self.byte_queue.put(greet.encode())
|
||||
|
||||
while not self.closing:
|
||||
while True:
|
||||
line = self.f.readline()
|
||||
if line:
|
||||
self.byte_queue.put(line)
|
||||
else:
|
||||
time.sleep(0.1)
|
||||
self.byte_queue.put(self.sentinel)
|
||||
|
||||
# Thread that processes the stream of bytes to 1) log to stdout, 2) log to
|
||||
# file, 3) add to the queue of lines to be read by program logic
|
||||
@@ -137,30 +115,14 @@ class SerialBuffer:
|
||||
self.line_queue.put(line)
|
||||
line = bytearray()
|
||||
|
||||
def lines(self, timeout=None, phase=None):
|
||||
start_time = time.monotonic()
|
||||
while True:
|
||||
read_timeout = None
|
||||
if timeout:
|
||||
read_timeout = timeout - (time.monotonic() - start_time)
|
||||
if read_timeout <= 0:
|
||||
print("read timeout waiting for serial during {}".format(phase))
|
||||
self.close()
|
||||
break
|
||||
def get_line(self):
|
||||
line = self.line_queue.get()
|
||||
if line == self.sentinel:
|
||||
self.lines_thread.join()
|
||||
return line
|
||||
|
||||
try:
|
||||
line = self.line_queue.get(timeout=read_timeout)
|
||||
except queue.Empty:
|
||||
print("read timeout waiting for serial during {}".format(phase))
|
||||
self.close()
|
||||
break
|
||||
|
||||
if line == self.sentinel:
|
||||
print("End of serial output")
|
||||
self.lines_thread.join()
|
||||
break
|
||||
|
||||
yield line
|
||||
def lines(self):
|
||||
return iter(self.get_line, self.sentinel)
|
||||
|
||||
|
||||
def main():
|
||||
|
@@ -1,41 +0,0 @@
|
||||
#!/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,303 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright © 2020 - 2022 Collabora Ltd.
|
||||
# Authors:
|
||||
# Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
||||
# David Heidelberg <david.heidelberg@collabora.com>
|
||||
#
|
||||
# TODO GraphQL for dependencies
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
"""
|
||||
Helper script to restrict running only required CI jobs
|
||||
and show the job(s) logs.
|
||||
"""
|
||||
|
||||
from typing import Optional
|
||||
from functools import partial
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
import argparse
|
||||
import sys
|
||||
import gitlab
|
||||
|
||||
from colorama import Fore, Style
|
||||
|
||||
REFRESH_WAIT_LOG = 10
|
||||
REFRESH_WAIT_JOBS = 6
|
||||
|
||||
URL_START = "\033]8;;"
|
||||
URL_END = "\033]8;;\a"
|
||||
|
||||
STATUS_COLORS = {
|
||||
"created": "",
|
||||
"running": Fore.BLUE,
|
||||
"success": Fore.GREEN,
|
||||
"failed": Fore.RED,
|
||||
"canceled": Fore.MAGENTA,
|
||||
"manual": "",
|
||||
"pending": "",
|
||||
"skipped": "",
|
||||
}
|
||||
|
||||
# TODO: This hardcoded list should be replaced by querying the pipeline's
|
||||
# dependency graph to see which jobs the target jobs need
|
||||
DEPENDENCIES = [
|
||||
"debian/x86_build-base",
|
||||
"debian/x86_build",
|
||||
"debian/x86_test-base",
|
||||
"debian/x86_test-gl",
|
||||
"debian/arm_build",
|
||||
"debian/arm_test",
|
||||
"kernel+rootfs_amd64",
|
||||
"kernel+rootfs_arm64",
|
||||
"kernel+rootfs_armhf",
|
||||
"debian-testing",
|
||||
"debian-arm64",
|
||||
]
|
||||
|
||||
COMPLETED_STATUSES = ["success", "failed"]
|
||||
|
||||
|
||||
def get_gitlab_project(glab, name: str):
|
||||
"""Finds a specified gitlab project for given user"""
|
||||
glab.auth()
|
||||
username = glab.user.username
|
||||
return glab.projects.get(f"{username}/mesa")
|
||||
|
||||
|
||||
def wait_for_pipeline(project, sha: str):
|
||||
"""await until pipeline appears in Gitlab"""
|
||||
print("⏲ for the pipeline to appear..", end="")
|
||||
while True:
|
||||
pipelines = project.pipelines.list(sha=sha)
|
||||
if pipelines:
|
||||
print("", flush=True)
|
||||
return pipelines[0]
|
||||
print("", end=".", flush=True)
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
def print_job_status(job) -> None:
|
||||
"""It prints a nice, colored job status with a link to the job."""
|
||||
if job.status == "canceled":
|
||||
return
|
||||
|
||||
print(
|
||||
STATUS_COLORS[job.status]
|
||||
+ "🞋 job "
|
||||
+ URL_START
|
||||
+ f"{job.web_url}\a{job.name}"
|
||||
+ URL_END
|
||||
+ f" :: {job.status}"
|
||||
+ Style.RESET_ALL
|
||||
)
|
||||
|
||||
|
||||
def print_job_status_change(job) -> None:
|
||||
"""It reports job status changes."""
|
||||
if job.status == "canceled":
|
||||
return
|
||||
|
||||
print(
|
||||
STATUS_COLORS[job.status]
|
||||
+ "🗘 job "
|
||||
+ URL_START
|
||||
+ f"{job.web_url}\a{job.name}"
|
||||
+ URL_END
|
||||
+ f" has new status: {job.status}"
|
||||
+ Style.RESET_ALL
|
||||
)
|
||||
|
||||
|
||||
def pretty_wait(sec: int) -> None:
|
||||
"""shows progressbar in dots"""
|
||||
for val in range(sec, 0, -1):
|
||||
print(f"⏲ {val} seconds", end="\r")
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
def monitor_pipeline(
|
||||
project, pipeline, target_job: Optional[str], dependencies, force_manual: bool
|
||||
) -> tuple[Optional[int], Optional[int]]:
|
||||
"""Monitors pipeline and delegate canceling jobs"""
|
||||
statuses = {}
|
||||
target_statuses = {}
|
||||
|
||||
if not dependencies:
|
||||
dependencies = []
|
||||
dependencies.extend(DEPENDENCIES)
|
||||
|
||||
if target_job:
|
||||
target_jobs_regex = re.compile(target_job.strip())
|
||||
|
||||
while True:
|
||||
to_cancel = []
|
||||
for job in pipeline.jobs.list(all=True, sort="desc"):
|
||||
# target jobs
|
||||
if target_job and target_jobs_regex.match(job.name):
|
||||
if force_manual and job.status == "manual":
|
||||
enable_job(project, job, True)
|
||||
|
||||
if (job.id not in target_statuses) or (
|
||||
job.status not in target_statuses[job.id]
|
||||
):
|
||||
print_job_status_change(job)
|
||||
target_statuses[job.id] = job.status
|
||||
else:
|
||||
print_job_status(job)
|
||||
|
||||
continue
|
||||
|
||||
# all jobs
|
||||
if (job.id not in statuses) or (job.status not in statuses[job.id]):
|
||||
print_job_status_change(job)
|
||||
statuses[job.id] = job.status
|
||||
|
||||
# dependencies and cancelling the rest
|
||||
if job.name in dependencies:
|
||||
if job.status == "manual":
|
||||
enable_job(project, job, False)
|
||||
|
||||
elif target_job and job.status not in [
|
||||
"canceled",
|
||||
"success",
|
||||
"failed",
|
||||
"skipped",
|
||||
]:
|
||||
to_cancel.append(job)
|
||||
|
||||
if target_job:
|
||||
cancel_jobs(project, to_cancel)
|
||||
|
||||
print("---------------------------------", flush=False)
|
||||
|
||||
if len(target_statuses) == 1 and {"running"}.intersection(
|
||||
target_statuses.values()
|
||||
):
|
||||
return next(iter(target_statuses)), None
|
||||
|
||||
if {"failed", "canceled"}.intersection(target_statuses.values()):
|
||||
return None, 1
|
||||
|
||||
if {"success", "manual"}.issuperset(target_statuses.values()):
|
||||
return None, 0
|
||||
|
||||
pretty_wait(REFRESH_WAIT_JOBS)
|
||||
|
||||
|
||||
def enable_job(project, job, target: bool) -> None:
|
||||
"""enable manual job"""
|
||||
pjob = project.jobs.get(job.id, lazy=True)
|
||||
pjob.play()
|
||||
if target:
|
||||
jtype = "🞋 "
|
||||
else:
|
||||
jtype = "(dependency)"
|
||||
print(Fore.MAGENTA + f"{jtype} job {job.name} manually enabled" + Style.RESET_ALL)
|
||||
|
||||
|
||||
def cancel_job(project, job) -> None:
|
||||
"""Cancel GitLab job"""
|
||||
pjob = project.jobs.get(job.id, lazy=True)
|
||||
pjob.cancel()
|
||||
print(f"♲ {job.name}")
|
||||
|
||||
|
||||
def cancel_jobs(project, to_cancel) -> None:
|
||||
"""Cancel unwanted GitLab jobs"""
|
||||
if not to_cancel:
|
||||
return
|
||||
|
||||
with ThreadPoolExecutor(max_workers=6) as exe:
|
||||
part = partial(cancel_job, project)
|
||||
exe.map(part, to_cancel)
|
||||
|
||||
|
||||
def print_log(project, job_id) -> None:
|
||||
"""Print job log into output"""
|
||||
printed_lines = 0
|
||||
while True:
|
||||
job = project.jobs.get(job_id)
|
||||
|
||||
# GitLab's REST API doesn't offer pagination for logs, so we have to refetch it all
|
||||
lines = job.trace().decode("unicode_escape").splitlines()
|
||||
for line in lines[printed_lines:]:
|
||||
print(line)
|
||||
printed_lines = len(lines)
|
||||
|
||||
if job.status in COMPLETED_STATUSES:
|
||||
print(Fore.GREEN + f"Job finished: {job.web_url}" + Style.RESET_ALL)
|
||||
return
|
||||
pretty_wait(REFRESH_WAIT_LOG)
|
||||
|
||||
|
||||
def parse_args() -> None:
|
||||
"""Parse args"""
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Tool to trigger a subset of container jobs "
|
||||
+ "and monitor the progress of a test job",
|
||||
epilog="Example: mesa-monitor.py --rev $(git rev-parse HEAD) "
|
||||
+ '--target ".*traces" ',
|
||||
)
|
||||
parser.add_argument("--target", metavar="target-job", help="Target job")
|
||||
parser.add_argument("--deps", nargs="+", help="Job dependencies")
|
||||
parser.add_argument(
|
||||
"--rev", metavar="revision", help="repository git revision", required=True
|
||||
)
|
||||
parser.add_argument(
|
||||
"--token",
|
||||
metavar="token",
|
||||
help="force GitLab token, otherwise it's read from ~/.config/gitlab-token",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--force-manual", action="store_true", help="Force jobs marked as manual"
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def read_token(token_arg: Optional[str]) -> str:
|
||||
"""pick token from args or file"""
|
||||
if token_arg:
|
||||
return token_arg
|
||||
return (
|
||||
open(os.path.expanduser("~/.config/gitlab-token"), encoding="utf-8")
|
||||
.readline()
|
||||
.rstrip()
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
t_start = time.perf_counter()
|
||||
|
||||
args = parse_args()
|
||||
|
||||
token = read_token(args.token)
|
||||
|
||||
gl = gitlab.Gitlab(url="https://gitlab.freedesktop.org", private_token=token)
|
||||
|
||||
cur_project = get_gitlab_project(gl, "mesa")
|
||||
|
||||
print(f"Revision: {args.rev}")
|
||||
pipe = wait_for_pipeline(cur_project, args.rev)
|
||||
print(f"Pipeline: {pipe.web_url}")
|
||||
if args.target:
|
||||
print("🞋 job: " + Fore.BLUE + args.target + Style.RESET_ALL)
|
||||
print(f"Extra dependencies: {args.deps}")
|
||||
target_job_id, ret = monitor_pipeline(
|
||||
cur_project, pipe, args.target, args.deps, args.force_manual
|
||||
)
|
||||
|
||||
if target_job_id:
|
||||
print_log(cur_project, target_job_id)
|
||||
|
||||
t_end = time.perf_counter()
|
||||
spend_minutes = (t_end - t_start) / 60
|
||||
print(f"⏲ Duration of script execution: {spend_minutes:0.1f} minutes")
|
||||
|
||||
sys.exit(ret)
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(1)
|
@@ -1,2 +0,0 @@
|
||||
colorama==0.4.5
|
||||
python-gitlab==3.5.0
|
36
.gitlab-ci/build-apitrace.sh
Normal file
36
.gitlab-ci/build-apitrace.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# Need an unreleased version of Waffle for surfaceless support in apitrace
|
||||
# Replace this build with the Debian package once that's possible
|
||||
|
||||
WAFFLE_VERSION="e3c995d9a2693b687501715b6550619922346089"
|
||||
git clone https://gitlab.freedesktop.org/mesa/waffle.git --single-branch --no-checkout /waffle
|
||||
pushd /waffle
|
||||
git checkout "$WAFFLE_VERSION"
|
||||
cmake -B_build -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release $EXTRA_CMAKE_ARGS .
|
||||
make -C _build install
|
||||
mkdir -p build/lib build/bin
|
||||
cp _build/lib/libwaffle-1.so build/lib/libwaffle-1.so.0
|
||||
cp _build/bin/wflinfo build/bin/wflinfo
|
||||
${STRIP_CMD:-strip} build/lib/* build/bin/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
||||
|
||||
APITRACE_VERSION="9.0"
|
||||
|
||||
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
|
||||
pushd /apitrace
|
||||
git checkout "$APITRACE_VERSION"
|
||||
# Note: The cmake stuff for waffle in apitrace fails to use waffle's library
|
||||
# directory. Just force the issue here.
|
||||
env LDFLAGS="-L/usr/local/lib" \
|
||||
cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on -DWaffle_DIR=/usr/local/lib/cmake/Waffle/ $EXTRA_CMAKE_ARGS
|
||||
ninja -C _build
|
||||
mkdir build
|
||||
cp _build/apitrace build
|
||||
cp _build/eglretrace build
|
||||
${STRIP_CMD:-strip} build/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
9
.gitlab-ci/build-deqp-runner.sh
Normal file
9
.gitlab-ci/build-deqp-runner.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
cargo install deqp-runner \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--version 0.1.5 \
|
||||
--root /usr/local \
|
||||
$EXTRA_CARGO_ARGS
|
67
.gitlab-ci/build-deqp.sh
Normal file
67
.gitlab-ci/build-deqp.sh
Normal file
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
git clone \
|
||||
https://github.com/KhronosGroup/VK-GL-CTS.git \
|
||||
-b vulkan-cts-1.2.3.2 \
|
||||
/VK-GL-CTS
|
||||
pushd /VK-GL-CTS
|
||||
|
||||
# cherry-pick fix for surfaceless config choosing:
|
||||
git cherry-pick -x 8f3bfc6c7def0c0cb452d5dadf31aa7fef242365
|
||||
|
||||
|
||||
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
|
||||
# libpng (sigh). The archives get their checksums checked anyway, and git
|
||||
# always goes through ssh or https.
|
||||
python3 external/fetch_sources.py --insecure
|
||||
|
||||
mkdir -p /deqp
|
||||
|
||||
# Save the testlog stylesheets:
|
||||
cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp
|
||||
popd
|
||||
|
||||
pushd /deqp
|
||||
cmake -G Ninja \
|
||||
-DDEQP_TARGET=${DEQP_TARGET:-x11_glx} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
$EXTRA_CMAKE_ARGS \
|
||||
/VK-GL-CTS
|
||||
ninja
|
||||
|
||||
# Copy out the mustpass lists we want.
|
||||
mkdir /deqp/mustpass
|
||||
cp /VK-GL-CTS/external/vulkancts/mustpass/master/vk-default.txt \
|
||||
/deqp/mustpass/vk-master.txt
|
||||
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/aosp_mustpass/3.2.6.x/*.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass/4.6.1.x/*-master.txt \
|
||||
/deqp/mustpass/.
|
||||
|
||||
# Save *some* executor utils, but otherwise strip things down
|
||||
# to reduct deqp build size:
|
||||
mkdir /deqp/executor.save
|
||||
cp /deqp/executor/testlog-to-* /deqp/executor.save
|
||||
rm -rf /deqp/executor
|
||||
mv /deqp/executor.save /deqp/executor
|
||||
|
||||
rm -rf /deqp/external/openglcts/modules/gl_cts/data/mustpass
|
||||
rm -rf /deqp/external/openglcts/modules/cts-runner
|
||||
rm -rf /deqp/modules/internal
|
||||
rm -rf /deqp/execserver
|
||||
rm -rf /deqp/modules/egl
|
||||
rm -rf /deqp/framework
|
||||
find -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' | xargs rm -rf
|
||||
${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
|
||||
${STRIP_CMD:-strip} external/openglcts/modules/glcts
|
||||
${STRIP_CMD:-strip} modules/*/deqp-*
|
||||
du -sh *
|
||||
rm -rf /VK-GL-CTS
|
||||
popd
|
14
.gitlab-ci/build-fossilize.sh
Normal file
14
.gitlab-ci/build-fossilize.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git clone https://github.com/ValveSoftware/Fossilize.git
|
||||
cd Fossilize
|
||||
git checkout 6b5b570008c9ab5269e341f04c811fe49a1bb72c
|
||||
git submodule update --init
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja
|
||||
ninja -C . install
|
||||
cd ../..
|
||||
rm -rf Fossilize
|
21
.gitlab-ci/build-gfxreconstruct.sh
Normal file
21
.gitlab-ci/build-gfxreconstruct.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
GFXRECONSTRUCT_VERSION=57c588c04af631d1d6d381a48e2b9283f9d9d528
|
||||
|
||||
# Using the "dev" branch by now because it solves a crash and will allow us to
|
||||
# use the gfxreconstruct-info tool
|
||||
git clone https://github.com/LunarG/gfxreconstruct.git --single-branch -b dev --no-checkout /gfxreconstruct
|
||||
pushd /gfxreconstruct
|
||||
git checkout "$GFXRECONSTRUCT_VERSION"
|
||||
git submodule update --init
|
||||
git submodule update
|
||||
cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release
|
||||
ninja -C _build gfxrecon-replay gfxrecon-info
|
||||
mkdir -p build/bin
|
||||
install _build/tools/replay/gfxrecon-replay build/bin
|
||||
install _build/tools/info/gfxrecon-info build/bin
|
||||
strip build/bin/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
37
.gitlab-ci/build-libclc.sh
Normal file
37
.gitlab-ci/build-libclc.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
export LLVM_CONFIG="llvm-config-10"
|
||||
|
||||
$LLVM_CONFIG --version
|
||||
|
||||
git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator -b llvm_release_100 --depth 1 /SPIRV-LLVM-Translator
|
||||
pushd /SPIRV-LLVM-Translator
|
||||
cmake -G Ninja -DLLVM_BUILD_TOOLS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_INSTALL_PREFIX=`$LLVM_CONFIG --prefix`
|
||||
ninja
|
||||
ninja install
|
||||
popd
|
||||
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
git clone \
|
||||
https://github.com/llvm/llvm-project \
|
||||
--depth 1 \
|
||||
/llvm-project
|
||||
|
||||
mkdir /libclc
|
||||
pushd /libclc
|
||||
cmake -G Ninja -DLLVM_CONFIG=$LLVM_CONFIG -DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr /llvm-project/libclc
|
||||
ninja
|
||||
ninja install
|
||||
popd
|
||||
|
||||
# workaroud cmake vs debian packaging.
|
||||
mkdir -p /usr/lib/clc
|
||||
ln -s /usr/share/clc/spirv64-mesa3d-.spv /usr/lib/clc/
|
||||
ln -s /usr/share/clc/spirv-mesa3d-.spv /usr/lib/clc/
|
||||
|
||||
du -sh *
|
||||
rm -rf /libclc /llvm-project /SPIRV-LLVM-Translator
|
@@ -2,7 +2,7 @@
|
||||
|
||||
set -ex
|
||||
|
||||
export LIBDRM_VERSION=libdrm-2.4.110
|
||||
export LIBDRM_VERSION=libdrm-2.4.102
|
||||
|
||||
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
|
||||
tar -xvf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
|
17
.gitlab-ci/build-piglit.sh
Normal file
17
.gitlab-ci/build-piglit.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
if [ -n "$INCLUDE_OPENCL_TESTS" ]; then
|
||||
PIGLIT_OPTS="-DPIGLIT_BUILD_CL_TESTS=ON"
|
||||
fi
|
||||
|
||||
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
|
||||
pushd /piglit
|
||||
git checkout 404862743cf8a7b37a4e3a93b4ba1858d59cd4ab
|
||||
patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS
|
||||
ninja
|
||||
find -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' | xargs rm -rf
|
||||
rm -rf target_api
|
||||
popd
|
17
.gitlab-ci/build-renderdoc.sh
Normal file
17
.gitlab-ci/build-renderdoc.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
RENDERDOC_VERSION=da02e88201dc3b64316fc33ce6ff69cc729689aa
|
||||
|
||||
git clone https://github.com/baldurk/renderdoc.git --single-branch --no-checkout /renderdoc
|
||||
pushd /renderdoc
|
||||
git checkout "$RENDERDOC_VERSION"
|
||||
cmake -G Ninja -B_build -H. -DENABLE_QRENDERDOC=false -DCMAKE_BUILD_TYPE=Release $EXTRA_CMAKE_ARGS
|
||||
ninja -C _build
|
||||
mkdir -p build/lib
|
||||
${STRIP_CMD:-strip} _build/lib/*.so
|
||||
cp _build/lib/renderdoc.so build/lib
|
||||
cp _build/lib/librenderdoc.so build/lib
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
@@ -15,10 +15,10 @@ ln -s /usr/local/bin $HOME/.cargo/bin
|
||||
# version of the compiler, rather than whatever the container's Debian comes
|
||||
# with.
|
||||
#
|
||||
# Pick the rust compiler (1.48) available in Debian stable, and pick a specific
|
||||
# Pick the rust compiler (1.41) available in Debian stable, and pick a specific
|
||||
# snapshot from rustup so the compiler doesn't drift on us.
|
||||
wget https://sh.rustup.rs -O - | \
|
||||
sh -s -- -y --default-toolchain 1.49.0-2020-12-31
|
||||
sh -s -- -y --default-toolchain 1.41.1-2020-02-27
|
||||
|
||||
# Set up a config script for cross compiling -- cargo needs your system cc for
|
||||
# linking in cross builds, but doesn't know what you want to use for system cc.
|
14
.gitlab-ci/build-spirv-tools.sh
Normal file
14
.gitlab-ci/build-spirv-tools.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git clone --depth 1 https://github.com/KhronosGroup/SPIRV-Tools SPIRV-Tools
|
||||
pushd SPIRV-Tools
|
||||
pushd external
|
||||
git clone --depth 1 https://github.com/KhronosGroup/SPIRV-Headers
|
||||
popd
|
||||
cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release
|
||||
ninja -C _build
|
||||
ninja -C _build install
|
||||
popd
|
||||
rm -rf SPIRV-Tools
|
20
.gitlab-ci/build-virglrenderer.sh
Normal file
20
.gitlab-ci/build-virglrenderer.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
mkdir -p /epoxy
|
||||
pushd /epoxy
|
||||
wget -qO- https://github.com/anholt/libepoxy/releases/download/1.5.4/libepoxy-1.5.4.tar.xz | tar -xJ --strip-components=1
|
||||
meson build/ $EXTRA_MESON_ARGS
|
||||
ninja -C build install
|
||||
popd
|
||||
rm -rf /epoxy
|
||||
|
||||
VIRGLRENDERER_VERSION=43148d1115a12219a0560a538c9872d07c28c558
|
||||
git clone https://gitlab.freedesktop.org/virgl/virglrenderer.git --single-branch --no-checkout /virglrenderer
|
||||
pushd /virglrenderer
|
||||
git checkout "$VIRGLRENDERER_VERSION"
|
||||
meson build/ $EXTRA_MESON_ARGS
|
||||
ninja -C build install
|
||||
popd
|
||||
rm -rf /virglrenderer
|
29
.gitlab-ci/build-vulkantools.sh
Normal file
29
.gitlab-ci/build-vulkantools.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
VULKANTOOLS_VERSION=1862c6a47b64cd09156205d7f7e6b3bfcea76390
|
||||
|
||||
git clone https://github.com/LunarG/VulkanTools.git --single-branch --no-checkout /VulkanTools
|
||||
pushd /VulkanTools
|
||||
git checkout "$VULKANTOOLS_VERSION"
|
||||
./update_external_sources.sh
|
||||
mkdir _build
|
||||
./scripts/update_deps.py --dir=_build --config=release --generator=Ninja
|
||||
cmake -G Ninja -B_build -H. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/VulkanTools/build \
|
||||
-DBUILD_TESTS=OFF \
|
||||
-DBUILD_VLF=OFF \
|
||||
-DBUILD_VKTRACE=OFF \
|
||||
-DBUILD_VIA=OFF \
|
||||
-DBUILD_VKTRACE_REPLAY=OFF \
|
||||
-C_build/helper.cmake
|
||||
ninja -C _build VkLayer_screenshot VkLayer_screenshot-staging-json
|
||||
mkdir -p build/etc/vulkan/explicit_layer.d
|
||||
mkdir build/lib
|
||||
install _build/layersvt/staging-json/VkLayer_screenshot.json build/etc/vulkan/explicit_layer.d
|
||||
install _build/layersvt/libVkLayer_screenshot.so build/lib
|
||||
strip build/lib/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
@@ -1,561 +0,0 @@
|
||||
# Shared between windows and Linux
|
||||
.build-common:
|
||||
extends: .build-rules
|
||||
# Cancel job if a newer commit is pushed to the same branch
|
||||
interruptible: true
|
||||
artifacts:
|
||||
name: "mesa_${CI_JOB_NAME}"
|
||||
when: always
|
||||
paths:
|
||||
- _build/meson-logs/*.txt
|
||||
- _build/meson-logs/strace
|
||||
- shader-db
|
||||
|
||||
# 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"
|
||||
- echo -e "\e[0Ksection_start:$(date +%s):ccache_before[collapsed=true]\r\e[0Kccache stats before build"
|
||||
- ccache --show-stats
|
||||
- echo -e "\e[0Ksection_end:$(date +%s):ccache_before\r\e[0K"
|
||||
after_script:
|
||||
- echo -e "\e[0Ksection_start:$(date +%s):ccache_after[collapsed=true]\r\e[0Kccache stats after build"
|
||||
- ccache --show-stats
|
||||
- echo -e "\e[0Ksection_end:$(date +%s):ccache_after\r\e[0K"
|
||||
- !reference [default, after_script]
|
||||
|
||||
.build-windows:
|
||||
extends: .build-common
|
||||
tags:
|
||||
- windows
|
||||
- docker
|
||||
- "2022"
|
||||
- mesa
|
||||
cache:
|
||||
key: ${CI_JOB_NAME}
|
||||
paths:
|
||||
- subprojects/packagecache
|
||||
|
||||
.meson-build:
|
||||
extends:
|
||||
- .build-linux
|
||||
- .use-debian/x86_build
|
||||
stage: build-x86_64
|
||||
variables:
|
||||
LLVM_VERSION: 11
|
||||
script:
|
||||
- .gitlab-ci/meson/build.sh
|
||||
|
||||
.meson-build_mingw:
|
||||
extends:
|
||||
- .build-linux
|
||||
- .use-debian/x86_build_mingw
|
||||
- .use-wine
|
||||
stage: build-x86_64
|
||||
script:
|
||||
- .gitlab-ci/meson/build.sh
|
||||
|
||||
debian-testing:
|
||||
extends:
|
||||
- .meson-build
|
||||
- .ci-deqp-artifacts
|
||||
variables:
|
||||
UNWIND: "enabled"
|
||||
DRI_LOADERS: >
|
||||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
-D egl=enabled
|
||||
-D platforms=x11
|
||||
GALLIUM_ST: >
|
||||
-D dri3=enabled
|
||||
-D gallium-va=enabled
|
||||
GALLIUM_DRIVERS: "swrast,virgl,radeonsi,zink,crocus,iris,i915"
|
||||
VULKAN_DRIVERS: "swrast,amd,intel"
|
||||
BUILDTYPE: "debugoptimized"
|
||||
EXTRA_OPTION: >
|
||||
-D spirv-to-dxil=true
|
||||
-D valgrind=false
|
||||
MINIO_ARTIFACT_NAME: mesa-amd64
|
||||
LLVM_VERSION: "13"
|
||||
script:
|
||||
- .gitlab-ci/lava/lava-pytest.sh
|
||||
- .gitlab-ci/meson/build.sh
|
||||
- .gitlab-ci/prepare-artifacts.sh
|
||||
artifacts:
|
||||
reports:
|
||||
junit: artifacts/ci_scripts_report.xml
|
||||
|
||||
debian-testing-asan:
|
||||
extends:
|
||||
- debian-testing
|
||||
variables:
|
||||
C_ARGS: >
|
||||
-Wno-error=stringop-truncation
|
||||
EXTRA_OPTION: >
|
||||
-D b_sanitize=address
|
||||
-D valgrind=false
|
||||
-D tools=dlclose-skip
|
||||
MINIO_ARTIFACT_NAME: ""
|
||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
||||
|
||||
debian-testing-msan:
|
||||
extends:
|
||||
- debian-clang
|
||||
variables:
|
||||
# l_undef is incompatible with msan
|
||||
EXTRA_OPTION:
|
||||
-D b_sanitize=memory
|
||||
-D b_lundef=false
|
||||
MINIO_ARTIFACT_NAME: ""
|
||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
||||
# Don't run all the tests yet:
|
||||
# GLSL has some issues in sexpression reading.
|
||||
# gtest has issues in its test initialization.
|
||||
MESON_TEST_ARGS: "--suite glcpp --suite gallium --suite format"
|
||||
# Freedreno dropped because freedreno tools fail at msan.
|
||||
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
|
||||
VULKAN_DRIVERS: intel,amd,broadcom,virtio-experimental
|
||||
|
||||
debian-clover-testing:
|
||||
extends:
|
||||
- .meson-build
|
||||
- .ci-deqp-artifacts
|
||||
variables:
|
||||
UNWIND: "enabled"
|
||||
DRI_LOADERS: >
|
||||
-D glx=disabled
|
||||
-D egl=disabled
|
||||
-D gbm=disabled
|
||||
GALLIUM_ST: >
|
||||
-D gallium-opencl=icd
|
||||
-D opencl-spirv=true
|
||||
GALLIUM_DRIVERS: "swrast"
|
||||
BUILDTYPE: "debugoptimized"
|
||||
EXTRA_OPTION: >
|
||||
-D valgrind=false
|
||||
script:
|
||||
- .gitlab-ci/meson/build.sh
|
||||
- .gitlab-ci/prepare-artifacts.sh
|
||||
|
||||
debian-gallium:
|
||||
extends: .meson-build
|
||||
variables:
|
||||
UNWIND: "enabled"
|
||||
DRI_LOADERS: >
|
||||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
-D egl=enabled
|
||||
-D platforms=x11,wayland
|
||||
GALLIUM_ST: >
|
||||
-D dri3=enabled
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-vdpau=enabled
|
||||
-D gallium-xvmc=enabled
|
||||
-D gallium-omx=bellagio
|
||||
-D gallium-va=enabled
|
||||
-D gallium-xa=enabled
|
||||
-D gallium-nine=true
|
||||
-D gallium-opencl=disabled
|
||||
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
|
||||
VULKAN_DRIVERS: swrast
|
||||
EXTRA_OPTION: >
|
||||
-D spirv-to-dxil=true
|
||||
-D osmesa=true
|
||||
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,xvmc,lima,panfrost,asahi
|
||||
script:
|
||||
- .gitlab-ci/meson/build.sh
|
||||
- .gitlab-ci/run-shader-db.sh
|
||||
|
||||
# Test a release build with -Werror so new warnings don't sneak in.
|
||||
debian-release:
|
||||
extends: .meson-build
|
||||
variables:
|
||||
UNWIND: "enabled"
|
||||
DRI_LOADERS: >
|
||||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
-D egl=enabled
|
||||
-D platforms=x11,wayland
|
||||
GALLIUM_ST: >
|
||||
-D dri3=enabled
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-vdpau=enabled
|
||||
-D gallium-xvmc=disabled
|
||||
-D gallium-omx=disabled
|
||||
-D gallium-va=enabled
|
||||
-D gallium-xa=enabled
|
||||
-D gallium-nine=false
|
||||
-D gallium-opencl=disabled
|
||||
-D llvm=enabled
|
||||
GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,freedreno,r300,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,crocus"
|
||||
VULKAN_DRIVERS: "amd,imagination-experimental,microsoft-experimental"
|
||||
BUILDTYPE: "release"
|
||||
EXTRA_OPTION: >
|
||||
-D spirv-to-dxil=true
|
||||
-D osmesa=true
|
||||
-D tools=all
|
||||
-D intel-clc=enabled
|
||||
-D imagination-srv=true
|
||||
script:
|
||||
- .gitlab-ci/meson/build.sh
|
||||
|
||||
fedora-release:
|
||||
extends:
|
||||
- .meson-build
|
||||
- .use-fedora/x86_build
|
||||
variables:
|
||||
BUILDTYPE: "release"
|
||||
C_ARGS: >
|
||||
-Wno-error=array-bounds
|
||||
-Wno-error=stringop-overread
|
||||
-Wno-error=uninitialized
|
||||
CPP_ARGS: >
|
||||
-Wno-error=array-bounds
|
||||
DRI_LOADERS: >
|
||||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
-D egl=enabled
|
||||
-D glvnd=true
|
||||
-D platforms=x11,wayland
|
||||
EXTRA_OPTION: >
|
||||
-D osmesa=true
|
||||
-D selinux=true
|
||||
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,nir,nouveau,lima,panfrost,imagination
|
||||
-D intel-clc=enabled
|
||||
-D imagination-srv=true
|
||||
GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,iris,kmsro,lima,nouveau,panfrost,r300,r600,radeonsi,svga,swrast,tegra,v3d,vc4,virgl,zink"
|
||||
GALLIUM_ST: >
|
||||
-D dri3=enabled
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-vdpau=enabled
|
||||
-D gallium-xvmc=disabled
|
||||
-D gallium-omx=disabled
|
||||
-D gallium-va=enabled
|
||||
-D gallium-xa=enabled
|
||||
-D gallium-nine=false
|
||||
-D gallium-opencl=icd
|
||||
-D gles1=disabled
|
||||
-D gles2=enabled
|
||||
-D llvm=enabled
|
||||
-D microsoft-clc=disabled
|
||||
-D shared-llvm=enabled
|
||||
-D vulkan-device-select-layer=true
|
||||
LLVM_VERSION: ""
|
||||
UNWIND: "disabled"
|
||||
VULKAN_DRIVERS: "amd,broadcom,freedreno,intel,imagination-experimental"
|
||||
script:
|
||||
- .gitlab-ci/meson/build.sh
|
||||
|
||||
debian-android:
|
||||
extends:
|
||||
- .meson-cross
|
||||
- .use-debian/android_build
|
||||
variables:
|
||||
UNWIND: "disabled"
|
||||
C_ARGS: >
|
||||
-Wno-error=asm-operand-widths
|
||||
-Wno-error=constant-conversion
|
||||
-Wno-error=enum-conversion
|
||||
-Wno-error=initializer-overrides
|
||||
-Wno-error=missing-braces
|
||||
-Wno-error=sometimes-uninitialized
|
||||
-Wno-error=unused-function
|
||||
CPP_ARGS: >
|
||||
-Wno-error=deprecated-declarations
|
||||
DRI_LOADERS: >
|
||||
-D glx=disabled
|
||||
-D gbm=disabled
|
||||
-D egl=enabled
|
||||
-D platforms=android
|
||||
EXTRA_OPTION: >
|
||||
-D android-stub=true
|
||||
-D llvm=disabled
|
||||
-D platform-sdk-version=29
|
||||
-D valgrind=false
|
||||
GALLIUM_ST: >
|
||||
-D dri3=disabled
|
||||
-D gallium-vdpau=disabled
|
||||
-D gallium-xvmc=disabled
|
||||
-D gallium-omx=disabled
|
||||
-D gallium-va=disabled
|
||||
-D gallium-xa=disabled
|
||||
-D gallium-nine=false
|
||||
-D gallium-opencl=disabled
|
||||
LLVM_VERSION: ""
|
||||
PKG_CONFIG_LIBDIR: "/disable/non/android/system/pc/files"
|
||||
script:
|
||||
- PKG_CONFIG_PATH=/usr/local/lib/aarch64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/pkgconfig/ CROSS=aarch64-linux-android GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d VULKAN_DRIVERS=freedreno,broadcom,virtio-experimental .gitlab-ci/meson/build.sh
|
||||
# x86_64 build:
|
||||
# Can't do Intel because gen_decoder.c currently requires libexpat, which
|
||||
# is not a dependency that AOSP wants to accept. Can't do Radeon Gallium
|
||||
# drivers because they requires LLVM, which we don't have an Android build
|
||||
# of.
|
||||
- PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/pkgconfig/ CROSS=x86_64-linux-android GALLIUM_DRIVERS=iris VULKAN_DRIVERS=amd,intel .gitlab-ci/meson/build.sh
|
||||
|
||||
.meson-cross:
|
||||
extends:
|
||||
- .meson-build
|
||||
stage: build-misc
|
||||
variables:
|
||||
UNWIND: "disabled"
|
||||
DRI_LOADERS: >
|
||||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
-D egl=enabled
|
||||
-D platforms=x11
|
||||
-D osmesa=false
|
||||
GALLIUM_ST: >
|
||||
-D dri3=enabled
|
||||
-D gallium-vdpau=disabled
|
||||
-D gallium-xvmc=disabled
|
||||
-D gallium-omx=disabled
|
||||
-D gallium-va=disabled
|
||||
-D gallium-xa=disabled
|
||||
-D gallium-nine=false
|
||||
|
||||
.meson-arm:
|
||||
extends:
|
||||
- .meson-cross
|
||||
- .use-debian/arm_build
|
||||
needs:
|
||||
- debian/arm_build
|
||||
variables:
|
||||
VULKAN_DRIVERS: freedreno,broadcom
|
||||
GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4,zink"
|
||||
BUILDTYPE: "debugoptimized"
|
||||
tags:
|
||||
- aarch64
|
||||
|
||||
debian-armhf:
|
||||
extends:
|
||||
- .meson-arm
|
||||
- .ci-deqp-artifacts
|
||||
variables:
|
||||
CROSS: armhf
|
||||
EXTRA_OPTION: >
|
||||
-D llvm=disabled
|
||||
-D valgrind=false
|
||||
MINIO_ARTIFACT_NAME: mesa-armhf
|
||||
script:
|
||||
- .gitlab-ci/meson/build.sh
|
||||
- .gitlab-ci/prepare-artifacts.sh
|
||||
|
||||
debian-arm64:
|
||||
extends:
|
||||
- .meson-arm
|
||||
- .ci-deqp-artifacts
|
||||
variables:
|
||||
VULKAN_DRIVERS: "freedreno,broadcom,panfrost,imagination-experimental"
|
||||
EXTRA_OPTION: >
|
||||
-D llvm=disabled
|
||||
-D valgrind=false
|
||||
-D imagination-srv=true
|
||||
MINIO_ARTIFACT_NAME: mesa-arm64
|
||||
script:
|
||||
- .gitlab-ci/meson/build.sh
|
||||
- .gitlab-ci/prepare-artifacts.sh
|
||||
|
||||
debian-arm64-asan:
|
||||
extends:
|
||||
- debian-arm64
|
||||
variables:
|
||||
C_ARGS: >
|
||||
-Wno-error=stringop-truncation
|
||||
EXTRA_OPTION: >
|
||||
-D llvm=disabled
|
||||
-D b_sanitize=address
|
||||
-D valgrind=false
|
||||
-D tools=dlclose-skip
|
||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
||||
MINIO_ARTIFACT_NAME: mesa-arm64-asan
|
||||
MESON_TEST_ARGS: "--no-suite mesa:compiler"
|
||||
|
||||
debian-arm64-build-test:
|
||||
extends:
|
||||
- .meson-arm
|
||||
- .ci-deqp-artifacts
|
||||
variables:
|
||||
VULKAN_DRIVERS: "amd"
|
||||
EXTRA_OPTION: >
|
||||
-Dtools=panfrost,imagination
|
||||
script:
|
||||
- .gitlab-ci/meson/build.sh
|
||||
|
||||
debian-clang:
|
||||
extends: .meson-build
|
||||
variables:
|
||||
UNWIND: "enabled"
|
||||
C_ARGS: >
|
||||
-Wno-error=constant-conversion
|
||||
-Wno-error=enum-conversion
|
||||
-Wno-error=implicit-const-int-float-conversion
|
||||
-Wno-error=initializer-overrides
|
||||
-Wno-error=sometimes-uninitialized
|
||||
-Wno-error=unused-function
|
||||
CPP_ARGS: >
|
||||
-Wno-error=c99-designator
|
||||
-Wno-error=deprecated-declarations
|
||||
-Wno-error=implicit-const-int-float-conversion
|
||||
-Wno-error=missing-braces
|
||||
-Wno-error=overloaded-virtual
|
||||
-Wno-error=tautological-constant-out-of-range-compare
|
||||
-Wno-error=unused-const-variable
|
||||
-Wno-error=unused-private-field
|
||||
DRI_LOADERS: >
|
||||
-D glvnd=true
|
||||
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus,i915,asahi"
|
||||
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental,swrast,panfrost,imagination-experimental,microsoft-experimental
|
||||
EXTRA_OPTIONS:
|
||||
-D spirv-to-dxil=true
|
||||
-D imagination-srv=true
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
|
||||
windows-vs2019:
|
||||
extends:
|
||||
- .build-windows
|
||||
- .use-windows_build_vs2019
|
||||
- .windows-build-rules
|
||||
stage: build-misc
|
||||
script:
|
||||
- pwsh -ExecutionPolicy RemoteSigned .\.gitlab-ci\windows\mesa_build.ps1
|
||||
artifacts:
|
||||
paths:
|
||||
- _build/meson-logs/*.txt
|
||||
- _install/
|
||||
|
||||
debian-clover:
|
||||
extends: .meson-build
|
||||
variables:
|
||||
UNWIND: "enabled"
|
||||
DRI_LOADERS: >
|
||||
-D glx=disabled
|
||||
-D egl=disabled
|
||||
-D gbm=disabled
|
||||
GALLIUM_DRIVERS: "r600,radeonsi"
|
||||
GALLIUM_ST: >
|
||||
-D dri3=disabled
|
||||
-D gallium-vdpau=disabled
|
||||
-D gallium-xvmc=disabled
|
||||
-D gallium-omx=disabled
|
||||
-D gallium-va=disabled
|
||||
-D gallium-xa=disabled
|
||||
-D gallium-nine=false
|
||||
-D gallium-opencl=icd
|
||||
EXTRA_OPTION: >
|
||||
-D valgrind=false
|
||||
script:
|
||||
- LLVM_VERSION=9 GALLIUM_DRIVERS=r600,swrast .gitlab-ci/meson/build.sh
|
||||
- .gitlab-ci/meson/build.sh
|
||||
|
||||
debian-vulkan:
|
||||
extends: .meson-build
|
||||
variables:
|
||||
UNWIND: "disabled"
|
||||
DRI_LOADERS: >
|
||||
-D glx=disabled
|
||||
-D gbm=disabled
|
||||
-D egl=disabled
|
||||
-D platforms=x11,wayland
|
||||
-D osmesa=false
|
||||
GALLIUM_ST: >
|
||||
-D dri3=enabled
|
||||
-D gallium-vdpau=disabled
|
||||
-D gallium-xvmc=disabled
|
||||
-D gallium-omx=disabled
|
||||
-D gallium-va=disabled
|
||||
-D gallium-xa=disabled
|
||||
-D gallium-nine=false
|
||||
-D gallium-opencl=disabled
|
||||
-D b_sanitize=undefined
|
||||
-D c_args=-fno-sanitize-recover=all
|
||||
-D cpp_args=-fno-sanitize-recover=all
|
||||
UBSAN_OPTIONS: "print_stacktrace=1"
|
||||
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental,imagination-experimental,microsoft-experimental
|
||||
EXTRA_OPTION: >
|
||||
-D vulkan-layers=device-select,overlay
|
||||
-D build-aco-tests=true
|
||||
-D intel-clc=enabled
|
||||
-D imagination-srv=true
|
||||
|
||||
debian-i386:
|
||||
extends:
|
||||
- .meson-cross
|
||||
- .use-debian/i386_build
|
||||
variables:
|
||||
CROSS: i386
|
||||
VULKAN_DRIVERS: intel,amd,swrast,virtio-experimental
|
||||
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,swrast,virgl,zink,crocus"
|
||||
EXTRA_OPTION: >
|
||||
-D vulkan-layers=device-select,overlay
|
||||
|
||||
debian-s390x:
|
||||
extends:
|
||||
- debian-ppc64el
|
||||
- .use-debian/s390x_build
|
||||
- .s390x-rules
|
||||
tags:
|
||||
- kvm
|
||||
variables:
|
||||
CROSS: s390x
|
||||
GALLIUM_DRIVERS: "swrast,zink"
|
||||
# The lp_test_blend test times out with LLVM 11
|
||||
LLVM_VERSION: 9
|
||||
VULKAN_DRIVERS: "swrast"
|
||||
|
||||
debian-ppc64el:
|
||||
extends:
|
||||
- .meson-cross
|
||||
- .use-debian/ppc64el_build
|
||||
- .ppc64el-rules
|
||||
variables:
|
||||
CROSS: ppc64el
|
||||
GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl,zink"
|
||||
VULKAN_DRIVERS: "amd,swrast"
|
||||
|
||||
debian-mingw32-x86_64:
|
||||
extends: .meson-build_mingw
|
||||
stage: build-misc
|
||||
variables:
|
||||
UNWIND: "disabled"
|
||||
C_ARGS: >
|
||||
-Wno-error=format
|
||||
-Wno-error=format-extra-args
|
||||
-Wno-error=deprecated-declarations
|
||||
-Wno-error=unused-function
|
||||
-Wno-error=unused-variable
|
||||
-Wno-error=unused-but-set-variable
|
||||
-Wno-error=unused-value
|
||||
-Wno-error=switch
|
||||
-Wno-error=parentheses
|
||||
-Wno-error=missing-prototypes
|
||||
-Wno-error=sign-compare
|
||||
-Wno-error=narrowing
|
||||
-Wno-error=overflow
|
||||
CPP_ARGS: $C_ARGS
|
||||
GALLIUM_DRIVERS: "swrast,d3d12,zink"
|
||||
VULKAN_DRIVERS: "swrast,amd,microsoft-experimental"
|
||||
GALLIUM_ST: >
|
||||
-D gallium-opencl=icd
|
||||
-D opencl-native=false
|
||||
-D opencl-spirv=true
|
||||
-D microsoft-clc=enabled
|
||||
-D static-libclc=all
|
||||
-D llvm=enabled
|
||||
EXTRA_OPTION: >
|
||||
-D spirv-to-dxil=true
|
||||
-D gles1=enabled
|
||||
-D gles2=enabled
|
||||
-D osmesa=true
|
||||
-D cpp_rtti=true
|
||||
-D shared-glapi=enabled
|
||||
-D zlib=enabled
|
||||
--cross-file=.gitlab-ci/x86_64-w64-mingw32
|
@@ -1,122 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
for var in \
|
||||
ACO_DEBUG \
|
||||
ASAN_OPTIONS \
|
||||
BASE_SYSTEM_FORK_HOST_PREFIX \
|
||||
BASE_SYSTEM_MAINLINE_HOST_PREFIX \
|
||||
CI_COMMIT_BRANCH \
|
||||
CI_COMMIT_REF_NAME \
|
||||
CI_COMMIT_TITLE \
|
||||
CI_JOB_ID \
|
||||
CI_JOB_JWT_FILE \
|
||||
CI_JOB_NAME \
|
||||
CI_JOB_URL \
|
||||
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME \
|
||||
CI_MERGE_REQUEST_TITLE \
|
||||
CI_NODE_INDEX \
|
||||
CI_NODE_TOTAL \
|
||||
CI_PAGES_DOMAIN \
|
||||
CI_PIPELINE_ID \
|
||||
CI_PIPELINE_URL \
|
||||
CI_PROJECT_DIR \
|
||||
CI_PROJECT_NAME \
|
||||
CI_PROJECT_PATH \
|
||||
CI_PROJECT_ROOT_NAMESPACE \
|
||||
CI_RUNNER_DESCRIPTION \
|
||||
CI_SERVER_URL \
|
||||
CROSVM_GALLIUM_DRIVER \
|
||||
CROSVM_GPU_ARGS \
|
||||
DEQP_BIN_DIR \
|
||||
DEQP_CASELIST_FILTER \
|
||||
DEQP_CASELIST_INV_FILTER \
|
||||
DEQP_CONFIG \
|
||||
DEQP_EXPECTED_RENDERER \
|
||||
DEQP_FRACTION \
|
||||
DEQP_HEIGHT \
|
||||
DEQP_RESULTS_DIR \
|
||||
DEQP_RUNNER_OPTIONS \
|
||||
DEQP_SUITE \
|
||||
DEQP_TEMP_DIR \
|
||||
DEQP_VARIANT \
|
||||
DEQP_VER \
|
||||
DEQP_WIDTH \
|
||||
DEVICE_NAME \
|
||||
DRIVER_NAME \
|
||||
EGL_PLATFORM \
|
||||
ETNA_MESA_DEBUG \
|
||||
FDO_CI_CONCURRENT \
|
||||
FDO_UPSTREAM_REPO \
|
||||
FD_MESA_DEBUG \
|
||||
FLAKES_CHANNEL \
|
||||
FREEDRENO_HANGCHECK_MS \
|
||||
GALLIUM_DRIVER \
|
||||
GALLIVM_PERF \
|
||||
GPU_VERSION \
|
||||
GTEST \
|
||||
GTEST_FAILS \
|
||||
GTEST_FRACTION \
|
||||
GTEST_RESULTS_DIR \
|
||||
GTEST_RUNNER_OPTIONS \
|
||||
GTEST_SKIPS \
|
||||
HWCI_FREQ_MAX \
|
||||
HWCI_KERNEL_MODULES \
|
||||
HWCI_KVM \
|
||||
HWCI_START_XORG \
|
||||
HWCI_TEST_SCRIPT \
|
||||
IR3_SHADER_DEBUG \
|
||||
JOB_ARTIFACTS_BASE \
|
||||
JOB_RESULTS_PATH \
|
||||
JOB_ROOTFS_OVERLAY_PATH \
|
||||
KERNEL_IMAGE_BASE_URL \
|
||||
KERNEL_IMAGE_NAME \
|
||||
LD_LIBRARY_PATH \
|
||||
LP_NUM_THREADS \
|
||||
MESA_BASE_TAG \
|
||||
MESA_BUILD_PATH \
|
||||
MESA_DEBUG \
|
||||
MESA_GLES_VERSION_OVERRIDE \
|
||||
MESA_GLSL_VERSION_OVERRIDE \
|
||||
MESA_GL_VERSION_OVERRIDE \
|
||||
MESA_IMAGE \
|
||||
MESA_IMAGE_PATH \
|
||||
MESA_IMAGE_TAG \
|
||||
MESA_LOADER_DRIVER_OVERRIDE \
|
||||
MESA_TEMPLATES_COMMIT \
|
||||
MESA_VK_IGNORE_CONFORMANCE_WARNING \
|
||||
MESA_SPIRV_LOG_LEVEL \
|
||||
MINIO_HOST \
|
||||
MINIO_RESULTS_UPLOAD \
|
||||
NIR_DEBUG \
|
||||
PAN_I_WANT_A_BROKEN_VULKAN_DRIVER \
|
||||
PAN_MESA_DEBUG \
|
||||
PIGLIT_FRACTION \
|
||||
PIGLIT_NO_WINDOW \
|
||||
PIGLIT_OPTIONS \
|
||||
PIGLIT_PLATFORM \
|
||||
PIGLIT_PROFILES \
|
||||
PIGLIT_REPLAY_ARTIFACTS_BASE_URL \
|
||||
PIGLIT_REPLAY_DESCRIPTION_FILE \
|
||||
PIGLIT_REPLAY_DEVICE_NAME \
|
||||
PIGLIT_REPLAY_EXTRA_ARGS \
|
||||
PIGLIT_REPLAY_LOOP_TIMES \
|
||||
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE \
|
||||
PIGLIT_REPLAY_SUBCOMMAND \
|
||||
PIGLIT_RESULTS \
|
||||
PIGLIT_TESTS \
|
||||
PIPELINE_ARTIFACTS_BASE \
|
||||
RADV_DEBUG \
|
||||
RADV_PERFTEST \
|
||||
SKQP_ASSETS_DIR \
|
||||
SKQP_BACKENDS \
|
||||
TU_DEBUG \
|
||||
VIRGL_HOST_API \
|
||||
VK_CPU \
|
||||
VK_DRIVER \
|
||||
VK_ICD_FILENAMES \
|
||||
VKD3D_PROTON_RESULTS \
|
||||
; do
|
||||
if [ -n "${!var+x}" ]; then
|
||||
echo "export $var=${!var@Q}"
|
||||
fi
|
||||
done
|
@@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Very early init, used to make sure devices and network are set up and
|
||||
# reachable.
|
||||
|
||||
set -ex
|
||||
|
||||
cd /
|
||||
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
mount -t debugfs none /sys/kernel/debug
|
||||
mount -t devtmpfs none /dev || echo possibly already mounted
|
||||
mkdir -p /dev/pts
|
||||
mount -t devpts devpts /dev/pts
|
||||
mount -t tmpfs tmpfs /tmp
|
||||
|
||||
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||
[ -z "$NFS_SERVER_IP" ] || echo "$NFS_SERVER_IP caching-proxy" >> /etc/hosts
|
||||
|
||||
# Set the time so we can validate certificates before we fetch anything;
|
||||
# however as not all DUTs have network, make this non-fatal.
|
||||
for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done || true
|
@@ -1,164 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Make sure to kill itself and all the children process from this script on
|
||||
# exiting, since any console output may interfere with LAVA signals handling,
|
||||
# which based on the log console.
|
||||
cleanup() {
|
||||
if [ "$BACKGROUND_PIDS" = "" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
set +x
|
||||
echo "Killing all child processes"
|
||||
for pid in $BACKGROUND_PIDS
|
||||
do
|
||||
kill "$pid" 2>/dev/null || true
|
||||
done
|
||||
|
||||
# Sleep just a little to give enough time for subprocesses to be gracefully
|
||||
# killed. Then apply a SIGKILL if necessary.
|
||||
sleep 5
|
||||
for pid in $BACKGROUND_PIDS
|
||||
do
|
||||
kill -9 "$pid" 2>/dev/null || true
|
||||
done
|
||||
|
||||
BACKGROUND_PIDS=
|
||||
set -x
|
||||
}
|
||||
trap cleanup INT TERM EXIT
|
||||
|
||||
# Space separated values with the PIDS of the processes started in the
|
||||
# background by this script
|
||||
BACKGROUND_PIDS=
|
||||
|
||||
|
||||
# Second-stage init, used to set up devices and our job environment before
|
||||
# running tests.
|
||||
|
||||
. /set-job-env-vars.sh
|
||||
|
||||
set -ex
|
||||
|
||||
# Set up any devices required by the jobs
|
||||
[ -z "$HWCI_KERNEL_MODULES" ] || {
|
||||
echo -n $HWCI_KERNEL_MODULES | xargs -d, -n1 /usr/sbin/modprobe
|
||||
}
|
||||
|
||||
#
|
||||
# Load the KVM module specific to the detected CPU virtualization extensions:
|
||||
# - vmx for Intel VT
|
||||
# - svm for AMD-V
|
||||
#
|
||||
# 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 || {
|
||||
grep -qs '\bsvm\b' /proc/cpuinfo && KVM_KERNEL_MODULE=kvm_amd
|
||||
}
|
||||
|
||||
[ -z "${KVM_KERNEL_MODULE}" ] && \
|
||||
echo "WARNING: Failed to detect CPU virtualization extensions" || \
|
||||
modprobe ${KVM_KERNEL_MODULE}
|
||||
|
||||
mkdir -p /lava-files
|
||||
wget -S --progress=dot:giga -O /lava-files/${KERNEL_IMAGE_NAME} \
|
||||
"${KERNEL_IMAGE_BASE_URL}/${KERNEL_IMAGE_NAME}"
|
||||
fi
|
||||
|
||||
# Fix prefix confusion: the build installs to $CI_PROJECT_DIR, but we expect
|
||||
# it in /install
|
||||
ln -sf $CI_PROJECT_DIR/install /install
|
||||
export LD_LIBRARY_PATH=/install/lib
|
||||
export LIBGL_DRIVERS_PATH=/install/lib/dri
|
||||
|
||||
# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
|
||||
export XDG_CACHE_HOME=/tmp
|
||||
|
||||
# Make sure Python can find all our imports
|
||||
export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))")
|
||||
|
||||
if [ "$HWCI_FREQ_MAX" = "true" ]; then
|
||||
# Ensure initialization of the DRM device (needed by MSM)
|
||||
head -0 /dev/dri/renderD128
|
||||
|
||||
# Disable GPU frequency scaling
|
||||
DEVFREQ_GOVERNOR=`find /sys/devices -name governor | grep gpu || true`
|
||||
test -z "$DEVFREQ_GOVERNOR" || echo performance > $DEVFREQ_GOVERNOR || true
|
||||
|
||||
# Disable CPU frequency scaling
|
||||
echo performance | tee -a /sys/devices/system/cpu/cpufreq/policy*/scaling_governor || true
|
||||
|
||||
# Disable GPU runtime power management
|
||||
GPU_AUTOSUSPEND=`find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1`
|
||||
test -z "$GPU_AUTOSUSPEND" || echo -1 > $GPU_AUTOSUSPEND || true
|
||||
# Lock Intel GPU frequency to 70% of the maximum allowed by hardware
|
||||
# and enable throttling detection & reporting.
|
||||
# Additionally, set the upper limit for CPU scaling frequency to 65% of the
|
||||
# maximum permitted, as an additional measure to mitigate thermal throttling.
|
||||
./intel-gpu-freq.sh -s 70% --cpu-set-max 65% -g all -d
|
||||
fi
|
||||
|
||||
# Increase freedreno hangcheck timer because it's right at the edge of the
|
||||
# spilling tests timing out (and some traces, too)
|
||||
if [ -n "$FREEDRENO_HANGCHECK_MS" ]; then
|
||||
echo $FREEDRENO_HANGCHECK_MS | tee -a /sys/kernel/debug/dri/128/hangcheck_period_ms
|
||||
fi
|
||||
|
||||
# Start a little daemon to capture the first devcoredump we encounter. (They
|
||||
# expire after 5 minutes, so we poll for them).
|
||||
/capture-devcoredump.sh &
|
||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
||||
|
||||
# If we want Xorg to be running for the test, then we start it up before the
|
||||
# HWCI_TEST_SCRIPT because we need to use xinit to start X (otherwise
|
||||
# without using -displayfd you can race with Xorg's startup), but xinit will eat
|
||||
# your client's return code
|
||||
if [ -n "$HWCI_START_XORG" ]; then
|
||||
echo "touch /xorg-started; sleep 100000" > /xorg-script
|
||||
env \
|
||||
xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile /Xorg.0.log &
|
||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
||||
|
||||
# Wait for xorg to be ready for connections.
|
||||
for i in 1 2 3 4 5; do
|
||||
if [ -e /xorg-started ]; then
|
||||
break
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
export DISPLAY=:0
|
||||
fi
|
||||
|
||||
RESULT=fail
|
||||
set +e
|
||||
sh -c "$HWCI_TEST_SCRIPT"
|
||||
EXIT_CODE=$?
|
||||
set -e
|
||||
|
||||
# Let's make sure the results are always stored in current working directory
|
||||
mv -f ${CI_PROJECT_DIR}/results ./ 2>/dev/null || true
|
||||
|
||||
[ ${EXIT_CODE} -ne 0 ] || rm -rf results/trace/"$PIGLIT_REPLAY_DEVICE_NAME"
|
||||
|
||||
# Make sure that capture-devcoredump is done before we start trying to tar up
|
||||
# artifacts -- if it's writing while tar is reading, tar will throw an error and
|
||||
# kill the job.
|
||||
cleanup
|
||||
|
||||
# upload artifacts
|
||||
if [ -n "$MINIO_RESULTS_UPLOAD" ]; then
|
||||
tar -czf results.tar.gz results/;
|
||||
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" results.tar.gz https://"$MINIO_RESULTS_UPLOAD"/results.tar.gz;
|
||||
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
|
||||
|
||||
set +x
|
||||
echo "hwci: mesa: $RESULT"
|
||||
# Sleep a bit to avoid kernel dump message interleave from LAVA ENDTC signal
|
||||
sleep 1
|
||||
exit $EXIT_CODE
|
@@ -1,758 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This is an utility script to manage Intel GPU frequencies.
|
||||
# It can be used for debugging performance problems or trying to obtain a stable
|
||||
# frequency while benchmarking.
|
||||
#
|
||||
# Note the Intel i915 GPU driver allows to change the minimum, maximum and boost
|
||||
# frequencies in steps of 50 MHz via:
|
||||
#
|
||||
# /sys/class/drm/card<n>/<freq_info>
|
||||
#
|
||||
# Where <n> is the DRM card index and <freq_info> one of the following:
|
||||
#
|
||||
# - gt_max_freq_mhz (enforced maximum freq)
|
||||
# - gt_min_freq_mhz (enforced minimum freq)
|
||||
# - gt_boost_freq_mhz (enforced boost freq)
|
||||
#
|
||||
# The hardware capabilities can be accessed via:
|
||||
#
|
||||
# - gt_RP0_freq_mhz (supported maximum freq)
|
||||
# - gt_RPn_freq_mhz (supported minimum freq)
|
||||
# - gt_RP1_freq_mhz (most efficient freq)
|
||||
#
|
||||
# The current frequency can be read from:
|
||||
# - gt_act_freq_mhz (the actual GPU freq)
|
||||
# - gt_cur_freq_mhz (the last requested freq)
|
||||
#
|
||||
# Also note that in addition to GPU management, the script offers the
|
||||
# possibility to adjust CPU operating frequencies. However, this is currently
|
||||
# limited to just setting the maximum scaling frequency as percentage of the
|
||||
# maximum frequency allowed by the hardware.
|
||||
#
|
||||
# Copyright (C) 2022 Collabora Ltd.
|
||||
# Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
#
|
||||
# Constants
|
||||
#
|
||||
|
||||
# GPU
|
||||
DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/gt_%s_freq_mhz"
|
||||
ENF_FREQ_INFO="max min boost"
|
||||
CAP_FREQ_INFO="RP0 RPn RP1"
|
||||
ACT_FREQ_INFO="act cur"
|
||||
THROTT_DETECT_SLEEP_SEC=2
|
||||
THROTT_DETECT_PID_FILE_PATH=/tmp/thrott-detect.pid
|
||||
|
||||
# CPU
|
||||
CPU_SYSFS_PREFIX=/sys/devices/system/cpu
|
||||
CPU_PSTATE_SYSFS_PATTERN="${CPU_SYSFS_PREFIX}/intel_pstate/%s"
|
||||
CPU_FREQ_SYSFS_PATTERN="${CPU_SYSFS_PREFIX}/cpu%s/cpufreq/%s_freq"
|
||||
CAP_CPU_FREQ_INFO="cpuinfo_max cpuinfo_min"
|
||||
ENF_CPU_FREQ_INFO="scaling_max scaling_min"
|
||||
ACT_CPU_FREQ_INFO="scaling_cur"
|
||||
|
||||
#
|
||||
# Global variables.
|
||||
#
|
||||
unset INTEL_DRM_CARD_INDEX
|
||||
unset GET_ACT_FREQ GET_ENF_FREQ GET_CAP_FREQ
|
||||
unset SET_MIN_FREQ SET_MAX_FREQ
|
||||
unset MONITOR_FREQ
|
||||
unset CPU_SET_MAX_FREQ
|
||||
unset DETECT_THROTT
|
||||
unset DRY_RUN
|
||||
|
||||
#
|
||||
# Simple printf based stderr logger.
|
||||
#
|
||||
log() {
|
||||
local msg_type=$1
|
||||
|
||||
shift
|
||||
printf "%s: %s: " "${msg_type}" "${0##*/}" >&2
|
||||
printf "$@" >&2
|
||||
printf "\n" >&2
|
||||
}
|
||||
|
||||
#
|
||||
# Helper to print sysfs path for the given card index and freq info.
|
||||
#
|
||||
# arg1: Frequency info sysfs name, one of *_FREQ_INFO constants above
|
||||
# arg2: Video card index, defaults to INTEL_DRM_CARD_INDEX
|
||||
#
|
||||
print_freq_sysfs_path() {
|
||||
printf ${DRM_FREQ_SYSFS_PATTERN} "${2:-${INTEL_DRM_CARD_INDEX}}" "$1"
|
||||
}
|
||||
|
||||
#
|
||||
# Helper to set INTEL_DRM_CARD_INDEX for the first identified Intel video card.
|
||||
#
|
||||
identify_intel_gpu() {
|
||||
local i=0 vendor path
|
||||
|
||||
while [ ${i} -lt 16 ]; do
|
||||
[ -c "/dev/dri/card$i" ] || {
|
||||
i=$((i + 1))
|
||||
continue
|
||||
}
|
||||
|
||||
path=$(print_freq_sysfs_path "" ${i})
|
||||
path=${path%/*}/device/vendor
|
||||
|
||||
[ -r "${path}" ] && read vendor < "${path}" && \
|
||||
[ "${vendor}" = "0x8086" ] && INTEL_DRM_CARD_INDEX=$i && return 0
|
||||
|
||||
i=$((i + 1))
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
#
|
||||
# Read the specified freq info from sysfs.
|
||||
#
|
||||
# arg1: Flag (y/n) to also enable printing the freq info.
|
||||
# arg2...: Frequency info sysfs name(s), see *_FREQ_INFO constants above
|
||||
# return: Global variable(s) FREQ_${arg} containing the requested information
|
||||
#
|
||||
read_freq_info() {
|
||||
local var val info path print=0 ret=0
|
||||
|
||||
[ "$1" = "y" ] && print=1
|
||||
shift
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
info=$1
|
||||
shift
|
||||
var=FREQ_${info}
|
||||
path=$(print_freq_sysfs_path "${info}")
|
||||
|
||||
[ -r ${path} ] && read ${var} < ${path} || {
|
||||
log ERROR "Failed to read freq info from: %s" "${path}"
|
||||
ret=1
|
||||
continue
|
||||
}
|
||||
|
||||
[ -n "${var}" ] || {
|
||||
log ERROR "Got empty freq info from: %s" "${path}"
|
||||
ret=1
|
||||
continue
|
||||
}
|
||||
|
||||
[ ${print} -eq 1 ] && {
|
||||
eval val=\$${var}
|
||||
printf "%6s: %4s MHz\n" "${info}" "${val}"
|
||||
}
|
||||
done
|
||||
|
||||
return ${ret}
|
||||
}
|
||||
|
||||
#
|
||||
# Display requested info.
|
||||
#
|
||||
print_freq_info() {
|
||||
local req_freq
|
||||
|
||||
[ -n "${GET_CAP_FREQ}" ] && {
|
||||
printf "* Hardware capabilities\n"
|
||||
read_freq_info y ${CAP_FREQ_INFO}
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
[ -n "${GET_ENF_FREQ}" ] && {
|
||||
printf "* Enforcements\n"
|
||||
read_freq_info y ${ENF_FREQ_INFO}
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
[ -n "${GET_ACT_FREQ}" ] && {
|
||||
printf "* Actual\n"
|
||||
read_freq_info y ${ACT_FREQ_INFO}
|
||||
printf "\n"
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Helper to print frequency value as requested by user via '-s, --set' option.
|
||||
# arg1: user requested freq value
|
||||
#
|
||||
compute_freq_set() {
|
||||
local val
|
||||
|
||||
case "$1" in
|
||||
+)
|
||||
val=${FREQ_RP0}
|
||||
;;
|
||||
-)
|
||||
val=${FREQ_RPn}
|
||||
;;
|
||||
*%)
|
||||
val=$((${1%?} * ${FREQ_RP0} / 100))
|
||||
# Adjust freq to comply with 50 MHz increments
|
||||
val=$((val / 50 * 50))
|
||||
;;
|
||||
*[!0-9]*)
|
||||
log ERROR "Cannot set freq to invalid value: %s" "$1"
|
||||
return 1
|
||||
;;
|
||||
"")
|
||||
log ERROR "Cannot set freq to unspecified value"
|
||||
return 1
|
||||
;;
|
||||
*)
|
||||
# Adjust freq to comply with 50 MHz increments
|
||||
val=$(($1 / 50 * 50))
|
||||
;;
|
||||
esac
|
||||
|
||||
printf "%s" "${val}"
|
||||
}
|
||||
|
||||
#
|
||||
# Helper for set_freq().
|
||||
#
|
||||
set_freq_max() {
|
||||
log INFO "Setting GPU max freq to %s MHz" "${SET_MAX_FREQ}"
|
||||
|
||||
read_freq_info n min || return $?
|
||||
|
||||
[ ${SET_MAX_FREQ} -gt ${FREQ_RP0} ] && {
|
||||
log ERROR "Cannot set GPU max freq (%s) to be greater than hw max freq (%s)" \
|
||||
"${SET_MAX_FREQ}" "${FREQ_RP0}"
|
||||
return 1
|
||||
}
|
||||
|
||||
[ ${SET_MAX_FREQ} -lt ${FREQ_RPn} ] && {
|
||||
log ERROR "Cannot set GPU max freq (%s) to be less than hw min freq (%s)" \
|
||||
"${SET_MIN_FREQ}" "${FREQ_RPn}"
|
||||
return 1
|
||||
}
|
||||
|
||||
[ ${SET_MAX_FREQ} -lt ${FREQ_min} ] && {
|
||||
log ERROR "Cannot set GPU max freq (%s) to be less than min freq (%s)" \
|
||||
"${SET_MAX_FREQ}" "${FREQ_min}"
|
||||
return 1
|
||||
}
|
||||
|
||||
[ -z "${DRY_RUN}" ] || return 0
|
||||
|
||||
printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path max) \
|
||||
$(print_freq_sysfs_path boost) > /dev/null
|
||||
[ $? -eq 0 ] || {
|
||||
log ERROR "Failed to set GPU max frequency"
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Helper for set_freq().
|
||||
#
|
||||
set_freq_min() {
|
||||
log INFO "Setting GPU min freq to %s MHz" "${SET_MIN_FREQ}"
|
||||
|
||||
read_freq_info n max || return $?
|
||||
|
||||
[ ${SET_MIN_FREQ} -gt ${FREQ_max} ] && {
|
||||
log ERROR "Cannot set GPU min freq (%s) to be greater than max freq (%s)" \
|
||||
"${SET_MIN_FREQ}" "${FREQ_max}"
|
||||
return 1
|
||||
}
|
||||
|
||||
[ ${SET_MIN_FREQ} -lt ${FREQ_RPn} ] && {
|
||||
log ERROR "Cannot set GPU min freq (%s) to be less than hw min freq (%s)" \
|
||||
"${SET_MIN_FREQ}" "${FREQ_RPn}"
|
||||
return 1
|
||||
}
|
||||
|
||||
[ -z "${DRY_RUN}" ] || return 0
|
||||
|
||||
printf "%s" ${SET_MIN_FREQ} > $(print_freq_sysfs_path min)
|
||||
[ $? -eq 0 ] || {
|
||||
log ERROR "Failed to set GPU min frequency"
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Set min or max or both GPU frequencies to the user indicated values.
|
||||
#
|
||||
set_freq() {
|
||||
# Get hw max & min frequencies
|
||||
read_freq_info n RP0 RPn || return $?
|
||||
|
||||
[ -z "${SET_MAX_FREQ}" ] || {
|
||||
SET_MAX_FREQ=$(compute_freq_set "${SET_MAX_FREQ}")
|
||||
[ -z "${SET_MAX_FREQ}" ] && return 1
|
||||
}
|
||||
|
||||
[ -z "${SET_MIN_FREQ}" ] || {
|
||||
SET_MIN_FREQ=$(compute_freq_set "${SET_MIN_FREQ}")
|
||||
[ -z "${SET_MIN_FREQ}" ] && return 1
|
||||
}
|
||||
|
||||
#
|
||||
# Ensure correct operation order, to avoid setting min freq
|
||||
# to a value which is larger than max freq.
|
||||
#
|
||||
# E.g.:
|
||||
# crt_min=crt_max=600; new_min=new_max=700
|
||||
# > operation order: max=700; min=700
|
||||
#
|
||||
# crt_min=crt_max=600; new_min=new_max=500
|
||||
# > operation order: min=500; max=500
|
||||
#
|
||||
if [ -n "${SET_MAX_FREQ}" ] && [ -n "${SET_MIN_FREQ}" ]; then
|
||||
[ ${SET_MAX_FREQ} -lt ${SET_MIN_FREQ} ] && {
|
||||
log ERROR "Cannot set GPU max freq to be less than min freq"
|
||||
return 1
|
||||
}
|
||||
|
||||
read_freq_info n min || return $?
|
||||
|
||||
if [ ${SET_MAX_FREQ} -lt ${FREQ_min} ]; then
|
||||
set_freq_min || return $?
|
||||
set_freq_max
|
||||
else
|
||||
set_freq_max || return $?
|
||||
set_freq_min
|
||||
fi
|
||||
elif [ -n "${SET_MAX_FREQ}" ]; then
|
||||
set_freq_max
|
||||
elif [ -n "${SET_MIN_FREQ}" ]; then
|
||||
set_freq_min
|
||||
else
|
||||
log "Unexpected call to set_freq()"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Helper for detect_throttling().
|
||||
#
|
||||
get_thrott_detect_pid() {
|
||||
[ -e ${THROTT_DETECT_PID_FILE_PATH} ] || return 0
|
||||
|
||||
local pid
|
||||
read pid < ${THROTT_DETECT_PID_FILE_PATH} || {
|
||||
log ERROR "Failed to read pid from: %s" "${THROTT_DETECT_PID_FILE_PATH}"
|
||||
return 1
|
||||
}
|
||||
|
||||
local proc_path=/proc/${pid:-invalid}/cmdline
|
||||
[ -r ${proc_path} ] && grep -qs "${0##*/}" ${proc_path} && {
|
||||
printf "%s" "${pid}"
|
||||
return 0
|
||||
}
|
||||
|
||||
# Remove orphaned PID file
|
||||
rm -rf ${THROTT_DETECT_PID_FILE_PATH}
|
||||
return 1
|
||||
}
|
||||
|
||||
#
|
||||
# Control detection and reporting of GPU throttling events.
|
||||
# arg1: start - run throttle detector in background
|
||||
# stop - stop throttle detector process, if any
|
||||
# status - verify if throttle detector is running
|
||||
#
|
||||
detect_throttling() {
|
||||
local pid
|
||||
pid=$(get_thrott_detect_pid)
|
||||
|
||||
case "$1" in
|
||||
status)
|
||||
printf "Throttling detector is "
|
||||
[ -z "${pid}" ] && printf "not running\n" && return 0
|
||||
printf "running (pid=%s)\n" ${pid}
|
||||
;;
|
||||
|
||||
stop)
|
||||
[ -z "${pid}" ] && return 0
|
||||
|
||||
log INFO "Stopping throttling detector (pid=%s)" "${pid}"
|
||||
kill ${pid}; sleep 1; kill -0 ${pid} 2>/dev/null && kill -9 ${pid}
|
||||
rm -rf ${THROTT_DETECT_PID_FILE_PATH}
|
||||
;;
|
||||
|
||||
start)
|
||||
[ -n "${pid}" ] && {
|
||||
log WARN "Throttling detector is already running (pid=%s)" ${pid}
|
||||
return 0
|
||||
}
|
||||
|
||||
(
|
||||
read_freq_info n RPn || exit $?
|
||||
|
||||
while true; do
|
||||
sleep ${THROTT_DETECT_SLEEP_SEC}
|
||||
read_freq_info n act min cur || exit $?
|
||||
|
||||
#
|
||||
# The throttling seems to occur when act freq goes below min.
|
||||
# However, it's necessary to exclude the idle states, where
|
||||
# act freq normally reaches RPn and cur goes below min.
|
||||
#
|
||||
[ ${FREQ_act} -lt ${FREQ_min} ] && \
|
||||
[ ${FREQ_act} -gt ${FREQ_RPn} ] && \
|
||||
[ ${FREQ_cur} -ge ${FREQ_min} ] && \
|
||||
printf "GPU throttling detected: act=%s min=%s cur=%s RPn=%s\n" \
|
||||
${FREQ_act} ${FREQ_min} ${FREQ_cur} ${FREQ_RPn}
|
||||
done
|
||||
) &
|
||||
|
||||
pid=$!
|
||||
log INFO "Started GPU throttling detector (pid=%s)" ${pid}
|
||||
|
||||
printf "%s\n" ${pid} > ${THROTT_DETECT_PID_FILE_PATH} || \
|
||||
log WARN "Failed to write throttle detector PID file"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
#
|
||||
# Retrieve the list of online CPUs.
|
||||
#
|
||||
get_online_cpus() {
|
||||
local path cpu_index
|
||||
|
||||
printf "0"
|
||||
for path in $(grep 1 ${CPU_SYSFS_PREFIX}/cpu*/online); do
|
||||
cpu_index=${path##*/cpu}
|
||||
printf " %s" ${cpu_index%%/*}
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
# Helper to print sysfs path for the given CPU index and freq info.
|
||||
#
|
||||
# arg1: Frequency info sysfs name, one of *_CPU_FREQ_INFO constants above
|
||||
# arg2: CPU index
|
||||
#
|
||||
print_cpu_freq_sysfs_path() {
|
||||
printf ${CPU_FREQ_SYSFS_PATTERN} "$2" "$1"
|
||||
}
|
||||
|
||||
#
|
||||
# Read the specified CPU freq info from sysfs.
|
||||
#
|
||||
# arg1: CPU index
|
||||
# arg2: Flag (y/n) to also enable printing the freq info.
|
||||
# arg3...: Frequency info sysfs name(s), see *_CPU_FREQ_INFO constants above
|
||||
# return: Global variable(s) CPU_FREQ_${arg} containing the requested information
|
||||
#
|
||||
read_cpu_freq_info() {
|
||||
local var val info path cpu_index print=0 ret=0
|
||||
|
||||
cpu_index=$1
|
||||
[ "$2" = "y" ] && print=1
|
||||
shift 2
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
info=$1
|
||||
shift
|
||||
var=CPU_FREQ_${info}
|
||||
path=$(print_cpu_freq_sysfs_path "${info}" ${cpu_index})
|
||||
|
||||
[ -r ${path} ] && read ${var} < ${path} || {
|
||||
log ERROR "Failed to read CPU freq info from: %s" "${path}"
|
||||
ret=1
|
||||
continue
|
||||
}
|
||||
|
||||
[ -n "${var}" ] || {
|
||||
log ERROR "Got empty CPU freq info from: %s" "${path}"
|
||||
ret=1
|
||||
continue
|
||||
}
|
||||
|
||||
[ ${print} -eq 1 ] && {
|
||||
eval val=\$${var}
|
||||
printf "%6s: %4s Hz\n" "${info}" "${val}"
|
||||
}
|
||||
done
|
||||
|
||||
return ${ret}
|
||||
}
|
||||
|
||||
#
|
||||
# Helper to print freq. value as requested by user via '--cpu-set-max' option.
|
||||
# arg1: user requested freq value
|
||||
#
|
||||
compute_cpu_freq_set() {
|
||||
local val
|
||||
|
||||
case "$1" in
|
||||
+)
|
||||
val=${CPU_FREQ_cpuinfo_max}
|
||||
;;
|
||||
-)
|
||||
val=${CPU_FREQ_cpuinfo_min}
|
||||
;;
|
||||
*%)
|
||||
val=$((${1%?} * ${CPU_FREQ_cpuinfo_max} / 100))
|
||||
;;
|
||||
*[!0-9]*)
|
||||
log ERROR "Cannot set CPU freq to invalid value: %s" "$1"
|
||||
return 1
|
||||
;;
|
||||
"")
|
||||
log ERROR "Cannot set CPU freq to unspecified value"
|
||||
return 1
|
||||
;;
|
||||
*)
|
||||
log ERROR "Cannot set CPU freq to custom value; use +, -, or % instead"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
printf "%s" "${val}"
|
||||
}
|
||||
|
||||
#
|
||||
# Adjust CPU max scaling frequency.
|
||||
#
|
||||
set_cpu_freq_max() {
|
||||
local target_freq res=0
|
||||
case "${CPU_SET_MAX_FREQ}" in
|
||||
+)
|
||||
target_freq=100
|
||||
;;
|
||||
-)
|
||||
target_freq=1
|
||||
;;
|
||||
*%)
|
||||
target_freq=${CPU_SET_MAX_FREQ%?}
|
||||
;;
|
||||
*)
|
||||
log ERROR "Invalid CPU freq"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
local pstate_info=$(printf "${CPU_PSTATE_SYSFS_PATTERN}" max_perf_pct)
|
||||
[ -e "${pstate_info}" ] && {
|
||||
log INFO "Setting intel_pstate max perf to %s" "${target_freq}%"
|
||||
printf "%s" "${target_freq}" > "${pstate_info}"
|
||||
[ $? -eq 0 ] || {
|
||||
log ERROR "Failed to set intel_pstate max perf"
|
||||
res=1
|
||||
}
|
||||
}
|
||||
|
||||
local cpu_index
|
||||
for cpu_index in $(get_online_cpus); do
|
||||
read_cpu_freq_info ${cpu_index} n ${CAP_CPU_FREQ_INFO} || { res=$?; continue; }
|
||||
|
||||
target_freq=$(compute_cpu_freq_set "${CPU_SET_MAX_FREQ}")
|
||||
[ -z "${target_freq}" ] && { res=$?; continue; }
|
||||
|
||||
log INFO "Setting CPU%s max scaling freq to %s Hz" ${cpu_index} "${target_freq}"
|
||||
[ -n "${DRY_RUN}" ] && continue
|
||||
|
||||
printf "%s" ${target_freq} > $(print_cpu_freq_sysfs_path scaling_max ${cpu_index})
|
||||
[ $? -eq 0 ] || {
|
||||
res=1
|
||||
log ERROR "Failed to set CPU%s max scaling frequency" ${cpu_index}
|
||||
}
|
||||
done
|
||||
|
||||
return ${res}
|
||||
}
|
||||
|
||||
#
|
||||
# Show help message.
|
||||
#
|
||||
print_usage() {
|
||||
cat <<EOF
|
||||
Usage: ${0##*/} [OPTION]...
|
||||
|
||||
A script to manage Intel GPU frequencies. Can be used for debugging performance
|
||||
problems or trying to obtain a stable frequency while benchmarking.
|
||||
|
||||
Note Intel GPUs only accept specific frequencies, usually multiples of 50 MHz.
|
||||
|
||||
Options:
|
||||
-g, --get [act|enf|cap|all]
|
||||
Get frequency information: active (default), enforced,
|
||||
hardware capabilities or all of them.
|
||||
|
||||
-s, --set [{min|max}=]{FREQUENCY[%]|+|-}
|
||||
Set min or max frequency to the given value (MHz).
|
||||
Append '%' to interpret FREQUENCY as % of hw max.
|
||||
Use '+' or '-' to set frequency to hardware max or min.
|
||||
Omit min/max prefix to set both frequencies.
|
||||
|
||||
-r, --reset Reset frequencies to hardware defaults.
|
||||
|
||||
-m, --monitor [act|enf|cap|all]
|
||||
Monitor the indicated frequencies via 'watch' utility.
|
||||
See '-g, --get' option for more details.
|
||||
|
||||
-d|--detect-thrott [start|stop|status]
|
||||
Start (default operation) the throttling detector
|
||||
as a background process. Use 'stop' or 'status' to
|
||||
terminate the detector process or verify its status.
|
||||
|
||||
--cpu-set-max [FREQUENCY%|+|-}
|
||||
Set CPU max scaling frequency as % of hw max.
|
||||
Use '+' or '-' to set frequency to hardware max or min.
|
||||
|
||||
-r, --reset Reset frequencies to hardware defaults.
|
||||
|
||||
--dry-run See what the script will do without applying any
|
||||
frequency changes.
|
||||
|
||||
-h, --help Display this help text and exit.
|
||||
EOF
|
||||
}
|
||||
|
||||
#
|
||||
# Parse user input for '-g, --get' option.
|
||||
# Returns 0 if a value has been provided, otherwise 1.
|
||||
#
|
||||
parse_option_get() {
|
||||
local ret=0
|
||||
|
||||
case "$1" in
|
||||
act) GET_ACT_FREQ=1;;
|
||||
enf) GET_ENF_FREQ=1;;
|
||||
cap) GET_CAP_FREQ=1;;
|
||||
all) GET_ACT_FREQ=1; GET_ENF_FREQ=1; GET_CAP_FREQ=1;;
|
||||
-*|"")
|
||||
# No value provided, using default.
|
||||
GET_ACT_FREQ=1
|
||||
ret=1
|
||||
;;
|
||||
*)
|
||||
print_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
return ${ret}
|
||||
}
|
||||
|
||||
#
|
||||
# Validate user input for '-s, --set' option.
|
||||
# arg1: input value to be validated
|
||||
# arg2: optional flag indicating input is restricted to %
|
||||
#
|
||||
validate_option_set() {
|
||||
case "$1" in
|
||||
+|-|[0-9]%|[0-9][0-9]%)
|
||||
return 0
|
||||
;;
|
||||
*[!0-9]*|"")
|
||||
print_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -z "$2" ] || { print_usage; exit 1; }
|
||||
}
|
||||
|
||||
#
|
||||
# Parse script arguments.
|
||||
#
|
||||
[ $# -eq 0 ] && { print_usage; exit 1; }
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-g|--get)
|
||||
parse_option_get "$2" && shift
|
||||
;;
|
||||
|
||||
-s|--set)
|
||||
shift
|
||||
case "$1" in
|
||||
min=*)
|
||||
SET_MIN_FREQ=${1#min=}
|
||||
validate_option_set "${SET_MIN_FREQ}"
|
||||
;;
|
||||
max=*)
|
||||
SET_MAX_FREQ=${1#max=}
|
||||
validate_option_set "${SET_MAX_FREQ}"
|
||||
;;
|
||||
*)
|
||||
SET_MIN_FREQ=$1
|
||||
validate_option_set "${SET_MIN_FREQ}"
|
||||
SET_MAX_FREQ=${SET_MIN_FREQ}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
-r|--reset)
|
||||
RESET_FREQ=1
|
||||
SET_MIN_FREQ="-"
|
||||
SET_MAX_FREQ="+"
|
||||
;;
|
||||
|
||||
-m|--monitor)
|
||||
MONITOR_FREQ=act
|
||||
parse_option_get "$2" && MONITOR_FREQ=$2 && shift
|
||||
;;
|
||||
|
||||
-d|--detect-thrott)
|
||||
DETECT_THROTT=start
|
||||
case "$2" in
|
||||
start|stop|status)
|
||||
DETECT_THROTT=$2
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
--cpu-set-max)
|
||||
shift
|
||||
CPU_SET_MAX_FREQ=$1
|
||||
validate_option_set "${CPU_SET_MAX_FREQ}" restricted
|
||||
;;
|
||||
|
||||
--dry-run)
|
||||
DRY_RUN=1
|
||||
;;
|
||||
|
||||
-h|--help)
|
||||
print_usage
|
||||
exit 0
|
||||
;;
|
||||
|
||||
*)
|
||||
print_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
#
|
||||
# Main
|
||||
#
|
||||
RET=0
|
||||
|
||||
identify_intel_gpu || {
|
||||
log INFO "No Intel GPU detected"
|
||||
exit 0
|
||||
}
|
||||
|
||||
[ -n "${SET_MIN_FREQ}${SET_MAX_FREQ}" ] && { set_freq || RET=$?; }
|
||||
print_freq_info
|
||||
|
||||
[ -n "${DETECT_THROTT}" ] && detect_throttling ${DETECT_THROTT}
|
||||
|
||||
[ -n "${CPU_SET_MAX_FREQ}" ] && { set_cpu_freq_max || RET=$?; }
|
||||
|
||||
[ -n "${MONITOR_FREQ}" ] && {
|
||||
log INFO "Entering frequency monitoring mode"
|
||||
sleep 2
|
||||
exec watch -d -n 1 "$0" -g "${MONITOR_FREQ}"
|
||||
}
|
||||
|
||||
exit ${RET}
|
@@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
_XORG_SCRIPT="/xorg-script"
|
||||
_FLAG_FILE="/xorg-started"
|
||||
|
||||
echo "touch ${_FLAG_FILE}; sleep 100000" > "${_XORG_SCRIPT}"
|
||||
if [ "x$1" != "x" ]; then
|
||||
export LD_LIBRARY_PATH="${1}/lib"
|
||||
export LIBGL_DRIVERS_PATH="${1}/lib/dri"
|
||||
fi
|
||||
xinit /bin/sh "${_XORG_SCRIPT}" -- /usr/bin/Xorg vt45 -noreset -s 0 -dpms -logfile /Xorg.0.log &
|
||||
|
||||
# Wait for xorg to be ready for connections.
|
||||
for i in 1 2 3 4 5; do
|
||||
if [ -e "${_FLAG_FILE}" ]; then
|
||||
break
|
||||
fi
|
||||
sleep 5
|
||||
done
|
60
.gitlab-ci/container/android_build.sh
Normal file
60
.gitlab-ci/container/android_build.sh
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
EPHEMERAL="\
|
||||
rdfind \
|
||||
unzip \
|
||||
"
|
||||
|
||||
apt-get install -y --no-remove $EPHEMERAL
|
||||
|
||||
# Fetch the NDK and extract just the toolchain we want.
|
||||
ndk=android-ndk-r21d
|
||||
wget -O $ndk.zip https://dl.google.com/android/repository/$ndk-linux-x86_64.zip
|
||||
unzip -d / $ndk.zip "$ndk/toolchains/llvm/*"
|
||||
rm $ndk.zip
|
||||
# Since it was packed as a zip file, symlinks/hardlinks got turned into
|
||||
# duplicate files. Turn them into hardlinks to save on container space.
|
||||
rdfind -makehardlinks true -makeresultsfile false /android-ndk-r21d/
|
||||
# Drop some large tools we won't use in this build.
|
||||
find /android-ndk-r21d/ -type f | egrep -i "clang-check|clang-tidy|lldb" | xargs rm -f
|
||||
|
||||
sh .gitlab-ci/create-android-ndk-pc.sh /$ndk zlib.pc "" "-lz" "1.2.3"
|
||||
|
||||
sh .gitlab-ci/create-android-cross-file.sh /$ndk x86_64-linux-android x86_64 x86_64
|
||||
sh .gitlab-ci/create-android-cross-file.sh /$ndk i686-linux-android x86 x86
|
||||
sh .gitlab-ci/create-android-cross-file.sh /$ndk aarch64-linux-android arm armv8
|
||||
sh .gitlab-ci/create-android-cross-file.sh /$ndk arm-linux-androideabi arm armv7hl armv7a-linux-androideabi
|
||||
|
||||
# Not using build-libdrm.sh because we don't want its cleanup after building
|
||||
# each arch. Fetch and extract now.
|
||||
export LIBDRM_VERSION=libdrm-2.4.102
|
||||
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
|
||||
tar -xf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
|
||||
|
||||
for arch in \
|
||||
x86_64-linux-android \
|
||||
i686-linux-android \
|
||||
aarch64-linux-android \
|
||||
arm-linux-androideabi ; do
|
||||
|
||||
cd $LIBDRM_VERSION
|
||||
rm -rf build-$arch
|
||||
meson build-$arch \
|
||||
--cross-file=/cross_file-$arch.txt \
|
||||
--libdir=lib/$arch \
|
||||
-Dlibkms=false \
|
||||
-Dnouveau=false \
|
||||
-Dvc4=false \
|
||||
-Detnaviv=false \
|
||||
-Dfreedreno=false \
|
||||
-Dintel=false \
|
||||
-Dcairo-tests=false
|
||||
ninja -C build-$arch install
|
||||
cd ..
|
||||
done
|
||||
|
||||
rm -rf $LIBDRM_VERSION
|
||||
|
||||
apt-get purge -y $EPHEMERAL
|
5
.gitlab-ci/container/arm64_test.sh
Normal file
5
.gitlab-ci/container/arm64_test.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
arch=arm64
|
||||
|
||||
. .gitlab-ci/container/baremetal_build.sh
|
56
.gitlab-ci/container/arm_build.sh
Normal file
56
.gitlab-ci/container/arm_build.sh
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install ca-certificates
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
|
||||
apt-get update
|
||||
apt-get -y install \
|
||||
abootimg \
|
||||
android-sdk-ext4-utils \
|
||||
autoconf \
|
||||
automake \
|
||||
bc \
|
||||
bison \
|
||||
ccache \
|
||||
cmake \
|
||||
debootstrap \
|
||||
fastboot \
|
||||
flex \
|
||||
g++ \
|
||||
git \
|
||||
kmod \
|
||||
lavacli \
|
||||
libdrm-dev \
|
||||
libelf-dev \
|
||||
libexpat1-dev \
|
||||
llvm-8-dev \
|
||||
pkg-config \
|
||||
python \
|
||||
python3-mako \
|
||||
python3-pil \
|
||||
python3-requests \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
unzip \
|
||||
wget \
|
||||
xz-utils \
|
||||
zlib1g-dev
|
||||
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@6f5af7e5574509726c79109e3c147cee95e81366
|
||||
|
||||
apt install -y --no-remove -t buster-backports \
|
||||
meson
|
||||
|
||||
arch=armhf
|
||||
. .gitlab-ci/container/cross_build.sh
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
# dependencies where we want a specific version
|
||||
EXTRA_MESON_ARGS=
|
||||
. .gitlab-ci/build-libdrm.sh
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
45
.gitlab-ci/container/arm_test-base.sh
Normal file
45
.gitlab-ci/container/arm_test-base.sh
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
############### Install packages for building
|
||||
apt-get install -y ca-certificates
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
abootimg \
|
||||
android-sdk-ext4-utils \
|
||||
bc \
|
||||
bison \
|
||||
bzip2 \
|
||||
ccache \
|
||||
cmake \
|
||||
cpio \
|
||||
g++ \
|
||||
debootstrap \
|
||||
fastboot \
|
||||
flex \
|
||||
git \
|
||||
netcat \
|
||||
nginx-full \
|
||||
python3-distutils \
|
||||
python3-minimal \
|
||||
python3-serial \
|
||||
python3.7 \
|
||||
pkg-config \
|
||||
procps \
|
||||
rsync \
|
||||
u-boot-tools \
|
||||
unzip
|
||||
|
||||
apt install -t buster-backports -y --no-remove \
|
||||
meson
|
||||
|
||||
# setup nginx
|
||||
sed -i '/gzip_/ s/#\ //g' /etc/nginx/nginx.conf
|
||||
cp .gitlab-ci/bare-metal/nginx-default-site /etc/nginx/sites-enabled/default
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
@@ -3,49 +3,58 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
# Fetch the arm-built rootfs image and unpack it in our x86 container (saves
|
||||
# network transfer, disk usage, and runtime on test jobs)
|
||||
ROOTFS=/lava-files/rootfs-${arch}
|
||||
|
||||
if wget -q --method=HEAD "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
|
||||
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}"
|
||||
else
|
||||
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}/${arch}"
|
||||
fi
|
||||
dpkg --add-architecture $arch
|
||||
apt-get update
|
||||
|
||||
wget ${ARTIFACTS_URL}/lava-rootfs.tgz -O rootfs.tgz
|
||||
mkdir -p /rootfs-$arch
|
||||
tar -C /rootfs-$arch '--exclude=./dev/*' -zxf rootfs.tgz
|
||||
rm rootfs.tgz
|
||||
# Cross-build test deps
|
||||
BAREMETAL_EPHEMERAL=" \
|
||||
autoconf \
|
||||
automake \
|
||||
crossbuild-essential-$arch \
|
||||
git-lfs \
|
||||
libdrm-dev:$arch \
|
||||
libboost-dev:$arch \
|
||||
libegl1-mesa-dev:$arch \
|
||||
libelf-dev:$arch \
|
||||
libexpat1-dev:$arch \
|
||||
libffi-dev:$arch \
|
||||
libgbm-dev:$arch \
|
||||
libgles2-mesa-dev:$arch \
|
||||
libpciaccess-dev:$arch \
|
||||
libpcre3-dev:$arch \
|
||||
libpng-dev:$arch \
|
||||
libpython3-dev:$arch \
|
||||
libstdc++6:$arch \
|
||||
libtinfo-dev:$arch \
|
||||
libegl1-mesa-dev:$arch \
|
||||
libvulkan-dev:$arch \
|
||||
libxcb-keysyms1-dev:$arch \
|
||||
libpython3-dev:$arch \
|
||||
python3-dev \
|
||||
qt5-default \
|
||||
qt5-qmake \
|
||||
qtbase5-dev:$arch \
|
||||
"
|
||||
|
||||
if [[ $arch == "arm64" ]]; then
|
||||
mkdir -p /baremetal-files
|
||||
pushd /baremetal-files
|
||||
apt-get install -y --no-remove $BAREMETAL_EPHEMERAL
|
||||
|
||||
wget ${ARTIFACTS_URL}/Image
|
||||
wget ${ARTIFACTS_URL}/Image.gz
|
||||
wget ${ARTIFACTS_URL}/cheza-kernel
|
||||
mkdir /var/cache/apt/archives/$arch
|
||||
|
||||
DEVICE_TREES=""
|
||||
DEVICE_TREES="$DEVICE_TREES apq8016-sbc.dtb"
|
||||
DEVICE_TREES="$DEVICE_TREES apq8096-db820c.dtb"
|
||||
DEVICE_TREES="$DEVICE_TREES tegra210-p3450-0000.dtb"
|
||||
############### Create cross-files
|
||||
|
||||
for DTB in $DEVICE_TREES; do
|
||||
wget ${ARTIFACTS_URL}/$DTB
|
||||
done
|
||||
. .gitlab-ci/create-cross-file.sh $arch
|
||||
|
||||
popd
|
||||
elif [[ $arch == "armhf" ]]; then
|
||||
mkdir -p /baremetal-files
|
||||
pushd /baremetal-files
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
wget ${ARTIFACTS_URL}/zImage
|
||||
############### Create rootfs
|
||||
KERNEL_URL=https://github.com/anholt/linux/archive/cheza-pagetables-2020-09-04.tar.gz
|
||||
|
||||
DEVICE_TREES="imx6q-cubox-i.dtb"
|
||||
DEBIAN_ARCH=$arch INCLUDE_VK_CTS=1 . .gitlab-ci/container/lava_build.sh
|
||||
|
||||
for DTB in $DEVICE_TREES; do
|
||||
wget ${ARTIFACTS_URL}/$DTB
|
||||
done
|
||||
############### Uninstall the build software
|
||||
|
||||
popd
|
||||
fi
|
||||
apt-get purge -y $BAREMETAL_EPHEMERAL
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
APITRACE_VERSION="790380e05854d5c9d315555444ffcc7acb8f4037"
|
||||
|
||||
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
|
||||
pushd /apitrace
|
||||
git checkout "$APITRACE_VERSION"
|
||||
git submodule update --init --depth 1 --recursive
|
||||
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on $EXTRA_CMAKE_ARGS
|
||||
cmake --build _build --parallel --target apitrace eglretrace
|
||||
mkdir build
|
||||
cp _build/apitrace build
|
||||
cp _build/eglretrace build
|
||||
${STRIP_CMD:-strip} build/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
@@ -1,42 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
SCRIPT_DIR="$(pwd)"
|
||||
|
||||
CROSVM_VERSION=c7cd0e0114c8363b884ba56d8e12adee718dcc93
|
||||
git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/chromiumos/platform/crosvm /platform/crosvm
|
||||
pushd /platform/crosvm
|
||||
git checkout "$CROSVM_VERSION"
|
||||
git submodule update --init
|
||||
# Apply all crosvm patches for Mesa CI
|
||||
cat "$SCRIPT_DIR"/.gitlab-ci/container/build-crosvm_*.patch |
|
||||
patch -p1
|
||||
|
||||
VIRGLRENDERER_VERSION=dd301caf7e05ec9c09634fb7872067542aad89b7
|
||||
rm -rf third_party/virglrenderer
|
||||
git clone --single-branch -b master --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
|
||||
pushd third_party/virglrenderer
|
||||
git checkout "$VIRGLRENDERER_VERSION"
|
||||
meson build/ $EXTRA_MESON_ARGS
|
||||
ninja -C build install
|
||||
popd
|
||||
|
||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
bindgen \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--root /usr/local \
|
||||
--version 0.60.1 \
|
||||
$EXTRA_CARGO_ARGS
|
||||
|
||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--locked \
|
||||
--features 'default-no-sandbox gpu x virgl_renderer virgl_renderer_next' \
|
||||
--path . \
|
||||
--root /usr/local \
|
||||
$EXTRA_CARGO_ARGS
|
||||
|
||||
popd
|
||||
|
||||
rm -rf /platform/crosvm
|
@@ -1,43 +0,0 @@
|
||||
From 3c57ec558bccc67fd53363c23deea20646be5c47 Mon Sep 17 00:00:00 2001
|
||||
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
||||
Date: Wed, 17 Nov 2021 10:18:04 +0100
|
||||
Subject: [PATCH] Hack syslog out
|
||||
|
||||
It's causing stability problems when running several Crosvm instances in
|
||||
parallel.
|
||||
|
||||
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
||||
---
|
||||
base/src/unix/linux/syslog.rs | 2 +-
|
||||
common/sys_util/src/linux/syslog.rs | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/base/src/unix/linux/syslog.rs b/base/src/unix/linux/syslog.rs
|
||||
index 05972a3a..f0db3781 100644
|
||||
--- a/base/src/unix/linux/syslog.rs
|
||||
+++ b/base/src/unix/linux/syslog.rs
|
||||
@@ -35,7 +35,7 @@ pub struct PlatformSyslog {
|
||||
impl Syslog for PlatformSyslog {
|
||||
fn new() -> Result<Self, Error> {
|
||||
Ok(Self {
|
||||
- socket: Some(openlog_and_get_socket()?),
|
||||
+ socket: None,
|
||||
})
|
||||
}
|
||||
|
||||
diff --git a/common/sys_util/src/linux/syslog.rs b/common/sys_util/src/linux/syslog.rs
|
||||
index 05972a3a..f0db3781 100644
|
||||
--- a/common/sys_util/src/linux/syslog.rs
|
||||
+++ b/common/sys_util/src/linux/syslog.rs
|
||||
@@ -35,7 +35,7 @@ pub struct PlatformSyslog {
|
||||
impl Syslog for PlatformSyslog {
|
||||
fn new() -> Result<Self, Error> {
|
||||
Ok(Self {
|
||||
- socket: Some(openlog_and_get_socket()?),
|
||||
+ socket: None,
|
||||
})
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
if [ -n "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
|
||||
# Build and install from source
|
||||
DEQP_RUNNER_CARGO_ARGS="--git ${DEQP_RUNNER_GIT_URL:-https://gitlab.freedesktop.org/anholt/deqp-runner.git}"
|
||||
|
||||
if [ -n "${DEQP_RUNNER_GIT_TAG}" ]; then
|
||||
DEQP_RUNNER_CARGO_ARGS="--tag ${DEQP_RUNNER_GIT_TAG} ${DEQP_RUNNER_CARGO_ARGS}"
|
||||
else
|
||||
DEQP_RUNNER_CARGO_ARGS="--rev ${DEQP_RUNNER_GIT_REV} ${DEQP_RUNNER_CARGO_ARGS}"
|
||||
fi
|
||||
|
||||
DEQP_RUNNER_CARGO_ARGS="${DEQP_RUNNER_CARGO_ARGS} ${EXTRA_CARGO_ARGS}"
|
||||
else
|
||||
# Install from package registry
|
||||
DEQP_RUNNER_CARGO_ARGS="--version 0.13.1 ${EXTRA_CARGO_ARGS} -- deqp-runner"
|
||||
fi
|
||||
|
||||
cargo install --locked \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--root /usr/local \
|
||||
${DEQP_RUNNER_CARGO_ARGS}
|
@@ -1,93 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
git clone \
|
||||
https://github.com/KhronosGroup/VK-GL-CTS.git \
|
||||
-b vulkan-cts-1.3.3.0 \
|
||||
--depth 1 \
|
||||
/VK-GL-CTS
|
||||
pushd /VK-GL-CTS
|
||||
|
||||
# Apply a patch to update zlib link to an available version.
|
||||
# vulkan-cts-1.3.3.0 uses zlib 1.2.12 which was removed from zlib server due to
|
||||
# a CVE. See https://zlib.net/
|
||||
# FIXME: Remove this patch when uprev to 1.3.4.0+
|
||||
wget -O- https://github.com/KhronosGroup/VK-GL-CTS/commit/6bb2e7d64261bedb503947b1b251b1eeeb49be73.patch |
|
||||
git am -
|
||||
|
||||
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
|
||||
# libpng (sigh). The archives get their checksums checked anyway, and git
|
||||
# always goes through ssh or https.
|
||||
python3 external/fetch_sources.py --insecure
|
||||
|
||||
mkdir -p /deqp
|
||||
|
||||
# Save the testlog stylesheets:
|
||||
cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp
|
||||
popd
|
||||
|
||||
pushd /deqp
|
||||
# When including EGL/X11 testing, do that build first and save off its
|
||||
# deqp-egl binary.
|
||||
cmake -S /VK-GL-CTS -B . -G Ninja \
|
||||
-DDEQP_TARGET=x11_egl_glx \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
$EXTRA_CMAKE_ARGS
|
||||
ninja modules/egl/deqp-egl
|
||||
cp /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-x11
|
||||
|
||||
|
||||
cmake -S /VK-GL-CTS -B . -G Ninja \
|
||||
-DDEQP_TARGET=${DEQP_TARGET:-x11_glx} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
$EXTRA_CMAKE_ARGS
|
||||
ninja
|
||||
|
||||
mv /deqp/modules/egl/deqp-egl-x11 /deqp/modules/egl/deqp-egl
|
||||
|
||||
# Copy out the mustpass lists we want.
|
||||
mkdir /deqp/mustpass
|
||||
for mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/main/vk-default.txt) ; do
|
||||
cat /VK-GL-CTS/external/vulkancts/mustpass/main/$mustpass \
|
||||
>> /deqp/mustpass/vk-master.txt
|
||||
done
|
||||
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/aosp_mustpass/3.2.6.x/*.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-master.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/khronos_mustpass/3.2.6.x/*-master.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass/4.6.1.x/*-master.txt \
|
||||
/deqp/mustpass/.
|
||||
|
||||
# Save *some* executor utils, but otherwise strip things down
|
||||
# to reduct deqp build size:
|
||||
mkdir /deqp/executor.save
|
||||
cp /deqp/executor/testlog-to-* /deqp/executor.save
|
||||
rm -rf /deqp/executor
|
||||
mv /deqp/executor.save /deqp/executor
|
||||
|
||||
# Remove other mustpass files, since we saved off the ones we wanted to conventient locations above.
|
||||
rm -rf /deqp/external/openglcts/modules/gl_cts/data/mustpass
|
||||
rm -rf /deqp/external/vulkancts/modules/vulkan/vk-master*
|
||||
rm -rf /deqp/external/vulkancts/modules/vulkan/vk-default
|
||||
|
||||
rm -rf /deqp/external/openglcts/modules/cts-runner
|
||||
rm -rf /deqp/modules/internal
|
||||
rm -rf /deqp/execserver
|
||||
rm -rf /deqp/framework
|
||||
find -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' | xargs rm -rf
|
||||
${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
|
||||
${STRIP_CMD:-strip} external/openglcts/modules/glcts
|
||||
${STRIP_CMD:-strip} modules/*/deqp-*
|
||||
du -sh *
|
||||
rm -rf /VK-GL-CTS
|
||||
popd
|
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git clone https://github.com/ValveSoftware/Fossilize.git
|
||||
cd Fossilize
|
||||
git checkout 16fba1b8b5d9310126bb02323d7bae3227338461
|
||||
git submodule update --init
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -S .. -B . -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
ninja -C . install
|
||||
cd ../..
|
||||
rm -rf Fossilize
|
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
GFXRECONSTRUCT_VERSION=5ed3caeecc46e976c4df31e263df8451ae176c26
|
||||
|
||||
git clone https://github.com/LunarG/gfxreconstruct.git \
|
||||
--single-branch \
|
||||
-b master \
|
||||
--no-checkout \
|
||||
/gfxreconstruct
|
||||
pushd /gfxreconstruct
|
||||
git checkout "$GFXRECONSTRUCT_VERSION"
|
||||
git submodule update --init
|
||||
git submodule update
|
||||
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/gfxreconstruct/build -DBUILD_WERROR=OFF
|
||||
cmake --build _build --parallel --target tools/{replay,info}/install/strip
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
PARALLEL_DEQP_RUNNER_VERSION=fe557794b5dadd8dbf0eae403296625e03bda18a
|
||||
|
||||
git clone https://gitlab.freedesktop.org/mesa/parallel-deqp-runner --single-branch -b master --no-checkout /parallel-deqp-runner
|
||||
pushd /parallel-deqp-runner
|
||||
git checkout "$PARALLEL_DEQP_RUNNER_VERSION"
|
||||
meson . _build
|
||||
ninja -C _build hang-detection
|
||||
mkdir -p build/bin
|
||||
install _build/hang-detection build/bin
|
||||
strip build/bin/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
@@ -1,51 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
mkdir -p kernel
|
||||
wget -qO- ${KERNEL_URL} | tar -xj --strip-components=1 -C kernel
|
||||
pushd kernel
|
||||
|
||||
# The kernel doesn't like the gold linker (or the old lld in our debians).
|
||||
# Sneak in some override symlinks during kernel build until we can update
|
||||
# debian (they'll get blown away by the rm of the kernel dir at the end).
|
||||
mkdir -p ld-links
|
||||
for i in /usr/bin/*-ld /usr/bin/ld; do
|
||||
i=`basename $i`
|
||||
ln -sf /usr/bin/$i.bfd ld-links/$i
|
||||
done
|
||||
export PATH=`pwd`/ld-links:$PATH
|
||||
|
||||
export LOCALVERSION="`basename $KERNEL_URL`"
|
||||
./scripts/kconfig/merge_config.sh ${DEFCONFIG} ../.gitlab-ci/container/${KERNEL_ARCH}.config
|
||||
make ${KERNEL_IMAGE_NAME}
|
||||
for image in ${KERNEL_IMAGE_NAME}; do
|
||||
cp arch/${KERNEL_ARCH}/boot/${image} /lava-files/.
|
||||
done
|
||||
|
||||
if [[ -n ${DEVICE_TREES} ]]; then
|
||||
make dtbs
|
||||
cp ${DEVICE_TREES} /lava-files/.
|
||||
fi
|
||||
|
||||
if [[ ${DEBIAN_ARCH} = "amd64" || ${DEBIAN_ARCH} = "arm64" ]]; then
|
||||
make modules
|
||||
INSTALL_MOD_PATH=/lava-files/rootfs-${DEBIAN_ARCH}/ make modules_install
|
||||
fi
|
||||
|
||||
if [[ ${DEBIAN_ARCH} = "arm64" ]]; then
|
||||
make Image.lzma
|
||||
mkimage \
|
||||
-f auto \
|
||||
-A arm \
|
||||
-O linux \
|
||||
-d arch/arm64/boot/Image.lzma \
|
||||
-C lzma\
|
||||
-b arch/arm64/boot/dts/qcom/sdm845-cheza-r3.dtb \
|
||||
/lava-files/cheza-kernel
|
||||
KERNEL_IMAGE_NAME+=" cheza-kernel"
|
||||
fi
|
||||
|
||||
popd
|
||||
rm -rf kernel
|
||||
|
@@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
export LLVM_CONFIG="llvm-config-11"
|
||||
|
||||
$LLVM_CONFIG --version
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
git clone \
|
||||
https://github.com/llvm/llvm-project \
|
||||
--depth 1 \
|
||||
-b llvmorg-12.0.0-rc3 \
|
||||
/llvm-project
|
||||
|
||||
mkdir /libclc
|
||||
pushd /libclc
|
||||
cmake -S /llvm-project/libclc -B . -G Ninja -DLLVM_CONFIG=$LLVM_CONFIG -DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_SPIRV=/usr/bin/llvm-spirv
|
||||
ninja
|
||||
ninja install
|
||||
popd
|
||||
|
||||
# workaroud cmake vs debian packaging.
|
||||
mkdir -p /usr/lib/clc
|
||||
ln -s /usr/share/clc/spirv64-mesa3d-.spv /usr/lib/clc/
|
||||
ln -s /usr/share/clc/spirv-mesa3d-.spv /usr/lib/clc/
|
||||
|
||||
du -sh *
|
||||
rm -rf /libclc /llvm-project
|
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
|
||||
pushd /piglit
|
||||
git checkout b2c9d8f56b45d79f804f4cb5ac62520f0edd8988
|
||||
|
||||
# TODO: Remove the following patch when piglit commit got past
|
||||
# 1cd716180cfb6ef0c1fc54702460ef49e5115791
|
||||
git apply $OLDPWD/.gitlab-ci/piglit/build-piglit_backport-s3-migration.diff
|
||||
|
||||
patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
|
||||
cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS $EXTRA_CMAKE_ARGS
|
||||
ninja $PIGLIT_BUILD_TARGETS
|
||||
find -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' | xargs rm -rf
|
||||
rm -rf target_api
|
||||
if [ "x$PIGLIT_BUILD_TARGETS" = "xpiglit_replayer" ]; then
|
||||
find ! -regex "^\.$" \
|
||||
! -regex "^\.\/piglit.*" \
|
||||
! -regex "^\.\/framework.*" \
|
||||
! -regex "^\.\/bin$" \
|
||||
! -regex "^\.\/bin\/replayer\.py" \
|
||||
! -regex "^\.\/templates.*" \
|
||||
! -regex "^\.\/tests$" \
|
||||
! -regex "^\.\/tests\/replay\.py" 2>/dev/null | xargs rm -rf
|
||||
fi
|
||||
popd
|
@@ -1,97 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2022 Collabora Limited
|
||||
# Author: Guilherme Gallo <guilherme.gallo@collabora.com>
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
create_gn_args() {
|
||||
# gn can be configured to cross-compile skia and its tools
|
||||
# It is important to set the target_cpu to guarantee the intended target
|
||||
# machine
|
||||
cp "${BASE_ARGS_GN_FILE}" "${SKQP_OUT_DIR}"/args.gn
|
||||
echo "target_cpu = \"${SKQP_ARCH}\"" >> "${SKQP_OUT_DIR}"/args.gn
|
||||
}
|
||||
|
||||
|
||||
download_skia_source() {
|
||||
if [ -z ${SKIA_DIR+x} ]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Skia cloned from https://android.googlesource.com/platform/external/skqp
|
||||
# has all needed assets tracked on git-fs
|
||||
SKQP_REPO=https://android.googlesource.com/platform/external/skqp
|
||||
SKQP_BRANCH=android-cts-11.0_r7
|
||||
|
||||
git clone --branch "${SKQP_BRANCH}" --depth 1 "${SKQP_REPO}" "${SKIA_DIR}"
|
||||
}
|
||||
|
||||
set -ex
|
||||
|
||||
SCRIPT_DIR=$(realpath "$(dirname "$0")")
|
||||
SKQP_PATCH_DIR="${SCRIPT_DIR}"
|
||||
BASE_ARGS_GN_FILE="${SCRIPT_DIR}/build-skqp_base.gn"
|
||||
|
||||
SKQP_ARCH=${SKQP_ARCH:-x64}
|
||||
SKIA_DIR=${SKIA_DIR:-$(mktemp -d)}
|
||||
SKQP_OUT_DIR=${SKIA_DIR}/out/${SKQP_ARCH}
|
||||
SKQP_INSTALL_DIR=/skqp
|
||||
SKQP_ASSETS_DIR="${SKQP_INSTALL_DIR}/assets"
|
||||
SKQP_BINARIES=(skqp)
|
||||
|
||||
download_skia_source
|
||||
|
||||
pushd "${SKIA_DIR}"
|
||||
|
||||
# Apply all skqp patches for Mesa CI
|
||||
cat "${SKQP_PATCH_DIR}"/build-skqp_*.patch |
|
||||
patch -p1
|
||||
|
||||
# Fetch some needed build tools needed to build skia/skqp.
|
||||
# Basically, it clones repositories with commits SHAs from ${SKIA_DIR}/DEPS
|
||||
# directory.
|
||||
python tools/git-sync-deps
|
||||
|
||||
mkdir -p "${SKQP_OUT_DIR}"
|
||||
mkdir -p "${SKQP_INSTALL_DIR}"
|
||||
|
||||
create_gn_args
|
||||
|
||||
# Build and install skqp binaries
|
||||
bin/gn gen "${SKQP_OUT_DIR}"
|
||||
|
||||
for BINARY in "${SKQP_BINARIES[@]}"
|
||||
do
|
||||
/usr/bin/ninja -C "${SKQP_OUT_DIR}" "${BINARY}"
|
||||
# Strip binary, since gn is not stripping it even when `is_debug == false`
|
||||
${STRIP_CMD:-strip} "${SKQP_OUT_DIR}/${BINARY}"
|
||||
install -m 0755 "${SKQP_OUT_DIR}/${BINARY}" "${SKQP_INSTALL_DIR}"
|
||||
done
|
||||
|
||||
# Move assets to the target directory, which will reside in rootfs.
|
||||
mv platform_tools/android/apps/skqp/src/main/assets/ "${SKQP_ASSETS_DIR}"
|
||||
|
||||
popd
|
||||
rm -Rf "${SKIA_DIR}"
|
||||
|
||||
set +ex
|
@@ -1,13 +0,0 @@
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index d2b1407..7b60c90 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -144,7 +144,7 @@ config("skia_public") {
|
||||
|
||||
# Skia internal APIs, used by Skia itself and a few test tools.
|
||||
config("skia_private") {
|
||||
- visibility = [ ":*" ]
|
||||
+ visibility = [ "*" ]
|
||||
|
||||
include_dirs = [
|
||||
"include/private",
|
@@ -1,47 +0,0 @@
|
||||
cc = "clang"
|
||||
cxx = "clang++"
|
||||
|
||||
extra_cflags = [ "-DSK_ENABLE_DUMP_GPU", "-DSK_BUILD_FOR_SKQP" ]
|
||||
extra_cflags_cc = [
|
||||
"-Wno-error",
|
||||
|
||||
# skqp build process produces a lot of compilation warnings, silencing
|
||||
# most of them to remove clutter and avoid the CI job log to exceed the
|
||||
# maximum size
|
||||
|
||||
# GCC flags
|
||||
"-Wno-redundant-move",
|
||||
"-Wno-suggest-override",
|
||||
"-Wno-class-memaccess",
|
||||
"-Wno-deprecated-copy",
|
||||
"-Wno-uninitialized",
|
||||
|
||||
# Clang flags
|
||||
"-Wno-macro-redefined",
|
||||
"-Wno-anon-enum-enum-conversion",
|
||||
"-Wno-suggest-destructor-override",
|
||||
"-Wno-return-std-move-in-c++11",
|
||||
"-Wno-extra-semi-stmt",
|
||||
]
|
||||
|
||||
cc_wrapper = "ccache"
|
||||
|
||||
is_debug = false
|
||||
|
||||
skia_enable_fontmgr_android = false
|
||||
skia_enable_fontmgr_empty = true
|
||||
skia_enable_pdf = false
|
||||
skia_enable_skottie = false
|
||||
|
||||
skia_skqp_global_error_tolerance = 8
|
||||
skia_tools_require_resources = true
|
||||
|
||||
skia_use_dng_sdk = false
|
||||
skia_use_expat = true
|
||||
skia_use_icu = false
|
||||
skia_use_libheif = false
|
||||
skia_use_lua = false
|
||||
skia_use_piex = false
|
||||
skia_use_vulkan = true
|
||||
|
||||
target_os = "linux"
|
@@ -1,68 +0,0 @@
|
||||
diff --git a/bin/fetch-gn b/bin/fetch-gn
|
||||
index d5e94a2..59c4591 100755
|
||||
--- a/bin/fetch-gn
|
||||
+++ b/bin/fetch-gn
|
||||
@@ -5,39 +5,44 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
-import hashlib
|
||||
import os
|
||||
+import platform
|
||||
import shutil
|
||||
import stat
|
||||
import sys
|
||||
-import urllib2
|
||||
+import tempfile
|
||||
+import zipfile
|
||||
+
|
||||
+if sys.version_info[0] < 3:
|
||||
+ from urllib2 import urlopen
|
||||
+else:
|
||||
+ from urllib.request import urlopen
|
||||
|
||||
os.chdir(os.path.join(os.path.dirname(__file__), os.pardir))
|
||||
|
||||
-dst = 'bin/gn.exe' if 'win32' in sys.platform else 'bin/gn'
|
||||
+gnzip = os.path.join(tempfile.mkdtemp(), 'gn.zip')
|
||||
+with open(gnzip, 'wb') as f:
|
||||
+ OS = {'darwin': 'mac', 'linux': 'linux', 'linux2': 'linux', 'win32': 'windows'}[sys.platform]
|
||||
+ cpu = {'amd64': 'amd64', 'arm64': 'arm64', 'x86_64': 'amd64', 'aarch64': 'arm64'}[platform.machine().lower()]
|
||||
|
||||
-sha1 = '2f27ff0b6118e5886df976da5effa6003d19d1ce' if 'linux' in sys.platform else \
|
||||
- '9be792dd9010ce303a9c3a497a67bcc5ac8c7666' if 'darwin' in sys.platform else \
|
||||
- 'eb69be2d984b4df60a8c21f598135991f0ad1742' # Windows
|
||||
+ rev = 'd62642c920e6a0d1756316d225a90fd6faa9e21e'
|
||||
+ url = 'https://chrome-infra-packages.appspot.com/dl/gn/gn/{}-{}/+/git_revision:{}'.format(
|
||||
+ OS,cpu,rev)
|
||||
+ f.write(urlopen(url).read())
|
||||
|
||||
-def sha1_of_file(path):
|
||||
- h = hashlib.sha1()
|
||||
- if os.path.isfile(path):
|
||||
- with open(path, 'rb') as f:
|
||||
- h.update(f.read())
|
||||
- return h.hexdigest()
|
||||
+gn = 'gn.exe' if 'win32' in sys.platform else 'gn'
|
||||
+with zipfile.ZipFile(gnzip, 'r') as f:
|
||||
+ f.extract(gn, 'bin')
|
||||
|
||||
-if sha1_of_file(dst) != sha1:
|
||||
- with open(dst, 'wb') as f:
|
||||
- f.write(urllib2.urlopen('https://chromium-gn.storage-download.googleapis.com/' + sha1).read())
|
||||
+gn = os.path.join('bin', gn)
|
||||
|
||||
- os.chmod(dst, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
|
||||
- stat.S_IRGRP | stat.S_IXGRP |
|
||||
- stat.S_IROTH | stat.S_IXOTH )
|
||||
+os.chmod(gn, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
|
||||
+ stat.S_IRGRP | stat.S_IXGRP |
|
||||
+ stat.S_IROTH | stat.S_IXOTH )
|
||||
|
||||
# We'll also copy to a path that depot_tools' GN wrapper will expect to find the binary.
|
||||
copy_path = 'buildtools/linux64/gn' if 'linux' in sys.platform else \
|
||||
'buildtools/mac/gn' if 'darwin' in sys.platform else \
|
||||
'buildtools/win/gn.exe'
|
||||
if os.path.isdir(os.path.dirname(copy_path)):
|
||||
- shutil.copy(dst, copy_path)
|
||||
+ shutil.copy(gn, copy_path)
|
@@ -1,142 +0,0 @@
|
||||
Patch based from diff with skia repository from commit
|
||||
013397884c73959dc07cb0a26ee742b1cdfbda8a
|
||||
|
||||
Adds support for Python3, but removes the constraint of only SHA based refs in
|
||||
DEPS
|
||||
diff --git a/tools/git-sync-deps b/tools/git-sync-deps
|
||||
index c7379c0b5c..f63d4d9ccf 100755
|
||||
--- a/tools/git-sync-deps
|
||||
+++ b/tools/git-sync-deps
|
||||
@@ -43,7 +43,7 @@ def git_executable():
|
||||
A string suitable for passing to subprocess functions, or None.
|
||||
"""
|
||||
envgit = os.environ.get('GIT_EXECUTABLE')
|
||||
- searchlist = ['git']
|
||||
+ searchlist = ['git', 'git.bat']
|
||||
if envgit:
|
||||
searchlist.insert(0, envgit)
|
||||
with open(os.devnull, 'w') as devnull:
|
||||
@@ -94,21 +94,25 @@ def is_git_toplevel(git, directory):
|
||||
try:
|
||||
toplevel = subprocess.check_output(
|
||||
[git, 'rev-parse', '--show-toplevel'], cwd=directory).strip()
|
||||
- return os.path.realpath(directory) == os.path.realpath(toplevel)
|
||||
+ return os.path.realpath(directory) == os.path.realpath(toplevel.decode())
|
||||
except subprocess.CalledProcessError:
|
||||
return False
|
||||
|
||||
|
||||
-def status(directory, checkoutable):
|
||||
- def truncate(s, length):
|
||||
+def status(directory, commithash, change):
|
||||
+ def truncate_beginning(s, length):
|
||||
+ return s if len(s) <= length else '...' + s[-(length-3):]
|
||||
+ def truncate_end(s, length):
|
||||
return s if len(s) <= length else s[:(length - 3)] + '...'
|
||||
+
|
||||
dlen = 36
|
||||
- directory = truncate(directory, dlen)
|
||||
- checkoutable = truncate(checkoutable, 40)
|
||||
- sys.stdout.write('%-*s @ %s\n' % (dlen, directory, checkoutable))
|
||||
+ directory = truncate_beginning(directory, dlen)
|
||||
+ commithash = truncate_end(commithash, 40)
|
||||
+ symbol = '>' if change else '@'
|
||||
+ sys.stdout.write('%-*s %s %s\n' % (dlen, directory, symbol, commithash))
|
||||
|
||||
|
||||
-def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
||||
+def git_checkout_to_directory(git, repo, commithash, directory, verbose):
|
||||
"""Checkout (and clone if needed) a Git repository.
|
||||
|
||||
Args:
|
||||
@@ -117,8 +121,7 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
||||
repo (string) the location of the repository, suitable
|
||||
for passing to `git clone`.
|
||||
|
||||
- checkoutable (string) a tag, branch, or commit, suitable for
|
||||
- passing to `git checkout`
|
||||
+ commithash (string) a commit, suitable for passing to `git checkout`
|
||||
|
||||
directory (string) the path into which the repository
|
||||
should be checked out.
|
||||
@@ -129,7 +132,12 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
||||
"""
|
||||
if not os.path.isdir(directory):
|
||||
subprocess.check_call(
|
||||
- [git, 'clone', '--quiet', repo, directory])
|
||||
+ [git, 'clone', '--quiet', '--no-checkout', repo, directory])
|
||||
+ subprocess.check_call([git, 'checkout', '--quiet', commithash],
|
||||
+ cwd=directory)
|
||||
+ if verbose:
|
||||
+ status(directory, commithash, True)
|
||||
+ return
|
||||
|
||||
if not is_git_toplevel(git, directory):
|
||||
# if the directory exists, but isn't a git repo, you will modify
|
||||
@@ -145,11 +153,11 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
||||
with open(os.devnull, 'w') as devnull:
|
||||
# If this fails, we will fetch before trying again. Don't spam user
|
||||
# with error infomation.
|
||||
- if 0 == subprocess.call([git, 'checkout', '--quiet', checkoutable],
|
||||
+ if 0 == subprocess.call([git, 'checkout', '--quiet', commithash],
|
||||
cwd=directory, stderr=devnull):
|
||||
# if this succeeds, skip slow `git fetch`.
|
||||
if verbose:
|
||||
- status(directory, checkoutable) # Success.
|
||||
+ status(directory, commithash, False) # Success.
|
||||
return
|
||||
|
||||
# If the repo has changed, always force use of the correct repo.
|
||||
@@ -159,18 +167,24 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
||||
|
||||
subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory)
|
||||
|
||||
- subprocess.check_call([git, 'checkout', '--quiet', checkoutable], cwd=directory)
|
||||
+ subprocess.check_call([git, 'checkout', '--quiet', commithash], cwd=directory)
|
||||
|
||||
if verbose:
|
||||
- status(directory, checkoutable) # Success.
|
||||
+ status(directory, commithash, True) # Success.
|
||||
|
||||
|
||||
def parse_file_to_dict(path):
|
||||
dictionary = {}
|
||||
- execfile(path, dictionary)
|
||||
+ with open(path) as f:
|
||||
+ exec('def Var(x): return vars[x]\n' + f.read(), dictionary)
|
||||
return dictionary
|
||||
|
||||
|
||||
+def is_sha1_sum(s):
|
||||
+ """SHA1 sums are 160 bits, encoded as lowercase hexadecimal."""
|
||||
+ return len(s) == 40 and all(c in '0123456789abcdef' for c in s)
|
||||
+
|
||||
+
|
||||
def git_sync_deps(deps_file_path, command_line_os_requests, verbose):
|
||||
"""Grab dependencies, with optional platform support.
|
||||
|
||||
@@ -204,19 +218,19 @@ def git_sync_deps(deps_file_path, command_line_os_requests, verbose):
|
||||
raise Exception('%r is parent of %r' % (other_dir, directory))
|
||||
list_of_arg_lists = []
|
||||
for directory in sorted(dependencies):
|
||||
- if not isinstance(dependencies[directory], basestring):
|
||||
+ if not isinstance(dependencies[directory], str):
|
||||
if verbose:
|
||||
- print 'Skipping "%s".' % directory
|
||||
+ sys.stdout.write( 'Skipping "%s".\n' % directory)
|
||||
continue
|
||||
if '@' in dependencies[directory]:
|
||||
- repo, checkoutable = dependencies[directory].split('@', 1)
|
||||
+ repo, commithash = dependencies[directory].split('@', 1)
|
||||
else:
|
||||
- raise Exception("please specify commit or tag")
|
||||
+ raise Exception("please specify commit")
|
||||
|
||||
relative_directory = os.path.join(deps_file_directory, directory)
|
||||
|
||||
list_of_arg_lists.append(
|
||||
- (git, repo, checkoutable, relative_directory, verbose))
|
||||
+ (git, repo, commithash, relative_directory, verbose))
|
||||
|
||||
multithread(git_checkout_to_directory, list_of_arg_lists)
|
||||
|
@@ -1,41 +0,0 @@
|
||||
diff --git a/tools/skqp/src/skqp.cpp b/tools/skqp/src/skqp.cpp
|
||||
index 50ed9db01d..938217000d 100644
|
||||
--- a/tools/skqp/src/skqp.cpp
|
||||
+++ b/tools/skqp/src/skqp.cpp
|
||||
@@ -448,7 +448,7 @@ inline void write(SkWStream* wStream, const T& text) {
|
||||
|
||||
void SkQP::makeReport() {
|
||||
SkASSERT_RELEASE(fAssetManager);
|
||||
- int glesErrorCount = 0, vkErrorCount = 0, gles = 0, vk = 0;
|
||||
+ int glErrorCount = 0, glesErrorCount = 0, vkErrorCount = 0, gl = 0, gles = 0, vk = 0;
|
||||
|
||||
if (!sk_isdir(fReportDirectory.c_str())) {
|
||||
SkDebugf("Report destination does not exist: '%s'\n", fReportDirectory.c_str());
|
||||
@@ -460,6 +460,7 @@ void SkQP::makeReport() {
|
||||
htmOut.writeText(kDocHead);
|
||||
for (const SkQP::RenderResult& run : fRenderResults) {
|
||||
switch (run.fBackend) {
|
||||
+ case SkQP::SkiaBackend::kGL: ++gl; break;
|
||||
case SkQP::SkiaBackend::kGLES: ++gles; break;
|
||||
case SkQP::SkiaBackend::kVulkan: ++vk; break;
|
||||
default: break;
|
||||
@@ -477,15 +478,17 @@ void SkQP::makeReport() {
|
||||
}
|
||||
write(&htmOut, SkStringPrintf(" f(%s);\n", str.c_str()));
|
||||
switch (run.fBackend) {
|
||||
+ case SkQP::SkiaBackend::kGL: ++glErrorCount; break;
|
||||
case SkQP::SkiaBackend::kGLES: ++glesErrorCount; break;
|
||||
case SkQP::SkiaBackend::kVulkan: ++vkErrorCount; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
htmOut.writeText(kDocMiddle);
|
||||
- write(&htmOut, SkStringPrintf("<p>gles errors: %d (of %d)</br>\n"
|
||||
+ write(&htmOut, SkStringPrintf("<p>gl errors: %d (of %d)</br>\n"
|
||||
+ "gles errors: %d (of %d)</br>\n"
|
||||
"vk errors: %d (of %d)</p>\n",
|
||||
- glesErrorCount, gles, vkErrorCount, vk));
|
||||
+ glErrorCount, gl, glesErrorCount, gles, vkErrorCount, vk));
|
||||
htmOut.writeText(kDocTail);
|
||||
SkFILEWStream unitOut(SkOSPath::Join(fReportDirectory.c_str(), kUnitTestReportPath).c_str());
|
||||
SkASSERT_RELEASE(unitOut.isValid());
|
@@ -1,13 +0,0 @@
|
||||
diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn
|
||||
index 454334a..1797594 100644
|
||||
--- a/gn/BUILDCONFIG.gn
|
||||
+++ b/gn/BUILDCONFIG.gn
|
||||
@@ -80,7 +80,7 @@ if (current_cpu == "") {
|
||||
is_clang = is_android || is_ios || is_mac ||
|
||||
(cc == "clang" && cxx == "clang++") || clang_win != ""
|
||||
if (!is_clang && !is_win) {
|
||||
- is_clang = exec_script("gn/is_clang.py",
|
||||
+ is_clang = exec_script("//gn/is_clang.py",
|
||||
[
|
||||
cc,
|
||||
cxx,
|
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
git clone \
|
||||
https://github.com/intel/libva-utils.git \
|
||||
-b 2.13.0 \
|
||||
--depth 1 \
|
||||
/va-utils
|
||||
|
||||
pushd /va-utils
|
||||
meson build -D tests=true -Dprefix=/va $EXTRA_MESON_ARGS
|
||||
ninja -C build install
|
||||
popd
|
||||
rm -rf /va-utils
|
@@ -1,39 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
VKD3D_PROTON_COMMIT="5b73139f182d86cd58a757e4b5f0d4cfad96d319"
|
||||
|
||||
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
|
||||
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
|
||||
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-$VKD3D_PROTON_VERSION"
|
||||
|
||||
function build_arch {
|
||||
local arch="$1"
|
||||
shift
|
||||
|
||||
meson "$@" \
|
||||
-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
|
||||
build_arch 64
|
||||
build_arch 86
|
||||
popd
|
||||
|
||||
rm -rf "$VKD3D_PROTON_BUILD_DIR"
|
||||
rm -rf "$VKD3D_PROTON_SRC_DIR"
|
@@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
export LIBWAYLAND_VERSION="1.18.0"
|
||||
export WAYLAND_PROTOCOLS_VERSION="1.24"
|
||||
|
||||
git clone https://gitlab.freedesktop.org/wayland/wayland
|
||||
cd wayland
|
||||
git checkout "$LIBWAYLAND_VERSION"
|
||||
meson -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true _build
|
||||
ninja -C _build install
|
||||
cd ..
|
||||
rm -rf wayland
|
||||
|
||||
git clone https://gitlab.freedesktop.org/wayland/wayland-protocols
|
||||
cd wayland-protocols
|
||||
git checkout "$WAYLAND_PROTOCOLS_VERSION"
|
||||
meson _build
|
||||
ninja -C _build install
|
||||
cd ..
|
||||
rm -rf wayland-protocols
|
@@ -1,8 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test -f /etc/debian_version; then
|
||||
apt-get autoremove -y --purge
|
||||
fi
|
||||
apt-get autoremove -y --purge
|
||||
|
||||
# Clean up any build cache for rust.
|
||||
rm -rf /.cargo
|
||||
|
@@ -1,21 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test -f /etc/debian_version; then
|
||||
CCACHE_PATH=/usr/lib/ccache
|
||||
else
|
||||
CCACHE_PATH=/usr/lib64/ccache
|
||||
fi
|
||||
|
||||
# Common setup among container builds before we get to building code.
|
||||
|
||||
export CCACHE_COMPILERCHECK=content
|
||||
export CCACHE_COMPRESS=true
|
||||
export CCACHE_DIR=/cache/$CI_PROJECT_NAME/ccache
|
||||
export PATH=$CCACHE_PATH:$PATH
|
||||
export CCACHE_DIR=/cache/mesa/ccache
|
||||
export PATH=/usr/lib/ccache:$PATH
|
||||
|
||||
# CMake ignores $PATH, so we have to force CC/GCC to the ccache versions.
|
||||
export CC="${CCACHE_PATH}/gcc"
|
||||
export CXX="${CCACHE_PATH}/g++"
|
||||
# Watch out, you can't have spaces in here because the renderdoc build fails.
|
||||
export CC="/usr/lib/ccache/gcc"
|
||||
export CXX="/usr/lib/ccache/g++"
|
||||
|
||||
# Force linkers to gold, since it's so much faster for building. We can't use
|
||||
# lld because we're on old debian and it's buggy. ming fails meson builds
|
||||
@@ -34,9 +29,3 @@ chmod +x /usr/local/bin/ninja
|
||||
# Set MAKEFLAGS so that all make invocations in container builds include the
|
||||
# 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" \
|
||||
"wait_retry = 32" >> /etc/wgetrc
|
||||
|
@@ -1,293 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
if [ $DEBIAN_ARCH = arm64 ]; then
|
||||
ARCH_PACKAGES="firmware-qcom-media
|
||||
firmware-linux-nonfree
|
||||
libfontconfig1
|
||||
libgl1
|
||||
libglu1-mesa
|
||||
libvulkan-dev
|
||||
"
|
||||
elif [ $DEBIAN_ARCH = amd64 ]; then
|
||||
# Add llvm 13 to the build image
|
||||
apt-get -y install --no-install-recommends wget gnupg2 software-properties-common
|
||||
apt-key add /llvm-snapshot.gpg.key
|
||||
add-apt-repository "deb https://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main"
|
||||
|
||||
ARCH_PACKAGES="firmware-amd-graphics
|
||||
inetutils-syslogd
|
||||
iptables
|
||||
libcap2
|
||||
libfontconfig1
|
||||
libelf1
|
||||
libfdt1
|
||||
libgl1
|
||||
libglu1-mesa
|
||||
libllvm13
|
||||
libllvm11
|
||||
libva2
|
||||
libva-drm2
|
||||
libvulkan-dev
|
||||
socat
|
||||
spirv-tools
|
||||
sysvinit-core
|
||||
"
|
||||
fi
|
||||
|
||||
INSTALL_CI_FAIRY_PACKAGES="git
|
||||
python3-dev
|
||||
python3-pip
|
||||
python3-setuptools
|
||||
python3-wheel
|
||||
"
|
||||
|
||||
apt-get update
|
||||
apt-get -y install --no-install-recommends \
|
||||
$ARCH_PACKAGES \
|
||||
$INSTALL_CI_FAIRY_PACKAGES \
|
||||
$EXTRA_LOCAL_PACKAGES \
|
||||
bash \
|
||||
ca-certificates \
|
||||
firmware-realtek \
|
||||
initramfs-tools \
|
||||
libasan6 \
|
||||
libexpat1 \
|
||||
libpng16-16 \
|
||||
libpython3.9 \
|
||||
libsensors5 \
|
||||
libvulkan1 \
|
||||
libwaffle-1-0 \
|
||||
libx11-6 \
|
||||
libx11-xcb1 \
|
||||
libxcb-dri2-0 \
|
||||
libxcb-dri3-0 \
|
||||
libxcb-glx0 \
|
||||
libxcb-present0 \
|
||||
libxcb-randr0 \
|
||||
libxcb-shm0 \
|
||||
libxcb-sync1 \
|
||||
libxcb-xfixes0 \
|
||||
libxdamage1 \
|
||||
libxext6 \
|
||||
libxfixes3 \
|
||||
libxkbcommon0 \
|
||||
libxrender1 \
|
||||
libxshmfence1 \
|
||||
libxxf86vm1 \
|
||||
netcat-openbsd \
|
||||
python3 \
|
||||
python3-lxml \
|
||||
python3-mako \
|
||||
python3-numpy \
|
||||
python3-packaging \
|
||||
python3-pil \
|
||||
python3-renderdoc \
|
||||
python3-requests \
|
||||
python3-simplejson \
|
||||
python3-yaml \
|
||||
sntp \
|
||||
strace \
|
||||
waffle-utils \
|
||||
wget \
|
||||
xinit \
|
||||
xserver-xorg-core
|
||||
|
||||
# Needed for ci-fairy, this revision is able to upload files to
|
||||
# MinIO and doesn't depend on git
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
apt-get purge -y \
|
||||
$INSTALL_CI_FAIRY_PACKAGES
|
||||
|
||||
passwd root -d
|
||||
chsh -s /bin/sh
|
||||
|
||||
cat > /init <<EOF
|
||||
#!/bin/sh
|
||||
export PS1=lava-shell:
|
||||
exec sh
|
||||
EOF
|
||||
chmod +x /init
|
||||
|
||||
#######################################################################
|
||||
# Strip the image to a small minimal system without removing the debian
|
||||
# toolchain.
|
||||
|
||||
# Copy timezone file and remove tzdata package
|
||||
rm -rf /etc/localtime
|
||||
cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
||||
|
||||
UNNEEDED_PACKAGES="
|
||||
libfdisk1
|
||||
"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Removing unused packages
|
||||
for PACKAGE in ${UNNEEDED_PACKAGES}
|
||||
do
|
||||
echo ${PACKAGE}
|
||||
if ! apt-get remove --purge --yes "${PACKAGE}"
|
||||
then
|
||||
echo "WARNING: ${PACKAGE} isn't installed"
|
||||
fi
|
||||
done
|
||||
|
||||
apt-get autoremove --yes || true
|
||||
|
||||
# Dropping logs
|
||||
rm -rf /var/log/*
|
||||
|
||||
# Dropping documentation, localization, i18n files, etc
|
||||
rm -rf /usr/share/doc/*
|
||||
rm -rf /usr/share/locale/*
|
||||
rm -rf /usr/share/X11/locale/*
|
||||
rm -rf /usr/share/man
|
||||
rm -rf /usr/share/i18n/*
|
||||
rm -rf /usr/share/info/*
|
||||
rm -rf /usr/share/lintian/*
|
||||
rm -rf /usr/share/common-licenses/*
|
||||
rm -rf /usr/share/mime/*
|
||||
|
||||
# Dropping reportbug scripts
|
||||
rm -rf /usr/share/bug
|
||||
|
||||
# Drop udev hwdb not required on a stripped system
|
||||
rm -rf /lib/udev/hwdb.bin /lib/udev/hwdb.d/*
|
||||
|
||||
# Drop all gconv conversions && binaries
|
||||
rm -rf usr/bin/iconv
|
||||
rm -rf usr/sbin/iconvconfig
|
||||
rm -rf usr/lib/*/gconv/
|
||||
|
||||
# Remove libusb database
|
||||
rm -rf usr/sbin/update-usbids
|
||||
rm -rf var/lib/usbutils/usb.ids
|
||||
rm -rf usr/share/misc/usb.ids
|
||||
|
||||
rm -rf /root/.pip
|
||||
|
||||
#######################################################################
|
||||
# Crush into a minimal production image to be deployed via some type of image
|
||||
# updating system.
|
||||
# IMPORTANT: The Debian system is not longer functional at this point,
|
||||
# for example, apt and dpkg will stop working
|
||||
|
||||
UNNEEDED_PACKAGES="apt libapt-pkg6.0 "\
|
||||
"ncurses-bin ncurses-base libncursesw6 libncurses6 "\
|
||||
"perl-base "\
|
||||
"debconf libdebconfclient0 "\
|
||||
"e2fsprogs e2fslibs libfdisk1 "\
|
||||
"insserv "\
|
||||
"udev "\
|
||||
"init-system-helpers "\
|
||||
"cpio "\
|
||||
"passwd "\
|
||||
"libsemanage1 libsemanage-common "\
|
||||
"libsepol1 "\
|
||||
"gpgv "\
|
||||
"hostname "\
|
||||
"adduser "\
|
||||
"debian-archive-keyring "\
|
||||
"libegl1-mesa-dev "\
|
||||
"libegl-mesa0 "\
|
||||
"libgl1-mesa-dev "\
|
||||
"libgl1-mesa-dri "\
|
||||
"libglapi-mesa "\
|
||||
"libgles2-mesa-dev "\
|
||||
"libglx-mesa0 "\
|
||||
"mesa-common-dev "\
|
||||
"gnupg2 "\
|
||||
"software-properties-common " \
|
||||
|
||||
# Removing unneeded packages
|
||||
for PACKAGE in ${UNNEEDED_PACKAGES}
|
||||
do
|
||||
echo "Forcing removal of ${PACKAGE}"
|
||||
if ! dpkg --purge --force-remove-essential --force-depends "${PACKAGE}"
|
||||
then
|
||||
echo "WARNING: ${PACKAGE} isn't installed"
|
||||
fi
|
||||
done
|
||||
|
||||
# Show what's left package-wise before dropping dpkg itself
|
||||
COLUMNS=300 dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' | sort -k1,1n
|
||||
|
||||
# Drop dpkg
|
||||
dpkg --purge --force-remove-essential --force-depends dpkg
|
||||
|
||||
# No apt or dpkg, no need for its configuration archives
|
||||
rm -rf etc/apt
|
||||
rm -rf etc/dpkg
|
||||
|
||||
# Drop directories not part of ostree
|
||||
# Note that /var needs to exist as ostree bind mounts the deployment /var over
|
||||
# it
|
||||
rm -rf var/* opt srv share
|
||||
|
||||
# ca-certificates are in /etc drop the source
|
||||
rm -rf usr/share/ca-certificates
|
||||
|
||||
# No need for completions
|
||||
rm -rf usr/share/bash-completion
|
||||
|
||||
# No zsh, no need for comletions
|
||||
rm -rf usr/share/zsh/vendor-completions
|
||||
|
||||
# drop gcc python helpers
|
||||
rm -rf usr/share/gcc
|
||||
|
||||
# Drop sysvinit leftovers
|
||||
rm -rf etc/init.d
|
||||
rm -rf etc/rc[0-6S].d
|
||||
|
||||
# Drop upstart helpers
|
||||
rm -rf etc/init
|
||||
|
||||
# Various xtables helpers
|
||||
rm -rf usr/lib/xtables
|
||||
|
||||
# Drop all locales
|
||||
# TODO: only remaining locale is actually "C". Should we really remove it?
|
||||
rm -rf usr/lib/locale/*
|
||||
|
||||
# partition helpers
|
||||
rm -rf usr/sbin/*fdisk
|
||||
|
||||
# local compiler
|
||||
rm -rf usr/bin/localedef
|
||||
|
||||
# Systemd dns resolver
|
||||
find usr etc -name '*systemd-resolve*' -prune -exec rm -r {} \;
|
||||
|
||||
# Systemd network configuration
|
||||
find usr etc -name '*networkd*' -prune -exec rm -r {} \;
|
||||
|
||||
# systemd ntp client
|
||||
find usr etc -name '*timesyncd*' -prune -exec rm -r {} \;
|
||||
|
||||
# systemd hw database manager
|
||||
find usr etc -name '*systemd-hwdb*' -prune -exec rm -r {} \;
|
||||
|
||||
# No need for fuse
|
||||
find usr etc -name '*fuse*' -prune -exec rm -r {} \;
|
||||
|
||||
# lsb init function leftovers
|
||||
rm -rf usr/lib/lsb
|
||||
|
||||
# Only needed when adding libraries
|
||||
rm -rf usr/sbin/ldconfig*
|
||||
|
||||
# Games, unused
|
||||
rmdir usr/games
|
||||
|
||||
# Remove pam module to authenticate against a DB
|
||||
# plus libdb-5.3.so that is only used by this pam module
|
||||
rm -rf usr/lib/*/security/pam_userdb.so
|
||||
rm -rf usr/lib/*/libdb-5.3.so
|
||||
|
||||
# remove NSS support for nis, nisplus and hesiod
|
||||
rm -rf usr/lib/*/libnss_hesiod*
|
||||
rm -rf usr/lib/*/libnss_nis*
|
@@ -7,6 +7,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
libpciaccess-dev:$arch
|
||||
"
|
||||
|
||||
dpkg --add-architecture $arch
|
||||
@@ -17,46 +18,21 @@ apt-get install -y --no-remove \
|
||||
crossbuild-essential-$arch \
|
||||
libelf-dev:$arch \
|
||||
libexpat1-dev:$arch \
|
||||
libpciaccess-dev:$arch \
|
||||
libffi-dev:$arch \
|
||||
libstdc++6:$arch \
|
||||
libvulkan-dev:$arch \
|
||||
libx11-dev:$arch \
|
||||
libx11-xcb-dev:$arch \
|
||||
libxcb-dri2-0-dev:$arch \
|
||||
libxcb-dri3-dev:$arch \
|
||||
libxcb-glx0-dev:$arch \
|
||||
libxcb-present-dev:$arch \
|
||||
libxcb-randr0-dev:$arch \
|
||||
libxcb-shm0-dev:$arch \
|
||||
libxcb-xfixes0-dev:$arch \
|
||||
libxdamage-dev:$arch \
|
||||
libxext-dev:$arch \
|
||||
libxrandr-dev:$arch \
|
||||
libxshmfence-dev:$arch \
|
||||
libxxf86vm-dev:$arch \
|
||||
libtinfo-dev:$arch \
|
||||
wget
|
||||
|
||||
if [[ $arch != "armhf" ]]; then
|
||||
if [[ $arch == "s390x" ]]; then
|
||||
LLVM=9
|
||||
else
|
||||
LLVM=11
|
||||
fi
|
||||
|
||||
# llvm-*-tools:$arch conflicts with python3:amd64. Install dependencies only
|
||||
# with apt-get, then force-install llvm-*-{dev,tools}:$arch with dpkg to get
|
||||
# around this.
|
||||
apt-get install -y --no-remove \
|
||||
libclang-cpp${LLVM}:$arch \
|
||||
libffi-dev:$arch \
|
||||
libgcc-s1:$arch \
|
||||
libtinfo-dev:$arch \
|
||||
libz3-dev:$arch \
|
||||
llvm-${LLVM}:$arch \
|
||||
zlib1g
|
||||
if [[ $arch == "armhf" ]]; then
|
||||
LLVM=llvm-7-dev
|
||||
else
|
||||
LLVM=llvm-8-dev
|
||||
fi
|
||||
|
||||
. .gitlab-ci/container/create-cross-file.sh $arch
|
||||
apt-get install -y --no-remove -t buster-backports \
|
||||
$LLVM:$arch
|
||||
|
||||
. .gitlab-ci/create-cross-file.sh $arch
|
||||
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
@@ -64,16 +40,9 @@ fi
|
||||
|
||||
# dependencies where we want a specific version
|
||||
EXTRA_MESON_ARGS="--cross-file=/cross_file-${arch}.txt -D libdir=lib/$(dpkg-architecture -A $arch -qDEB_TARGET_MULTIARCH)"
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
. .gitlab-ci/build-libdrm.sh
|
||||
|
||||
apt-get purge -y \
|
||||
$STABLE_EPHEMERAL
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
||||
# This needs to be done after container_post_build.sh, or apt-get breaks in there
|
||||
if [[ $arch != "armhf" ]]; then
|
||||
apt-get download llvm-${LLVM}-{dev,tools}:$arch
|
||||
dpkg -i --force-depends llvm-${LLVM}-*_${arch}.deb
|
||||
rm llvm-${LLVM}-*_${arch}.deb
|
||||
fi
|
||||
|
@@ -1,106 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
EPHEMERAL="\
|
||||
autoconf \
|
||||
rdfind \
|
||||
unzip \
|
||||
"
|
||||
|
||||
apt-get install -y --no-remove $EPHEMERAL
|
||||
|
||||
# Fetch the NDK and extract just the toolchain we want.
|
||||
ndk=android-ndk-r21d
|
||||
wget -O $ndk.zip https://dl.google.com/android/repository/$ndk-linux-x86_64.zip
|
||||
unzip -d / $ndk.zip "$ndk/toolchains/llvm/*"
|
||||
rm $ndk.zip
|
||||
# Since it was packed as a zip file, symlinks/hardlinks got turned into
|
||||
# duplicate files. Turn them into hardlinks to save on container space.
|
||||
rdfind -makehardlinks true -makeresultsfile false /android-ndk-r21d/
|
||||
# Drop some large tools we won't use in this build.
|
||||
find /android-ndk-r21d/ -type f | egrep -i "clang-check|clang-tidy|lldb" | xargs rm -f
|
||||
|
||||
sh .gitlab-ci/container/create-android-ndk-pc.sh /$ndk zlib.pc "" "-lz" "1.2.3"
|
||||
|
||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk x86_64-linux-android x86_64 x86_64
|
||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk i686-linux-android x86 x86
|
||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk aarch64-linux-android arm armv8
|
||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk arm-linux-androideabi arm armv7hl armv7a-linux-androideabi
|
||||
|
||||
# Not using build-libdrm.sh because we don't want its cleanup after building
|
||||
# each arch. Fetch and extract now.
|
||||
export LIBDRM_VERSION=libdrm-2.4.110
|
||||
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
|
||||
tar -xf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
|
||||
|
||||
for arch in \
|
||||
x86_64-linux-android \
|
||||
i686-linux-android \
|
||||
aarch64-linux-android \
|
||||
arm-linux-androideabi ; do
|
||||
|
||||
cd $LIBDRM_VERSION
|
||||
rm -rf build-$arch
|
||||
meson build-$arch \
|
||||
--cross-file=/cross_file-$arch.txt \
|
||||
--libdir=lib/$arch \
|
||||
-Dlibkms=false \
|
||||
-Dnouveau=false \
|
||||
-Dvc4=false \
|
||||
-Detnaviv=false \
|
||||
-Dfreedreno=false \
|
||||
-Dintel=false \
|
||||
-Dcairo-tests=false \
|
||||
-Dvalgrind=false
|
||||
ninja -C build-$arch install
|
||||
cd ..
|
||||
done
|
||||
|
||||
rm -rf $LIBDRM_VERSION
|
||||
|
||||
export LIBELF_VERSION=libelf-0.8.13
|
||||
wget https://fossies.org/linux/misc/old/$LIBELF_VERSION.tar.gz
|
||||
|
||||
# Not 100% sure who runs the mirror above so be extra careful
|
||||
if ! echo "4136d7b4c04df68b686570afa26988ac ${LIBELF_VERSION}.tar.gz" | md5sum -c -; then
|
||||
echo "Checksum failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tar -xf ${LIBELF_VERSION}.tar.gz
|
||||
cd $LIBELF_VERSION
|
||||
|
||||
# Work around a bug in the original configure not enabling __LIBELF64.
|
||||
autoreconf
|
||||
|
||||
for arch in \
|
||||
x86_64-linux-android \
|
||||
i686-linux-android \
|
||||
aarch64-linux-android \
|
||||
arm-linux-androideabi ; do
|
||||
|
||||
ccarch=${arch}
|
||||
if [ "${arch}" == 'arm-linux-androideabi' ]
|
||||
then
|
||||
ccarch=armv7a-linux-androideabi
|
||||
fi
|
||||
|
||||
export CC=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ar
|
||||
export CC=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}29-clang
|
||||
export CXX=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}29-clang++
|
||||
export LD=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ld
|
||||
export RANLIB=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ranlib
|
||||
|
||||
# The configure script doesn't know about android, but doesn't really use the host anyway it
|
||||
# seems
|
||||
./configure --host=x86_64-linux-gnu --disable-nls --disable-shared \
|
||||
--libdir=/usr/local/lib/${arch}
|
||||
make install
|
||||
make distclean
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf $LIBELF_VERSION
|
||||
|
||||
apt-get purge -y $EPHEMERAL
|
@@ -1,74 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install ca-certificates
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
echo 'deb https://deb.debian.org/debian buster main' >/etc/apt/sources.list.d/buster.list
|
||||
apt-get update
|
||||
|
||||
apt-get -y install \
|
||||
${EXTRA_LOCAL_PACKAGES} \
|
||||
abootimg \
|
||||
autoconf \
|
||||
automake \
|
||||
bc \
|
||||
bison \
|
||||
ccache \
|
||||
cmake \
|
||||
debootstrap \
|
||||
fastboot \
|
||||
flex \
|
||||
g++ \
|
||||
git \
|
||||
glslang-tools \
|
||||
kmod \
|
||||
libasan6 \
|
||||
libdrm-dev \
|
||||
libelf-dev \
|
||||
libexpat1-dev \
|
||||
libvulkan-dev \
|
||||
libx11-dev \
|
||||
libx11-xcb-dev \
|
||||
libxcb-dri2-0-dev \
|
||||
libxcb-dri3-dev \
|
||||
libxcb-glx0-dev \
|
||||
libxcb-present-dev \
|
||||
libxcb-randr0-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxdamage-dev \
|
||||
libxext-dev \
|
||||
libxrandr-dev \
|
||||
libxshmfence-dev \
|
||||
libxxf86vm-dev \
|
||||
llvm-11-dev \
|
||||
meson \
|
||||
pkg-config \
|
||||
python3-mako \
|
||||
python3-pil \
|
||||
python3-pip \
|
||||
python3-requests \
|
||||
python3-setuptools \
|
||||
u-boot-tools \
|
||||
wget \
|
||||
xz-utils \
|
||||
zlib1g-dev
|
||||
|
||||
# Not available anymore in bullseye
|
||||
apt-get install -y --no-remove -t buster \
|
||||
android-sdk-ext4-utils
|
||||
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
arch=armhf
|
||||
. .gitlab-ci/container/cross_build.sh
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
# dependencies where we want a specific version
|
||||
EXTRA_MESON_ARGS=
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
@@ -1,39 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
############### Install packages for baremetal testing
|
||||
apt-get install -y ca-certificates
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
abootimg \
|
||||
cpio \
|
||||
fastboot \
|
||||
netcat \
|
||||
procps \
|
||||
python3-distutils \
|
||||
python3-minimal \
|
||||
python3-serial \
|
||||
rsync \
|
||||
snmp \
|
||||
wget
|
||||
|
||||
# setup SNMPv2 SMI MIB
|
||||
wget https://raw.githubusercontent.com/net-snmp/net-snmp/master/mibs/SNMPv2-SMI.txt \
|
||||
-O /usr/share/snmp/mibs/SNMPv2-SMI.txt
|
||||
|
||||
arch=arm64 . .gitlab-ci/container/baremetal_build.sh
|
||||
arch=armhf . .gitlab-ci/container/baremetal_build.sh
|
||||
|
||||
# This firmware file from Debian bullseye causes hangs
|
||||
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qcom/a530_pfp.fw?id=d5f9eea5a251d43412b07f5295d03e97b89ac4a5 \
|
||||
-O /rootfs-arm64/lib/firmware/qcom/a530_pfp.fw
|
||||
|
||||
mkdir -p /baremetal-files/jetson-nano/boot/
|
||||
ln -s \
|
||||
/baremetal-files/Image \
|
||||
/baremetal-files/tegra210-p3450-0000.dtb \
|
||||
/baremetal-files/jetson-nano/boot/
|
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
arch=ppc64el
|
||||
|
||||
. .gitlab-ci/container/cross_build.sh
|
@@ -1,53 +0,0 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQGNBFwOmrgBDAC9FZW3dFpew1hwDaqRfdQQ1ABcmOYu1NKZHwYjd+bGvcR2LRGe
|
||||
R5dfRqG1Uc/5r6CPCMvnWxFprymkqKEADn8eFn+aCnPx03HrhA+lNEbciPfTHylt
|
||||
NTTuRua7YpJIgEOjhXUbxXxnvF8fhUf5NJpJg6H6fPQARUW+5M//BlVgwn2jhzlW
|
||||
U+uwgeJthhiuTXkls9Yo3EoJzmkUih+ABZgvaiBpr7GZRw9GO1aucITct0YDNTVX
|
||||
KA6el78/udi5GZSCKT94yY9ArN4W6NiOFCLV7MU5d6qMjwGFhfg46NBv9nqpGinK
|
||||
3NDjqCevKouhtKl2J+nr3Ju3Spzuv6Iex7tsOqt+XdZCoY+8+dy3G5zbJwBYsMiS
|
||||
rTNF55PHtBH1S0QK5OoN2UR1ie/aURAyAFEMhTzvFB2B2v7C0IKIOmYMEG+DPMs9
|
||||
FQs/vZ1UnAQgWk02ZiPryoHfjFO80+XYMrdWN+RSo5q9ODClloaKXjqI/aWLGirm
|
||||
KXw2R8tz31go3NMAEQEAAbQnV2luZUhRIHBhY2thZ2VzIDx3aW5lLWRldmVsQHdp
|
||||
bmVocS5vcmc+iQHOBBMBCgA4AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAFiEE
|
||||
1D9kAUU2nFHXht3qdvGiD/mHZy8FAlwOmyUACgkQdvGiD/mHZy/zkwv7B+nKFlDY
|
||||
Bzz/7j0gqIODbs5FRZRtuf/IuPP3vZdWlNfAW/VyaLtVLJCM/mmaf/O6/gJ+D+E9
|
||||
BBoSmHdHzBBOQHIj5IbRedynNcHT5qXsdBeU2ZPR50sdE+jmukvw3Wa5JijoDgUu
|
||||
LGLGtU48Z3JsBXQ54OlnTZXQ2SMFhRUa10JANXSJQ+QY2Wo2Pi2+MEAHcrd71A2S
|
||||
0mT2DQSSBQ92c6WPfUpOSBawd8P0ipT7rVFNLJh8HVQGyEWxPl8ecDEHoVfG2rdV
|
||||
D0ADbNLx9031UUwpUicO6vW/2Ec7c3VNG1cpOtyNTw/lEgvsXOh3GQs/DvFvMy/h
|
||||
QzaeF3Qq6cAPlKuxieJe4lLYFBTmCAT4iB1J8oeFs4G7ScfZH4+4NBe3VGoeCD/M
|
||||
Wl+qxntAroblxiFuqtPJg+NKZYWBzkptJNhnrBxcBnRinGZLw2k/GR/qPMgsR2L4
|
||||
cP+OUuka+R2gp9oDVTZTyMowz+ROIxnEijF50pkj2VBFRB02rfiMp7q6iQIzBBAB
|
||||
CgAdFiEE2iNXmnTUrZr50/lFzvrI6q8XUZ0FAlwOm3AACgkQzvrI6q8XUZ3KKg/+
|
||||
MD8CgvLiHEX90fXQ23RZQRm2J21w3gxdIen/N8yJVIbK7NIgYhgWfGWsGQedtM7D
|
||||
hMwUlDSRb4rWy9vrXBaiZoF3+nK9AcLvPChkZz28U59Jft6/l0gVrykey/ERU7EV
|
||||
w1Ie1eRu0tRSXsKvMZyQH8897iHZ7uqoJgyk8U8CvSW+V80yqLB2M8Tk8ECZq34f
|
||||
HqUIGs4Wo0UZh0vV4+dEQHBh1BYpmmWl+UPf7nzNwFWXu/EpjVhkExRqTnkEJ+Ai
|
||||
OxbtrRn6ETKzpV4DjyifqQF639bMIem7DRRf+mkcrAXetvWkUkE76e3E9KLvETCZ
|
||||
l4SBfgqSZs2vNngmpX6Qnoh883aFo5ZgVN3v6uTS+LgTwMt/XlnDQ7+Zw+ehCZ2R
|
||||
CO21Y9Kbw6ZEWls/8srZdCQ2LxnyeyQeIzsLnqT/waGjQj35i4exzYeWpojVDb3r
|
||||
tvvOALYGVlSYqZXIALTx2/tHXKLHyrn1C0VgHRnl+hwv7U49f7RvfQXpx47YQN/C
|
||||
PWrpbG69wlKuJptr+olbyoKAWfl+UzoO8vLMo5njWQNAoAwh1H8aFUVNyhtbkRuq
|
||||
l0kpy1Cmcq8uo6taK9lvYp8jak7eV8lHSSiGUKTAovNTwfZG2JboGV4/qLDUKvpa
|
||||
lPp2xVpF9MzA8VlXTOzLpSyIVxZnPTpL+xR5P9WQjMS5AY0EXA6auAEMAMReKL89
|
||||
0z0SL+/i/geB/agfG/k6AXiG2a9kVWeIjAqFwHKl9W/DTNvOqCDgAt51oiHGRRjt
|
||||
1Xm3XZD4p+GM1uZWn9qIFL49Gt5x94TqdrsKTVCJr0Kazn2mKQc7aja0zac+WtZG
|
||||
OFn7KbniuAcwtC780cyikfmmExLI1/Vjg+NiMlMtZfpK6FIW+ulPiDQPdzIhVppx
|
||||
w9/KlR2Fvh4TbzDsUqkFQSSAFdQ65BWgvzLpZHdKO/ILpDkThLbipjtvbBv/pHKM
|
||||
O/NFTNoYkJ3cNW/kfcynwV+4AcKwdRz2A3Mez+g5TKFYPZROIbayOo01yTMLfz2p
|
||||
jcqki/t4PACtwFOhkAs+MYPPyZDUkTFcEJQCPDstkAgmJWI3K2qELtDOLQyps3WY
|
||||
Mfp+mntOdc8bKjFTMcCEk1zcm14K4Oms+w6dw2UnYsX1FAYYhPm8HUYwE4kP8M+D
|
||||
9HGLMjLqqF/kanlCFZs5Avx3mDSAx6zS8vtNdGh+64oDNk4x4A2j8GTUuQARAQAB
|
||||
iQG8BBgBCgAmFiEE1D9kAUU2nFHXht3qdvGiD/mHZy8FAlwOmrgCGwwFCQPCZwAA
|
||||
CgkQdvGiD/mHZy9FnAwAgfUkxsO53Pm2iaHhtF4+BUc8MNJj64Jvm1tghr6PBRtM
|
||||
hpbvvN8SSOFwYIsS+2BMsJ2ldox4zMYhuvBcgNUlix0G0Z7h1MjftDdsLFi1DNv2
|
||||
J9dJ9LdpWdiZbyg4Sy7WakIZ/VvH1Znd89Imo7kCScRdXTjIw2yCkotE5lK7A6Ns
|
||||
NbVuoYEN+dbGioF4csYehnjTdojwF/19mHFxrXkdDZ/V6ZYFIFxEsxL8FEuyI4+o
|
||||
LC3DFSA4+QAFdkjGFXqFPlaEJxWt5d7wk0y+tt68v+ulkJ900BvR+OOMqQURwrAi
|
||||
iP3I28aRrMjZYwyqHl8i/qyIv+WRakoDKV+wWteR5DmRAPHmX2vnlPlCmY8ysR6J
|
||||
2jUAfuDFVu4/qzJe6vw5tmPJMdfvy0W5oogX6sEdin5M5w2b3WrN8nXZcjbWymqP
|
||||
6jCdl6eoCCkKNOIbr/MMSkd2KqAqDVM5cnnlQ7q+AXzwNpj3RGJVoBxbS0nn9JWY
|
||||
QNQrWh9rAcMIGT+b1le0
|
||||
=4lsa
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
# Installing wine, need this for testing mingw or nine
|
||||
|
||||
# We need multiarch for Wine
|
||||
dpkg --add-architecture i386
|
||||
apt-get update
|
||||
apt-get install -y --no-remove \
|
||||
wine \
|
||||
wine32 \
|
||||
wine64 \
|
||||
xvfb
|
||||
|
||||
# Used to initialize the Wine environment to reduce build time
|
||||
wine64 whoami.exe
|
||||
|
@@ -1,87 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get install -y ca-certificates gnupg2 software-properties-common
|
||||
|
||||
# Add llvm 13 to the build image
|
||||
apt-key add .gitlab-ci/container/debian/llvm-snapshot.gpg.key
|
||||
add-apt-repository "deb https://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main"
|
||||
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at
|
||||
# the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
"
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
bison \
|
||||
ccache \
|
||||
dpkg-cross \
|
||||
flex \
|
||||
g++ \
|
||||
cmake \
|
||||
gcc \
|
||||
git \
|
||||
glslang-tools \
|
||||
kmod \
|
||||
libclang-13-dev \
|
||||
libclang-11-dev \
|
||||
libclang-9-dev \
|
||||
libclc-dev \
|
||||
libelf-dev \
|
||||
libepoxy-dev \
|
||||
libexpat1-dev \
|
||||
libgtk-3-dev \
|
||||
libllvm13 \
|
||||
libllvm11 \
|
||||
libllvm9 \
|
||||
libomxil-bellagio-dev \
|
||||
libpciaccess-dev \
|
||||
libunwind-dev \
|
||||
libva-dev \
|
||||
libvdpau-dev \
|
||||
libvulkan-dev \
|
||||
libx11-dev \
|
||||
libx11-xcb-dev \
|
||||
libxext-dev \
|
||||
libxml2-utils \
|
||||
libxrandr-dev \
|
||||
libxrender-dev \
|
||||
libxshmfence-dev \
|
||||
libxvmc-dev \
|
||||
libxxf86vm-dev \
|
||||
make \
|
||||
meson \
|
||||
pkg-config \
|
||||
python3-mako \
|
||||
python3-pil \
|
||||
python3-requests \
|
||||
qemu-user \
|
||||
valgrind \
|
||||
wget \
|
||||
x11proto-dri2-dev \
|
||||
x11proto-gl-dev \
|
||||
x11proto-randr-dev \
|
||||
xz-utils \
|
||||
zlib1g-dev
|
||||
|
||||
# Needed for ci-fairy, this revision is able to upload files to MinIO
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
. .gitlab-ci/container/debian/x86_build-base-wine.sh
|
||||
|
||||
############### Uninstall ephemeral packages
|
||||
|
||||
apt-get purge -y $STABLE_EPHEMERAL
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
@@ -1,74 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Pull packages from msys2 repository that can be directly used.
|
||||
# We can use https://packages.msys2.org/ to retrieve the newest package
|
||||
mkdir ~/tmp
|
||||
pushd ~/tmp
|
||||
MINGW_PACKET_LIST="
|
||||
mingw-w64-x86_64-headers-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst
|
||||
mingw-w64-x86_64-vulkan-loader-1.3.211-1-any.pkg.tar.zst
|
||||
mingw-w64-x86_64-libelf-0.8.13-6-any.pkg.tar.zst
|
||||
mingw-w64-x86_64-zlib-1.2.12-1-any.pkg.tar.zst
|
||||
mingw-w64-x86_64-zstd-1.5.2-2-any.pkg.tar.zst
|
||||
"
|
||||
|
||||
for i in $MINGW_PACKET_LIST
|
||||
do
|
||||
wget -q https://mirror.msys2.org/mingw/mingw64/$i
|
||||
tar xf $i --strip-components=1 -C /usr/x86_64-w64-mingw32/
|
||||
done
|
||||
popd
|
||||
rm -rf ~/tmp
|
||||
|
||||
mkdir -p /usr/x86_64-w64-mingw32/bin
|
||||
|
||||
# The output of `wine64 llvm-config --system-libs --cxxflags mcdisassembler`
|
||||
# containes absolute path like '-IZ:'
|
||||
# The sed is used to replace `-IZ:/usr/x86_64-w64-mingw32/include`
|
||||
# to `-I/usr/x86_64-w64-mingw32/include`
|
||||
|
||||
# Debian's pkg-config wrapers for mingw are broken, and there's no sign that
|
||||
# they're going to be fixed, so we'll just have to fix it ourselves
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930492
|
||||
cat >/usr/x86_64-w64-mingw32/bin/pkg-config <<EOF
|
||||
#!/bin/sh
|
||||
|
||||
PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig:/usr/x86_64-w64-mingw32/share/pkgconfig pkg-config \$@
|
||||
EOF
|
||||
chmod +x /usr/x86_64-w64-mingw32/bin/pkg-config
|
||||
|
||||
cat >/usr/x86_64-w64-mingw32/bin/llvm-config <<EOF
|
||||
#!/bin/sh
|
||||
wine64 llvm-config \$@ | sed -e "s,Z:/,/,gi"
|
||||
EOF
|
||||
chmod +x /usr/x86_64-w64-mingw32/bin/llvm-config
|
||||
|
||||
cat >/usr/x86_64-w64-mingw32/bin/clang <<EOF
|
||||
#!/bin/sh
|
||||
wine64 clang \$@
|
||||
EOF
|
||||
chmod +x /usr/x86_64-w64-mingw32/bin/clang
|
||||
|
||||
cat >/usr/x86_64-w64-mingw32/bin/llvm-as <<EOF
|
||||
#!/bin/sh
|
||||
wine64 llvm-as \$@
|
||||
EOF
|
||||
chmod +x /usr/x86_64-w64-mingw32/bin/llvm-as
|
||||
|
||||
cat >/usr/x86_64-w64-mingw32/bin/llvm-link <<EOF
|
||||
#!/bin/sh
|
||||
wine64 llvm-link \$@
|
||||
EOF
|
||||
chmod +x /usr/x86_64-w64-mingw32/bin/llvm-link
|
||||
|
||||
cat >/usr/x86_64-w64-mingw32/bin/opt <<EOF
|
||||
#!/bin/sh
|
||||
wine64 opt \$@
|
||||
EOF
|
||||
chmod +x /usr/x86_64-w64-mingw32/bin/opt
|
||||
|
||||
cat >/usr/x86_64-w64-mingw32/bin/llvm-spirv <<EOF
|
||||
#!/bin/sh
|
||||
wine64 llvm-spirv \$@
|
||||
EOF
|
||||
chmod +x /usr/x86_64-w64-mingw32/bin/llvm-spirv
|
@@ -1,100 +0,0 @@
|
||||
#!/bin/bash
|
||||
wd=$PWD
|
||||
CMAKE_TOOLCHAIN_MINGW_PATH=$wd/.gitlab-ci/container/debian/x86_mingw-toolchain.cmake
|
||||
mkdir -p ~/tmp
|
||||
pushd ~/tmp
|
||||
|
||||
# Building DirectX-Headers
|
||||
git clone https://github.com/microsoft/DirectX-Headers -b v1.606.3 --depth 1
|
||||
mkdir -p DirectX-Headers/build
|
||||
pushd DirectX-Headers/build
|
||||
meson .. \
|
||||
--backend=ninja \
|
||||
--buildtype=release -Dbuild-test=false \
|
||||
-Dprefix=/usr/x86_64-w64-mingw32/ \
|
||||
--cross-file=$wd/.gitlab-ci/x86_64-w64-mingw32
|
||||
|
||||
ninja install
|
||||
popd
|
||||
|
||||
export VULKAN_SDK_VERSION=1.3.211.0
|
||||
|
||||
# Building SPIRV Tools
|
||||
git clone -b sdk-$VULKAN_SDK_VERSION --depth=1 \
|
||||
https://github.com/KhronosGroup/SPIRV-Tools SPIRV-Tools
|
||||
|
||||
git clone -b sdk-$VULKAN_SDK_VERSION --depth=1 \
|
||||
https://github.com/KhronosGroup/SPIRV-Headers SPIRV-Tools/external/SPIRV-Headers
|
||||
|
||||
mkdir -p SPIRV-Tools/build
|
||||
pushd SPIRV-Tools/build
|
||||
cmake .. \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_MINGW_PATH \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/ \
|
||||
-GNinja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CROSSCOMPILING=1 \
|
||||
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW
|
||||
|
||||
ninja install
|
||||
popd
|
||||
|
||||
# Building LLVM
|
||||
git clone -b release/14.x --depth=1 \
|
||||
https://github.com/llvm/llvm-project llvm-project
|
||||
|
||||
git clone -b v14.0.0 --depth=1 \
|
||||
https://github.com/KhronosGroup/SPIRV-LLVM-Translator llvm-project/llvm/projects/SPIRV-LLVM-Translator
|
||||
|
||||
mkdir llvm-project/build
|
||||
pushd llvm-project/build
|
||||
cmake ../llvm \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_MINGW_PATH \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/ \
|
||||
-GNinja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CROSSCOMPILING=1 \
|
||||
-DLLVM_ENABLE_RTTI=ON \
|
||||
-DCROSS_TOOLCHAIN_FLAGS_NATIVE=-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=$PWD/../../SPIRV-Tools/external/SPIRV-Headers \
|
||||
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=$PWD/../../SPIRV-Tools/external/SPIRV-Headers \
|
||||
-DLLVM_ENABLE_PROJECTS="clang" \
|
||||
-DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" \
|
||||
-DLLVM_OPTIMIZED_TABLEGEN=TRUE \
|
||||
-DLLVM_ENABLE_ASSERTIONS=TRUE \
|
||||
-DLLVM_INCLUDE_UTILS=OFF \
|
||||
-DLLVM_INCLUDE_RUNTIMES=OFF \
|
||||
-DLLVM_INCLUDE_TESTS=OFF \
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
||||
-DLLVM_INCLUDE_GO_TESTS=OFF \
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF \
|
||||
-DLLVM_BUILD_LLVM_C_DYLIB=OFF \
|
||||
-DLLVM_ENABLE_DIA_SDK=OFF \
|
||||
-DCLANG_BUILD_TOOLS=ON \
|
||||
-DLLVM_SPIRV_INCLUDE_TESTS=OFF
|
||||
|
||||
ninja install
|
||||
popd
|
||||
|
||||
# Building libclc
|
||||
mkdir llvm-project/build-libclc
|
||||
pushd llvm-project/build-libclc
|
||||
cmake ../libclc \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_MINGW_PATH \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/ \
|
||||
-GNinja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CROSSCOMPILING=1 \
|
||||
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW \
|
||||
-DCMAKE_CXX_FLAGS="-m64" \
|
||||
-DLLVM_CONFIG="/usr/x86_64-w64-mingw32/bin/llvm-config" \
|
||||
-DLLVM_CLANG="/usr/x86_64-w64-mingw32/bin/clang" \
|
||||
-DLLVM_AS="/usr/x86_64-w64-mingw32/bin/llvm-as" \
|
||||
-DLLVM_LINK="/usr/x86_64-w64-mingw32/bin/llvm-link" \
|
||||
-DLLVM_OPT="/usr/x86_64-w64-mingw32/bin/opt" \
|
||||
-DLLVM_SPIRV="/usr/x86_64-w64-mingw32/bin/llvm-spirv" \
|
||||
-DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-"
|
||||
|
||||
ninja install
|
||||
popd
|
||||
|
||||
popd # ~/tmp
|
||||
|
||||
# Cleanup ~/tmp
|
||||
rm -rf ~/tmp
|
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get update
|
||||
apt-get install -y --no-remove \
|
||||
zstd \
|
||||
g++-mingw-w64-i686 \
|
||||
g++-mingw-w64-x86-64
|
||||
|
||||
. .gitlab-ci/container/debian/x86_build-mingw-patch.sh
|
||||
. .gitlab-ci/container/debian/x86_build-mingw-source-deps.sh
|
@@ -1,93 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
autoconf \
|
||||
automake \
|
||||
autotools-dev \
|
||||
bzip2 \
|
||||
libtool \
|
||||
python3-pip \
|
||||
"
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
check \
|
||||
clang \
|
||||
libasan6 \
|
||||
libarchive-dev \
|
||||
libclang-cpp13-dev \
|
||||
libclang-cpp11-dev \
|
||||
libgbm-dev \
|
||||
libglvnd-dev \
|
||||
libllvmspirvlib-dev \
|
||||
liblua5.3-dev \
|
||||
libxcb-dri2-0-dev \
|
||||
libxcb-dri3-dev \
|
||||
libxcb-glx0-dev \
|
||||
libxcb-present-dev \
|
||||
libxcb-randr0-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-sync-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxml2-dev \
|
||||
llvm-13-dev \
|
||||
llvm-11-dev \
|
||||
llvm-9-dev \
|
||||
ocl-icd-opencl-dev \
|
||||
python3-freezegun \
|
||||
python3-pytest \
|
||||
procps \
|
||||
spirv-tools \
|
||||
strace \
|
||||
time
|
||||
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
# dependencies where we want a specific version
|
||||
export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
|
||||
|
||||
export XORGMACROS_VERSION=util-macros-1.19.0
|
||||
|
||||
wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
|
||||
tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
|
||||
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
|
||||
rm -rf $XORGMACROS_VERSION
|
||||
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
||||
pushd /usr/local
|
||||
git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1
|
||||
rm -rf shader-db/.git
|
||||
cd shader-db
|
||||
make
|
||||
popd
|
||||
|
||||
git clone https://github.com/microsoft/DirectX-Headers -b v1.606.3 --depth 1
|
||||
mkdir -p DirectX-Headers/build
|
||||
pushd DirectX-Headers/build
|
||||
meson .. --backend=ninja --buildtype=release -Dbuild-test=false
|
||||
ninja
|
||||
ninja install
|
||||
popd
|
||||
rm -rf DirectX-Headers
|
||||
|
||||
pip3 install git+https://git.lavasoftware.org/lava/lavacli@3db3ddc45e5358908bc6a17448059ea2340492b7
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
apt-get purge -y \
|
||||
$STABLE_EPHEMERAL
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
@@ -1,8 +0,0 @@
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
set(CMAKE_SYSROOT /usr/x86_64-w64-mingw32/)
|
||||
set(ENV{PKG_CONFIG} /usr/x86_64-w64-mingw32/bin/pkg-config)
|
||||
|
||||
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc-posix)
|
||||
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++-posix)
|
@@ -1,75 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get install -y ca-certificates gnupg2 software-properties-common
|
||||
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at
|
||||
# the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
cargo \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
"
|
||||
|
||||
# Add llvm 13 to the build image
|
||||
apt-key add .gitlab-ci/container/debian/llvm-snapshot.gpg.key
|
||||
add-apt-repository "deb https://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main"
|
||||
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
git \
|
||||
git-lfs \
|
||||
libasan6 \
|
||||
libexpat1 \
|
||||
libllvm13 \
|
||||
libllvm11 \
|
||||
libllvm9 \
|
||||
liblz4-1 \
|
||||
libpng16-16 \
|
||||
libpython3.9 \
|
||||
libvulkan1 \
|
||||
libwayland-client0 \
|
||||
libwayland-server0 \
|
||||
libxcb-ewmh2 \
|
||||
libxcb-randr0 \
|
||||
libxcb-xfixes0 \
|
||||
libxkbcommon0 \
|
||||
libxrandr2 \
|
||||
libxrender1 \
|
||||
python3-mako \
|
||||
python3-numpy \
|
||||
python3-packaging \
|
||||
python3-pil \
|
||||
python3-requests \
|
||||
python3-six \
|
||||
python3-yaml \
|
||||
vulkan-tools \
|
||||
waffle-utils \
|
||||
xauth \
|
||||
xvfb \
|
||||
zlib1g
|
||||
|
||||
apt-get install -y --no-install-recommends \
|
||||
$STABLE_EPHEMERAL
|
||||
|
||||
# Needed for ci-fairy, this revision is able to upload files to MinIO
|
||||
# and doesn't depend on git
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
############### Build dEQP runner
|
||||
. .gitlab-ci/container/build-deqp-runner.sh
|
||||
rm -rf ~/.cargo
|
||||
|
||||
apt-get purge -y $STABLE_EPHEMERAL
|
||||
|
||||
apt-get autoremove -y --purge
|
@@ -1,130 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
autoconf \
|
||||
automake \
|
||||
bc \
|
||||
bison \
|
||||
bzip2 \
|
||||
ccache \
|
||||
clang-13 \
|
||||
clang-11 \
|
||||
cmake \
|
||||
flex \
|
||||
g++ \
|
||||
glslang-tools \
|
||||
libasound2-dev \
|
||||
libcap-dev \
|
||||
libclang-cpp13-dev \
|
||||
libclang-cpp11-dev \
|
||||
libelf-dev \
|
||||
libexpat1-dev \
|
||||
libfdt-dev \
|
||||
libgbm-dev \
|
||||
libgles2-mesa-dev \
|
||||
libllvmspirvlib-dev \
|
||||
libpciaccess-dev \
|
||||
libpng-dev \
|
||||
libudev-dev \
|
||||
libvulkan-dev \
|
||||
libwaffle-dev \
|
||||
libx11-xcb-dev \
|
||||
libxcb-dri2-0-dev \
|
||||
libxext-dev \
|
||||
libxkbcommon-dev \
|
||||
libxrender-dev \
|
||||
llvm-13-dev \
|
||||
llvm-11-dev \
|
||||
llvm-spirv \
|
||||
make \
|
||||
meson \
|
||||
ocl-icd-opencl-dev \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-distutils \
|
||||
xz-utils \
|
||||
"
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
clinfo \
|
||||
iptables \
|
||||
libclang-common-13-dev \
|
||||
libclang-common-11-dev \
|
||||
libclang-cpp13 \
|
||||
libclang-cpp11 \
|
||||
libcap2 \
|
||||
libegl1 \
|
||||
libepoxy-dev \
|
||||
libfdt1 \
|
||||
libllvmspirvlib11 \
|
||||
libxcb-shm0 \
|
||||
ocl-icd-libopencl1 \
|
||||
python3-lxml \
|
||||
python3-renderdoc \
|
||||
python3-simplejson \
|
||||
socat \
|
||||
spirv-tools \
|
||||
sysvinit-core \
|
||||
wget
|
||||
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
############### Build libdrm
|
||||
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
############### Build Wayland
|
||||
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
||||
############### Build Crosvm
|
||||
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
. .gitlab-ci/container/build-crosvm.sh
|
||||
rm -rf /root/.cargo
|
||||
rm -rf /root/.rustup
|
||||
|
||||
############### Build kernel
|
||||
|
||||
export DEFCONFIG="arch/x86/configs/x86_64_defconfig"
|
||||
export KERNEL_IMAGE_NAME=bzImage
|
||||
export KERNEL_ARCH=x86_64
|
||||
export DEBIAN_ARCH=amd64
|
||||
|
||||
mkdir -p /lava-files/
|
||||
. .gitlab-ci/container/build-kernel.sh
|
||||
|
||||
############### Build libclc
|
||||
|
||||
. .gitlab-ci/container/build-libclc.sh
|
||||
|
||||
############### Build piglit
|
||||
|
||||
PIGLIT_OPTS="-DPIGLIT_BUILD_CL_TESTS=ON -DPIGLIT_BUILD_DMA_BUF_TESTS=ON" . .gitlab-ci/container/build-piglit.sh
|
||||
|
||||
############### Build dEQP GL
|
||||
|
||||
DEQP_TARGET=surfaceless . .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
############### Build apitrace
|
||||
|
||||
. .gitlab-ci/container/build-apitrace.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
ccache --show-stats
|
||||
|
||||
apt-get purge -y \
|
||||
$STABLE_EPHEMERAL
|
||||
|
||||
apt-get autoremove -y --purge
|
@@ -1,198 +0,0 @@
|
||||
#!/bin/bash
|
||||
# The relative paths in this file only become valid at runtime.
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
ccache \
|
||||
cmake \
|
||||
g++ \
|
||||
g++-mingw-w64-i686-posix \
|
||||
g++-mingw-w64-x86-64-posix \
|
||||
glslang-tools \
|
||||
libexpat1-dev \
|
||||
gnupg2 \
|
||||
libgbm-dev \
|
||||
libgles2-mesa-dev \
|
||||
liblz4-dev \
|
||||
libpciaccess-dev \
|
||||
libudev-dev \
|
||||
libvulkan-dev \
|
||||
libwaffle-dev \
|
||||
libx11-xcb-dev \
|
||||
libxcb-ewmh-dev \
|
||||
libxcb-keysyms1-dev \
|
||||
libxkbcommon-dev \
|
||||
libxrandr-dev \
|
||||
libxrender-dev \
|
||||
libzstd-dev \
|
||||
meson \
|
||||
mingw-w64-i686-dev \
|
||||
mingw-w64-tools \
|
||||
mingw-w64-x86-64-dev \
|
||||
p7zip \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
python3-distutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
software-properties-common \
|
||||
wget \
|
||||
wine64-tools \
|
||||
xz-utils \
|
||||
"
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
libxcb-shm0 \
|
||||
pciutils \
|
||||
python3-lxml \
|
||||
python3-simplejson \
|
||||
xinit \
|
||||
xserver-xorg-video-amdgpu \
|
||||
xserver-xorg-video-ati
|
||||
|
||||
# We need multiarch for Wine
|
||||
dpkg --add-architecture i386
|
||||
|
||||
# Install a more recent version of Wine than exists in Debian.
|
||||
apt-key add .gitlab-ci/container/debian/winehq.gpg.key
|
||||
apt-add-repository https://dl.winehq.org/wine-builds/debian/
|
||||
apt update -qyy
|
||||
|
||||
# Needed for Valve's tracing jobs to collect information about the graphics
|
||||
# hardware on the test devices.
|
||||
pip3 install gfxinfo-mupuf==0.0.9
|
||||
|
||||
apt install -y --no-remove --install-recommends winehq-stable
|
||||
|
||||
function setup_wine() {
|
||||
export WINEDEBUG="-all"
|
||||
export WINEPREFIX="$1"
|
||||
|
||||
# We don't want crash dialogs
|
||||
cat >crashdialog.reg <<EOF
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[HKEY_CURRENT_USER\Software\Wine\WineDbg]
|
||||
"ShowCrashDialog"=dword:00000000
|
||||
|
||||
EOF
|
||||
|
||||
# Set the wine prefix and disable the crash dialog
|
||||
wine regedit crashdialog.reg
|
||||
rm crashdialog.reg
|
||||
|
||||
# An immediate wine command may fail with: "${WINEPREFIX}: Not a
|
||||
# valid wine prefix." and that is just spit because of checking
|
||||
# the existance of the system.reg file, which fails. Just giving
|
||||
# it a bit more of time for it to be created solves the problem
|
||||
# ...
|
||||
while ! test -f "${WINEPREFIX}/system.reg"; do sleep 1; done
|
||||
}
|
||||
|
||||
############### Install DXVK
|
||||
|
||||
dxvk_install_release() {
|
||||
local DXVK_VERSION=${1:-"1.10.1"}
|
||||
|
||||
wget "https://github.com/doitsujin/dxvk/releases/download/v${DXVK_VERSION}/dxvk-${DXVK_VERSION}.tar.gz"
|
||||
tar xzpf dxvk-"${DXVK_VERSION}".tar.gz
|
||||
"dxvk-${DXVK_VERSION}"/setup_dxvk.sh install
|
||||
rm -rf "dxvk-${DXVK_VERSION}"
|
||||
rm dxvk-"${DXVK_VERSION}".tar.gz
|
||||
}
|
||||
|
||||
# Install from a Github PR number
|
||||
dxvk_install_pr() {
|
||||
local __prnum=$1
|
||||
|
||||
# NOTE: Clone all the ensite history of the repo so as not to think
|
||||
# harder about cloning just enough for 'git describe' to work. 'git
|
||||
# describe' is used by the dxvk build system to generate a
|
||||
# dxvk_version Meson variable, which is nice-to-have.
|
||||
git clone https://github.com/doitsujin/dxvk
|
||||
pushd dxvk
|
||||
git fetch origin pull/"$__prnum"/head:pr
|
||||
git checkout pr
|
||||
./package-release.sh pr ../dxvk-build --no-package
|
||||
popd
|
||||
pushd ./dxvk-build/dxvk-pr
|
||||
./setup_dxvk.sh install
|
||||
popd
|
||||
rm -rf ./dxvk-build ./dxvk
|
||||
}
|
||||
|
||||
# Sets up the WINEPREFIX for the DXVK installation commands below.
|
||||
setup_wine "/dxvk-wine64"
|
||||
dxvk_install_release "1.10.1"
|
||||
#dxvk_install_pr 2359
|
||||
|
||||
############### Install apitrace binaries for wine
|
||||
|
||||
. .gitlab-ci/container/install-wine-apitrace.sh
|
||||
# Add the apitrace path to the registry
|
||||
wine \
|
||||
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" \
|
||||
/v Path \
|
||||
/t REG_EXPAND_SZ \
|
||||
/d "C:\windows\system32;C:\windows;C:\windows\system32\wbem;Z:\apitrace-msvc-win64\bin" \
|
||||
/f
|
||||
|
||||
############### Building ...
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
############### Build libdrm
|
||||
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
############### Build Wayland
|
||||
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
||||
############### Build parallel-deqp-runner's hang-detection tool
|
||||
|
||||
. .gitlab-ci/container/build-hang-detection.sh
|
||||
|
||||
############### Build piglit
|
||||
|
||||
PIGLIT_BUILD_TARGETS="piglit_replayer" . .gitlab-ci/container/build-piglit.sh
|
||||
|
||||
############### Build Fossilize
|
||||
|
||||
. .gitlab-ci/container/build-fossilize.sh
|
||||
|
||||
############### Build dEQP VK
|
||||
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
############### Build apitrace
|
||||
|
||||
. .gitlab-ci/container/build-apitrace.sh
|
||||
|
||||
############### Build gfxreconstruct
|
||||
|
||||
. .gitlab-ci/container/build-gfxreconstruct.sh
|
||||
|
||||
############### Build VKD3D-Proton
|
||||
|
||||
setup_wine "/vkd3d-proton-wine64"
|
||||
|
||||
. .gitlab-ci/container/build-vkd3d-proton.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
ccache --show-stats
|
||||
|
||||
apt-get purge -y \
|
||||
$STABLE_EPHEMERAL
|
||||
|
||||
apt-get autoremove -y --purge
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user