Skip to content

Commit

Permalink
Support building of loadtest apps with locally installed dependencies (
Browse files Browse the repository at this point in the history
…#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.
  • Loading branch information
MarkCallow authored Nov 12, 2023
1 parent 88fc7a6 commit 84ee59d
Show file tree
Hide file tree
Showing 10 changed files with 220 additions and 76 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ on:
# Also trigger on push of release tags to any branch. Useful
# for testing release builds before merging to main.
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
- 'v[0-9]+\.[0-9]+\.[0-9]+-*'
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-*'
paths-ignore:
- .appveyor.yml
- .travis.yml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ on:
# Also trigger on push of release tags to any branch. Useful
# for testing release builds before merging to main.
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
- 'v[0-9]+\.[0-9]+\.[0-9]+-*'
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-*'
paths-ignore:
- .appveyor.yml
- .travis.yml
Expand Down
40 changes: 34 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ on:
# Also trigger on push of release tags to any branch. Useful
# for testing release builds before merging to main.
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
- 'v[0-9]+\.[0-9]+\.[0-9]+-*'
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-*'
paths-ignore:
- .appveyor.yml
- .travis.yml
Expand Down Expand Up @@ -65,7 +65,9 @@ jobs:
toolset: CLangCL
arch: arm64
# No tests on arm64 since the host is x64 and can't run the
# built tests
# built tests. loadtests is OFF because CMake insists on
# choosing an older Windows SDK which is missing glu32.lib.
# Can set to OpenGL once issue is resolved.
options: {
config: 'Debug,Release',
doc: ON, jni: ON, loadtests: OFF, tests: ON, tools: ON, tools_cts: ON,
Expand Down Expand Up @@ -120,9 +122,26 @@ jobs:
- name: Install NSIS with large string support
shell: bash
run: |
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
7z x -aoa -o"/c/Program Files (x86)/NSIS" nsis-3.08-strlen_8192.zip
rm nsis-3.08-strlen_8192.zip
retryCount=4
success=0
for i in $(seq $retryCount) ; do
echo "Attempt no: $i"
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
if [[ $? -eq 0 ]] ; then
success=1
7z x -aoa -o"/c/Program Files (x86)/NSIS" nsis-3.08-strlen_8192.zip
rm nsis-3.08-strlen_8192.zip
echo "Installation successful."
break
else
echo "Installation failed. Retrying..."
sleep $(( 2*$i ))
fi
done
if (( ! $success )) ; then
echo "Installation failed after $retryCount attempts."
exit 1
fi
- name: Force fetch provoking tag's annotation.
# Work around https://github.com/actions/checkout/issues/290.
Expand Down Expand Up @@ -164,6 +183,15 @@ jobs:
echo "CODE_SIGN_KEY_VAULT=Azure" >> $env:GITHUB_ENV
}
- name: Install Dependencies for load tests on arm64
if: matrix.arch == 'arm64' && matrix.options.loadtests != 'OFF'
run: |
pushd $env:VCPKG_INSTALLATION_ROOT
./vcpkg install SDL2:arm64-windows assimp:arm64-windows glew:arm64-windows
cat buildtrees\glew\install-arm64-windows-rel-out.log
popd
echo "CMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" >> $env:GITHUB_ENV
- name: Install Dependencies
# This script only installs what's needed by ON FEATUREs.
run: ci_scripts/install_win.ps1
Expand Down
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ addons:
packages:
- git-lfs
- doxygen
- sdl2
#update: true

env:
Expand Down Expand Up @@ -217,6 +216,12 @@ install:
fi
;;
osx)
if [ "$PLATFORM" = "macOS" -a "$ARCHS" = $(uname -m) ]; then
# We're building for the host processor type. Safe to use
# brew installed libraries instead of repo included ones.
brew install sdl2
brew install assimp
fi
./ci_scripts/install_macos.sh
;;
esac
Expand Down
12 changes: 12 additions & 0 deletions ci_scripts/build_win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,18 @@ if(!$?){
exit 1
}

# Find SDK version and ls it
#if ($FEATURE_LOADTESTS -ne "OFF") {
# $m = select-string -Pattern "<WindowsTargetPlatformVersion>(?<version>(?<major>[0-9][0-9])[0-9\.]*)</.*" -Path $BUILD_DIR/tests/loadtests/gl3loadtests.vcxproj
# $sdk_ver = $m.matches[0].groups["version"].value
# $sdk_major = $m.matches[0].groups["major"].value
# echo "sdk_ver = $sdk_ver"
# echo "sdk_major = $sdk_major"
# ls "C:\Program Files (x86)\Windows Kits\$sdk_major\lib"
# ls "C:\Program Files (x86)\Windows Kits\$sdk_major\lib\$sdk_ver\um\arm64\glu32.lib" -ErrorAction 'Continue'
# ls "C:\Program Files (x86)\Windows Kits\$sdk_major\lib\$sdk_ver\um\x64\glu32.lib" -ErrorAction 'Continue'
#}

$configArray = $CONFIGURATION.split(",")
foreach ($config in $configArray) {
pushd $BUILD_DIR
Expand Down
Loading

0 comments on commit 84ee59d

Please sign in to comment.