File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828
2929env :
3030 PROJECT_NAME : auto_tests
31- BUILD_CONFIGURATION : Release
3231 BUILD_PLATFORM : x64
32+ TESTS : ds_tests ppmem_tests scripting_tests
3333
3434 EXE_SUFFIX :
35- BUILD_CONFIGURATION_LOWER : retail
3635
3736
3837jobs :
3938 build :
4039 runs-on : ubuntu-latest
40+ strategy :
41+ fail-fast : false
42+ matrix :
43+ include :
44+ - configuration : Debug
45+ make_config : debug
46+ - configuration : Release
47+ make_config : release
4148
4249 steps :
4350 - uses : actions/checkout@v3
6269 run : ./utils/premake5 --file=premake5-tests.lua gmake2
6370
6471 - name : make
65- working-directory : ./build
66- run : make config=${{env.BUILD_CONFIGURATION_LOWER}}_${{env.BUILD_PLATFORM}} -j10
67-
72+ working-directory : ./build/${{env.PROJECT_NAME}}
73+ run : make config=${{matrix.make_config}}_${{env.BUILD_PLATFORM}} -j10
74+
75+ - name : Run tests
76+ working-directory : ./build/${{env.PROJECT_NAME}}/bin/${{env.BUILD_PLATFORM}}/${{matrix.configuration}}
77+ timeout-minutes : 10
78+ run : |
79+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)
80+ failed=""
81+ for test in $TESTS; do
82+ ./$test || failed="$failed $test"
83+ done
84+ if [ -n "$failed" ]; then echo "::error::Failed tests:$failed"; exit 1; fi
Original file line number Diff line number Diff line change 2828
2929env :
3030 PROJECT_NAME : auto_tests
31- BUILD_CONFIGURATION : Release
3231 BUILD_PLATFORM : x64
33- WINSDK_VER : " 10.0.19041.0"
32+ TESTS : ds_tests ppmem_tests scripting_tests
33+ # Tracy needs SDK 10.0.26100 or newer (RelationProcessorDie, ETW system provider GUIDs);
34+ # it is preinstalled on the windows-2022 runner image
35+ WINSDK_VER : " 10.0.26100.0"
3436
3537permissions :
3638 contents : read
3739
3840jobs :
3941 build :
4042 runs-on : windows-2022
43+ strategy :
44+ fail-fast : false
45+ matrix :
46+ configuration : [ Debug, Release ]
4147
4248 steps :
4349 - uses : actions/checkout@v3
5056 with :
5157 modules-to-cache : 7Zip4PowerShell
5258
53- - name : Setup Windows 10 SDK Action
54- uses : GuillaumeFalourd/setup-windows10-sdk-action@v2
55- with :
56- sdk-version : 19041 # TODO: env
57-
5859 - name : Run PS commands
5960 shell : pwsh
6061 run : .\utils\windows_dev_prepare.ps1
7071 working-directory : ${{env.GITHUB_WORKSPACE}}
7172 # Add additional options to the MSBuild command line here (like platform or verbosity level).
7273 # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
73- run : msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION }} /p:Platform=${{env.BUILD_PLATFORM}} build\${{env.PROJECT_NAME}}.sln
74+ run : msbuild /m /p:Configuration=${{matrix.configuration }} /p:Platform=${{env.BUILD_PLATFORM}} build\${{env.PROJECT_NAME}} \${{env.PROJECT_NAME}}.sln
7475
76+ - name : Run tests
77+ working-directory : build\${{env.PROJECT_NAME}}\bin\${{env.BUILD_PLATFORM}}\${{matrix.configuration}}
78+ shell : pwsh
79+ timeout-minutes : 10
80+ run : |
81+ $failed = @()
82+ foreach ($test in $env:TESTS.Split(' ')) {
83+ & ".\$test.exe"
84+ if ($LASTEXITCODE -ne 0) { $failed += $test }
85+ }
86+ if ($failed) { Write-Error "Failed tests: $failed"; exit 1 }
You can’t perform that action at this time.
0 commit comments