-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RGA-2041 - Update RGA build scripts.
- Loading branch information
Showing
3 changed files
with
197 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!bash | ||
# jenkins_build_rga.sh | ||
# Build RGA artifacts on Linux | ||
# | ||
# Usage: bash ./RGA/Build/Util/Linux/jenkins_build_rga.sh | ||
# | ||
# set script to be verbose and to exit on any command error. | ||
set -x | ||
set -e | ||
|
||
# check for optional arguments. | ||
# Build Release or Debug configuration. | ||
export BUILD_TYPE=Release | ||
# Build GUI with test automation support. | ||
export AUTOMATION= | ||
export AUTOMATION_SUFFIX= | ||
# Support running this script twice in the same workspace. | ||
export FETCH_DEPENDENCIES="Yes" | ||
while [[ $# -gt 0 ]]; do | ||
key="$1" | ||
case $key in | ||
--debug) | ||
export BUILD_TYPE=Debug | ||
shift # past argument | ||
;; | ||
--automation) | ||
export AUTOMATION=--automation | ||
export AUTOMATION_SUFFIX=_Test | ||
shift # past argument | ||
;; | ||
--nofetch) | ||
export FETCH_DEPENDENCIES="No" | ||
shift # past argument | ||
;; | ||
*) | ||
echo "Invalid argument $key" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
# extract Vulkan RGA Layer files. | ||
if [ $FETCH_DEPENDENCIES == "Yes" ] ; then | ||
tar -xf VKLayerRGA-*.tgz | ||
rm -f VKLayerRGA-*.tgz | ||
fi | ||
|
||
# set build date, and vulkan and Qt version. | ||
export RGA_BUILD_DATE=$(date +'%m/%d/%Y') | ||
export VULKAN_SDK_VER=1.1.97.0 | ||
export QT_VER=5.9.2 | ||
|
||
# Populate workspace without commit-msg hook. | ||
cd RGA/Build | ||
if [ $FETCH_DEPENDENCIES == "Yes" ] ; then | ||
python FetchDependencies.py --no-hooks | ||
fi | ||
|
||
# Initialize build. | ||
./Prebuild.sh --no-fetch --qt /opt/Qt/Qt$QT_VER/$QT_VER/gcc_64 --build $BUILD_TYPE $AUTOMATION --vk-include /opt/VulkanSDK/$VULKAN_SDK_VER/x86_64/include --vk-lib /opt/VulkanSDK/$VULKAN_SDK_VER/x86_64/lib | ||
|
||
# Build RGA. | ||
cd Linux/Make${AUTOMATION_SUFFIX}/ | ||
make -j 4 | ||
|
||
# Build documentation | ||
cd $WORKSPACE/RGA/Documentation | ||
make -j 4 clean | ||
make -j 4 html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
REM Create MSI package | ||
cd %WORKSPACE% | ||
@echo on | ||
REM update the RGA-Installer.aip file with the current version information | ||
for /F "tokens=* USEBACKQ" %%F in (`python %WORKSPACE%\RGA\Build\Util\Windows\JenkinsGetVersion.py --major`) do ( | ||
set MAJOR=%%F | ||
) | ||
for /F "tokens=* USEBACKQ" %%F in (`python %WORKSPACE%\RGA\Build\Util\Windows\JenkinsGetVersion.py --minor`) do ( | ||
set MINOR=%%F | ||
) | ||
for /F "tokens=* USEBACKQ" %%F in (`python %WORKSPACE%\RGA\Build\Util\Windows\JenkinsGetVersion.py --update`) do ( | ||
set UPDATE=%%F | ||
) | ||
set BUILD=%BUILD_NUMBER% | ||
set VERSION=%MAJOR%.%MINOR%.%UPDATE%.%BUILD% | ||
|
||
cd %WORKSPACE%\RGA\Installer | ||
"C:\Program Files (x86)\Caphyon\Advanced Installer 13.5\bin\x86\AdvancedInstaller.com" /edit %WORKSPACE%\RGA\Installer\RGA-Installer.aip /SetVersion %VERSION% | ||
"C:\Program Files (x86)\Caphyon\Advanced Installer 13.5\bin\x86\AdvancedInstaller.com" /edit %WORKSPACE%\RGA\Installer\RGA-Installer.aip /SetProperty SETUP_FILE_NAME=RGA-%VERSION%-Installer.msi | ||
"C:\Program Files (x86)\Caphyon\Advanced Installer 13.5\bin\x86\AdvancedInstaller.com" /edit %WORKSPACE%\RGA\Installer\RGA-Installer.aip /SetProperty ARPCOMMENTS=RGA-%VERSION%-Installer.msi | ||
"C:\Program Files (x86)\Caphyon\Advanced Installer 13.5\bin\x86\AdvancedInstaller.com" /edit %WORKSPACE%\RGA\Installer\RGA-Installer.aip /SetProperty PackageFileName=RGA-%VERSION%-Installer.msi -buildname x64_Release_Static | ||
"C:\Program Files (x86)\Caphyon\Advanced Installer 13.5\bin\x86\AdvancedInstaller.com" /edit %WORKSPACE%\RGA\Installer\RGA-Installer.aip /SetIcon -icon %WORKSPACE%\RGA\RadeonGPUAnalyzerGUI\res\icons\rgaIcon.ico | ||
|
||
REM Create RGA msi installer file | ||
"C:\Program Files (x86)\Caphyon\Advanced Installer 13.5\bin\x86\AdvancedInstaller.com" /build %WORKSPACE%\RGA\Installer\RGA-Installer.aip -buildslist x64_Release_Static | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
REM Create RGA zip packages | ||
@echo on | ||
REM Prep for zip file creation | ||
REM WORKSPACE and BUILD_NUMBER set by Jenkins | ||
REM this scripts assumes that AMDVLK64.DLL has been downloaded into the correct location: | ||
REM RGA/Output/bin/Release/x64/Vulkan/bin/amdvlk/ | ||
REM Usage: call RGA\Build\Util\Windows\jenkins_rga_pkg.bat [automation] | ||
REM | ||
|
||
REM check for optional arguments "automation" and "debug" | ||
set BUILD_TYPE=Release | ||
if "%1" == "debug" set BUILD_TYPE=Debug | ||
if "%2" == "debug" set BUILD_TYPE=Debug | ||
|
||
set OUTPUT_PATH=%WORKSPACE%\RGA\Output\%BUILD_TYPE% | ||
set COPY_TEST_SCRIPT=No | ||
if "%1" == "automation" ( | ||
set OUTPUT_PATH=%WORKSPACE%\RGA\Output_Test\%BUILD_TYPE% | ||
set COPY_TEST_SCRIPT=Yes | ||
) | ||
if "%2" == "automation" ( | ||
set OUTPUT_PATH=%WORKSPACE%\RGA\Output_Test\%BUILD_TYPE% | ||
set COPY_TEST_SCRIPT=Yes | ||
) | ||
|
||
set RGAPATH=%WORKSPACE%\RGA | ||
set BUILDPATH=%RGAPATH%\BuildOutput | ||
set ZIPDIRRGA=%BUILDPATH% | ||
if not exist %ZIPDIRRGA% mkdir %ZIPDIRRGA% | ||
if not exist %ZIPDIRRGA%\bin mkdir %ZIPDIRRGA%\bin | ||
|
||
cd %WORKSPACE% | ||
REM Get version information to use in package name. | ||
for /F "tokens=* USEBACKQ" %%F in (`python %WORKSPACE%\RGA\Build\Util\Windows\JenkinsGetVersion.py --major`) do ( | ||
set MAJOR=%%F | ||
) | ||
for /F "tokens=* USEBACKQ" %%F in (`python %WORKSPACE%\RGA\Build\Util\Windows\JenkinsGetVersion.py --minor`) do ( | ||
set MINOR=%%F | ||
) | ||
for /F "tokens=* USEBACKQ" %%F in (`python %WORKSPACE%\RGA\Build\Util\Windows\JenkinsGetVersion.py --update`) do ( | ||
set UPDATE=%%F | ||
) | ||
set ARCHIVE_NAME=RGA-%MAJOR%.%MINOR%.%UPDATE% | ||
|
||
REM define some variables | ||
REM This script assumes it is being used to generate a Release Candidate package using a Release build config | ||
set ARCH=x64 | ||
set BUILD=%BUILD_NUMBER% | ||
|
||
REM Copy files from build output or source files into package folder to be used by powershell (compress-archive) | ||
REM or Advanced Installer | ||
cd %WORKSPACE% | ||
REM GUI files | ||
XCopy "%OUTPUT_PATH%\bin\RadeonGPUAnalyzerGUI.exe" "%BUILDPATH%\bin\RadeonGPUAnalyzerGUI.exe*" | ||
XCopy "%OUTPUT_PATH%\bin\Qt5*.dll" "%BUILDPATH%\bin\" | ||
XCopy "%OUTPUT_PATH%\bin\iconengines\*.dll" "%BUILDPATH%\bin\iconengines\" | ||
XCopy "%OUTPUT_PATH%\bin\platforms\*.dll" "%BUILDPATH%\bin\platforms\" | ||
XCopy "%OUTPUT_PATH%\bin\imageformats\*.dll" "%BUILDPATH%\bin\imageformats\" | ||
REM CLI and core files | ||
XCopy "%OUTPUT_PATH%\bin\rga.exe" "%ZIPDIRRGA%\bin\rga.exe*" | ||
XCopy "%OUTPUT_PATH%\bin\AMDToolsDownloader.exe" "%ZIPDIRRGA%\bin\AMDToolsDownloader.exe*" | ||
XCopy "%OUTPUT_PATH%\bin\x64\VirtualContext.exe" "%ZIPDIRRGA%\bin\x64\VirtualContext.exe*" | ||
XCopy "%OUTPUT_PATH%\bin\x64\amdspv.exe" "%ZIPDIRRGA%\bin\x64\amdspv.exe*" | ||
XCopy "%OUTPUT_PATH%\bin\x64\spvgen.dll" "%ZIPDIRRGA%\bin\x64\spvgen.dll*" | ||
XCopy "%OUTPUT_PATH%\bin\x64\shae.exe" "%ZIPDIRRGA%\bin\x64\shae.exe*" | ||
XCopy "%OUTPUT_PATH%\bin\x64\RGADX11.exe" "%ZIPDIRRGA%\bin\x64\RGADX11.exe*" | ||
XCopy /y /e "%OUTPUT_PATH%\bin\x64\LC" "%ZIPDIRRGA%\bin\x64\LC\" | ||
XCopy /y /e "%OUTPUT_PATH%\bin\x64\Vulkan" "%ZIPDIRRGA%\bin\x64\Vulkan\" | ||
XCopy /y /e "%OUTPUT_PATH%\bin\x64\DX12" "%ZIPDIRRGA%\bin\x64\DX12\" | ||
XCopy /i /e "%OUTPUT_PATH%\bin\Documentation" "%ZIPDIRRGA%\bin\Documentation" | ||
XCopy "%OUTPUT_PATH%\bin\License.txt" "%ZIPDIRRGA%\bin\" | ||
XCopy "%OUTPUT_PATH%\bin\RGAThirdPartyLicenses.txt" "%ZIPDIRRGA%\bin\" | ||
XCopy "RGA\EULA.txt" "%ZIPDIRRGA%\bin\" | ||
XCopy "C:\Program Files (x86)\Windows Kits\10\bin\x64\d3dcompiler_47.dll" "%ZIPDIRRGA%\bin\x64\d3dcompiler_47.dll*" | ||
|
||
REM Copy the Vulkan RGA Layer files | ||
for /f "tokens=*" %%i in ('dir /b /d VKLayerRGA*') do set VKLAYERDIR=%%i | ||
if not exist %ZIPDIRRGA%\bin\layer mkdir %ZIPDIRRGA%\bin\layer | ||
XCopy "%WORKSPACE%\%VKLAYERDIR%\*.dll" "%ZIPDIRRGA%\bin\layer\" | ||
XCopy "%WORKSPACE%\%VKLAYERDIR%\*.json" "%ZIPDIRRGA%\bin\layer\" | ||
XCopy "%WORKSPACE%\RGA\Utils\Vulkan\Windows\RGALayer\RGALayerLauncher\bin\%BUILD_TYPE%\*.exe" "%ZIPDIRRGA%\bin" | ||
|
||
REM Copy the VC++ Redistributable package binaries | ||
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x64\Microsoft.VC140.CRT\concrt140.dll" "%ZIPDIRRGA%\bin\concrt140.dll*" | ||
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x64\Microsoft.VC140.CRT\msvcp140.dll" "%ZIPDIRRGA%\bin\msvcp140.dll*" | ||
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x64\Microsoft.VC140.CRT\vccorlib140.dll" "%ZIPDIRRGA%\bin\vccorlib140.dll*" | ||
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x64\Microsoft.VC140.CRT\vcruntime140.dll" "%ZIPDIRRGA%\bin\vcruntime140.dll*" | ||
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x64\Microsoft.VC120.CRT\msvcp120.dll" "%ZIPDIRRGA%\bin\x64\Vulkan\bin\msvcp120.dll*" | ||
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x64\Microsoft.VC120.CRT\msvcr120.dll" "%ZIPDIRRGA%\bin\x64\Vulkan\bin\msvcr120.dll*" | ||
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x64\Microsoft.VC120.CRT\vccorlib120.dll" "%ZIPDIRRGA%\bin\x64\Vulkan\bin\vccorlib120.dll*" | ||
|
||
REM Copy the test files if the user specified "automation" | ||
if "%COPY_TEST_SCRIPT%" == "Yes" ( | ||
XCopy /i /e "%WORKSPACE%\RGA-Internal\Tests\data" "%OUTPUT_PATH%\bin\data" | ||
XCopy /i /e "%WORKSPACE%\RGA-Internal\Tests\data" "%ZIPDIRRGA%\bin\data" | ||
XCopy "%WORKSPACE%\RGA-Internal\Tests-GUI\run.py" "%ZIPDIRRGA%\bin\" | ||
XCopy "%WORKSPACE%\RGA-Internal\Tests-GUI\run.py" "%OUTPUT_PATH%\bin\" | ||
) | ||
|
||
REM Create RGA zip file | ||
cd %ZIPDIRRGA%\bin | ||
powershell compress-archive -Path * -DestinationPath %BUILDPATH%\%ARCHIVE_NAME%.%BUILD%.zip |