Skip to content

Commit

Permalink
Updates for 2.0.1 release.
Browse files Browse the repository at this point in the history
Change-Id: Ieefc0d1cd5fc148f1754a231f17874aabc556246
  • Loading branch information
AmitBM committed Aug 17, 2018
1 parent 9885677 commit 42e407f
Show file tree
Hide file tree
Showing 136 changed files with 1,562 additions and 795 deletions.
5 changes: 5 additions & 0 deletions Build/JenkinsGetVersion.py
Expand Up @@ -6,6 +6,7 @@
# python <workspace>\RGA\Build\JenkinsGetVersion.py -major|minor
# -major Return major version number
# -minor Return minor version number
# -revision Return revision version number
#
import os
import argparse
Expand All @@ -17,6 +18,7 @@
parser = argparse.ArgumentParser(description='Get RGA version information')
parser.add_argument('--major', action='store_true', default=False, help='Return value of MAJOR version string')
parser.add_argument('--minor', action='store_true', default=False, help='Return value of MINOR version string')
parser.add_argument('--revision', action='store_true', default=False, help='Return value of REVISION version string')
versionArgs = parser.parse_args()

# initialize file for search
Expand All @@ -35,9 +37,12 @@

major = rgaVersion.split('.')[0]
minor = rgaVersion.split('.')[1]
revision = rgaVersion.split('.')[2]

# print requested value
if versionArgs.major:
print major
if versionArgs.minor:
print minor
if versionArgs.revision:
print revision
32 changes: 16 additions & 16 deletions Build/JenkinsMSBuildClean.bat
@@ -1,16 +1,16 @@
REM Clean specified RGA project or solution configuration
REM Usage:
REM OUTPUT_PATH defined by parent script, WindowsBuild.bat
REM cd <workspace>\RGA\Build
REM .\JenkinsMSBuildClean.bat <solution-path> <platform> <configuration>

set SOLUTION_PATH=%1
set ARCH=%2
set CONFIG=%3

msbuild /m:6 /t:Clean /p:Configuration=%CONFIG% /p:Platform=%ARCH% /p:OutputPath=%OUTPUT_PATH% %SOLUTION_PATH%
if not %ERRORLEVEL%==0 (
echo Clean of solution %SOLUTION_PATH% failed!
exit 1
)

REM Clean specified RGA project or solution configuration
REM Usage:
REM OUTPUT_PATH defined by parent script, WindowsBuild.bat
REM cd <workspace>\RGA\Build
REM .\JenkinsMSBuildClean.bat <solution-path> <platform> <configuration>

set SOLUTION_PATH=%1
set ARCH=%2
set CONFIG=%3

msbuild /m:6 /t:Clean /p:Configuration=%CONFIG% /p:Platform=%ARCH% /p:OutputPath=%OUTPUT_PATH% %SOLUTION_PATH%
if not %ERRORLEVEL%==0 (
echo Clean of solution %SOLUTION_PATH% failed!
exit 1
)

51 changes: 41 additions & 10 deletions Build/JenkinsSetRcVersion.py
Expand Up @@ -17,20 +17,20 @@
scriptRoot = os.path.dirname(os.path.realpath(__file__))

# handle command line arguments
parser = argparse.ArgumentParser('Update version string in RadeonGPUAnalyzerGUI.rc')
parser = argparse.ArgumentParser('Update version string in RadeonGPUAnalyzerGUI.rc and RadeonGPUAnalyzerCLI.rc')
parser.add_argument('-M', '--major', action='store', required=True, help='version MAJOR value')
parser.add_argument('-m', '--minor', action='store', required=True, help='version MINOR value')
parser.add_argument('-b', '--build', action='store', required=True, help='version BUILD_NUMBER value')
parser.add_argument('-r', '--revision', action='store', default="0", help='version REVISION value')
updateArgs = parser.parse_args()

