Skip to content

Commit 84ee59d

Browse files
authored
Support building of loadtest apps with locally installed dependencies (#799)
to allow building on Windows arm64 without adding more binaries to `other_lib`. * Rationalize include file search directories for appfwSDL, GLAppSDL and glloadtests. * Set up to build loadtest apps for arm64 in Windows CI. Disabled because the Windows SDK chosen by CMake does not contain a needed library and I have yet to find a way to force selection of the latest SDK which does include it. * Set up x86_64 macOS CI builds to use Brew-installed dependencies. Other items emerged during this work. * Fix Windows' loadtest apps to find their resources when run. * Fix inability to debug libktx on Windows caused by both `ktx.exe` and `ktx.dll` trying to use `ktx.pdb`. * Fix syntax error in tag selection in Actions .yml files.
1 parent 88fc7a6 commit 84ee59d

File tree

10 files changed

+220
-76
lines changed

10 files changed

+220
-76
lines changed

.github/workflows/android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ on:
1515
# Also trigger on push of release tags to any branch. Useful
1616
# for testing release builds before merging to main.
1717
tags:
18-
- 'v[0-9]+\.[0-9]+\.[0-9]+'
19-
- 'v[0-9]+\.[0-9]+\.[0-9]+-*'
18+
- 'v[0-9]+.[0-9]+.[0-9]+'
19+
- 'v[0-9]+.[0-9]+.[0-9]+-*'
2020
paths-ignore:
2121
- .appveyor.yml
2222
- .travis.yml

.github/workflows/mingw.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ on:
1515
# Also trigger on push of release tags to any branch. Useful
1616
# for testing release builds before merging to main.
1717
tags:
18-
- 'v[0-9]+\.[0-9]+\.[0-9]+'
19-
- 'v[0-9]+\.[0-9]+\.[0-9]+-*'
18+
- 'v[0-9]+.[0-9]+.[0-9]+'
19+
- 'v[0-9]+.[0-9]+.[0-9]+-*'
2020
paths-ignore:
2121
- .appveyor.yml
2222
- .travis.yml

.github/workflows/windows.yml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ on:
1515
# Also trigger on push of release tags to any branch. Useful
1616
# for testing release builds before merging to main.
1717
tags:
18-
- 'v[0-9]+\.[0-9]+\.[0-9]+'
19-
- 'v[0-9]+\.[0-9]+\.[0-9]+-*'
18+
- 'v[0-9]+.[0-9]+.[0-9]+'
19+
- 'v[0-9]+.[0-9]+.[0-9]+-*'
2020
paths-ignore:
2121
- .appveyor.yml
2222
- .travis.yml
@@ -65,7 +65,9 @@ jobs:
6565
toolset: CLangCL
6666
arch: arm64
6767
# No tests on arm64 since the host is x64 and can't run the
68-
# built tests
68+
# built tests. loadtests is OFF because CMake insists on
69+
# choosing an older Windows SDK which is missing glu32.lib.
70+
# Can set to OpenGL once issue is resolved.
6971
options: {
7072
config: 'Debug,Release',
7173
doc: ON, jni: ON, loadtests: OFF, tests: ON, tools: ON, tools_cts: ON,
@@ -120,9 +122,26 @@ jobs:
120122
- name: Install NSIS with large string support
121123
shell: bash
122124
run: |
123-
stack exec -- wget -O nsis-3.08-strlen_8192.zip https://downloads.sourceforge.net/nsis/NSIS%203/3.08/nsis-3.08-strlen_8192.zip
124-
7z x -aoa -o"/c/Program Files (x86)/NSIS" nsis-3.08-strlen_8192.zip
125-
rm nsis-3.08-strlen_8192.zip
125+
retryCount=4
126+
success=0
127+
for i in $(seq $retryCount) ; do
128+
echo "Attempt no: $i"
129+
stack exec -- wget -O nsis-3.08-strlen_8192.zip https://downloads.sourceforge.net/nsis/NSIS%203/3.08/nsis-3.08-strlen_8192.zip
130+
if [[ $? -eq 0 ]] ; then
131+
success=1
132+
7z x -aoa -o"/c/Program Files (x86)/NSIS" nsis-3.08-strlen_8192.zip
133+
rm nsis-3.08-strlen_8192.zip
134+
echo "Installation successful."
135+
break
136+
else
137+
echo "Installation failed. Retrying..."
138+
sleep $(( 2*$i ))
139+
fi
140+
done
141+
if (( ! $success )) ; then
142+
echo "Installation failed after $retryCount attempts."
143+
exit 1
144+
fi
126145
127146
- name: Force fetch provoking tag's annotation.
128147
# Work around https://github.com/actions/checkout/issues/290.
@@ -164,6 +183,15 @@ jobs:
164183
echo "CODE_SIGN_KEY_VAULT=Azure" >> $env:GITHUB_ENV
165184
}
166185
186+
- name: Install Dependencies for load tests on arm64
187+
if: matrix.arch == 'arm64' && matrix.options.loadtests != 'OFF'
188+
run: |
189+
pushd $env:VCPKG_INSTALLATION_ROOT
190+
./vcpkg install SDL2:arm64-windows assimp:arm64-windows glew:arm64-windows
191+
cat buildtrees\glew\install-arm64-windows-rel-out.log
192+
popd
193+
echo "CMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" >> $env:GITHUB_ENV
194+
167195
- name: Install Dependencies
168196
# This script only installs what's needed by ON FEATUREs.
169197
run: ci_scripts/install_win.ps1

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ addons:
2020
packages:
2121
- git-lfs
2222
- doxygen
23-
- sdl2
2423
#update: true
2524

2625
env:
@@ -217,6 +216,12 @@ install:
217216
fi
218217
;;
219218
osx)
219+
if [ "$PLATFORM" = "macOS" -a "$ARCHS" = $(uname -m) ]; then
220+
# We're building for the host processor type. Safe to use
221+
# brew installed libraries instead of repo included ones.
222+
brew install sdl2
223+
brew install assimp
224+
fi
220225
./ci_scripts/install_macos.sh
221226
;;
222227
esac

ci_scripts/build_win.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,18 @@ if(!$?){
144144
exit 1
145145
}
146146

147+
# Find SDK version and ls it
148+
#if ($FEATURE_LOADTESTS -ne "OFF") {
149+
# $m = select-string -Pattern "<WindowsTargetPlatformVersion>(?<version>(?<major>[0-9][0-9])[0-9\.]*)</.*" -Path $BUILD_DIR/tests/loadtests/gl3loadtests.vcxproj
150+
# $sdk_ver = $m.matches[0].groups["version"].value
151+
# $sdk_major = $m.matches[0].groups["major"].value
152+
# echo "sdk_ver = $sdk_ver"
153+
# echo "sdk_major = $sdk_major"
154+
# ls "C:\Program Files (x86)\Windows Kits\$sdk_major\lib"
155+
# ls "C:\Program Files (x86)\Windows Kits\$sdk_major\lib\$sdk_ver\um\arm64\glu32.lib" -ErrorAction 'Continue'
156+
# ls "C:\Program Files (x86)\Windows Kits\$sdk_major\lib\$sdk_ver\um\x64\glu32.lib" -ErrorAction 'Continue'
157+
#}
158+
147159
$configArray = $CONFIGURATION.split(",")
148160
foreach ($config in $configArray) {
149161
pushd $BUILD_DIR

0 commit comments

Comments
 (0)