Skip to content

Commit 739a1f9

Browse files
committed
contrib/ci.inria.fr: shorten the build path in windows cmake
Our CI uses NMake CMake-generator which doesn't like very long file names. It already fails when building some branches with long names. Use only the last 9 characters of the tarball name (that's what our CI currently uses for abbreviated git hashes) instead of the full hwloc-<branch>-date.git<hash> tarball name as a build directory. Signed-off-by: Brice Goglin <[email protected]>
1 parent 6e4ecd0 commit 739a1f9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

contrib/ci.inria.fr/job-1-wincmake.bat

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
REM
2-
REM Copyright © 2012-2021 Inria. All rights reserved.
2+
REM Copyright © 2012-2023 Inria. All rights reserved.
33
REM See COPYING in top-level directory.
44
REM
55

66
call %JENKINS_CONFIG_DIR%\\ciprofile.bat
77

88
set TARBALL=%1
9+
set BASENAME=%TARBALL:~0,-7%
10+
REM reduce the build path name to avoid issues with very long file names in cmake/nmake
11+
set SHORTNAME=%BASENAME:~-9%
912

1013
echo ###############################
1114
echo Running on:
1215
hostname
1316
ver
1417
echo Tarball: %TARBALL%
18+
echo Build short name: %SHORTNAME%
1519
echo ############################
1620

1721
sh -c "tar xfz %TARBALL%"
1822
if %errorlevel% neq 0 exit /b %errorlevel%
1923

20-
cd %TARBALL:~0,-7%\contrib\windows-cmake
24+
move %BASENAME% %SHORTNAME%
25+
if %errorlevel% neq 0 exit /b %errorlevel%
26+
27+
cd %SHORTNAME%\contrib\windows-cmake
2128
if %errorlevel% neq 0 exit /b %errorlevel%
2229

2330
cmake --install-prefix=%cd%/install -DCMAKE_BUILD_TYPE=Release -B build

0 commit comments

Comments
 (0)