# initialize file for search
rgaVersionFile = os.path.normpath(os.path.join(os.environ['WORKSPACE'], 'RGA', 'Utils', 'res', 'RadeonGPUAnalyzerGUI.rc'))
rgaVersionData = open(rgaVersionFile, 'r')
# initialize GUI RC file for search
rgaGuiRCFile = os.path.normpath(os.path.join(os.environ['WORKSPACE'], 'RGA', 'Utils', 'res', 'RadeonGPUAnalyzerGUI.rc'))
rgaGuiRCData = open(rgaGuiRCFile, 'r')

# replace version string in data and write back out to file
# replace version string in GUI rc file and write information back to file
newData = []
for line in rgaVersionData:
for line in rgaGuiRCData:
if 'define RADEON_GPU_ANALYZER_MAJOR_VERSION ' in line:
newline = line.replace("0", updateArgs.major)
newData.append(newline)
Expand All @@ -49,7 +49,38 @@
else:
newData.append(line)

rgaVersionData.close()
rgaVersionData = open(rgaVersionFile, 'w')
rgaVersionData.writelines(newData)
rgaVersionData.close()
rgaGuiRCData.close()
rgaGuiRCData = open(rgaGuiRCFile, 'w')
rgaGuiRCData.writelines(newData)
rgaGuiRCData.close()

# initialize CLI RC file for search
rgaCliRCFile = os.path.normpath(os.path.join(os.environ['WORKSPACE'], 'RGA', 'Utils', 'res', 'RadeonGPUAnalyzerCLI.rc'))
rgaCliRCData = open(rgaCliRCFile, 'r')

# replace version string in GUI rc file and write information back to file
newData = []
for line in rgaCliRCData:
if 'define RADEON_GPU_ANALYZER_MAJOR_VERSION ' in line:
newline = line.replace("0", updateArgs.major)
newData.append(newline)
else:
if 'define RADEON_GPU_ANALYZER_MINOR_VERSION ' in line:
newline = line.replace("0", updateArgs.minor)
newData.append(newline)
else:
if 'define RADEON_GPU_ANALYZER_BUILD_NUMBER ' in line:
newline = line.replace("0", updateArgs.build)
newData.append(newline)
else:
if 'define RADEON_GPU_ANALYZER_REVISION_NUMBER ' in line:
newline = line.replace("0", updateArgs.revision)
newData.append(newline)
else:
newData.append(line)

rgaCliRCData.close()
rgaCliRCData = open(rgaCliRCFile, 'w')
rgaCliRCData.writelines(newData)
rgaCliRCData.close()

5 changes: 4 additions & 1 deletion Build/linux/copy_post_build_cli.sh
Expand Up @@ -17,6 +17,7 @@ if [ ! -d "../../output/bin/ROCm" ]; then
mkdir ../../output/bin/ROCm
fi
cp -rf ../../Core/ROCm/OpenCL/linux ../../output/bin/ROCm/OpenCL
cp ../../Core/ROCm/OpenCL/additional-targets ../../output/bin/ROCm/OpenCL/

# Copy the static analysis backend.
if [ "$INTERNAL" = true ]; then
Expand All @@ -43,5 +44,7 @@ fi
cp ./rga ../../output/bin/
chmod +x ../../output/bin/rga

# Copy license file.
# Copy license files.
cp ../../License.txt ../../output/bin/
cp ../../RGAThirdPartyLicenses.txt ../../output/bin/

2 changes: 1 addition & 1 deletion Build/linux/copy_post_build_gui.sh
Expand Up @@ -25,7 +25,6 @@ if [ -n "$QT_LIB_DIR" ]; then
cp -d $QT_LIB_DIR/../plugins/platforms/libqxcb.so ../../output/bin/Qt/platforms
fi

pwd
# Copy the documentation files
if [ ! -d "../../output/bin/Documentation" ]; then
mkdir ../../output/bin/Documentation
Expand All @@ -38,3 +37,4 @@ cp -rf ../../Documentation/build/html ../../output/bin/Documentation
# Copy the GUI launch script.
cp ./RadeonGPUAnalyzerGUI ../../output/bin/
chmod +x ../../output/bin/RadeonGPUAnalyzerGUI

0 comments on commit 42e407f

Please sign in to comment.