-
Notifications
You must be signed in to change notification settings - Fork 23
Bundle profiling instrumentation into a shared DLL #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e59d129
6077f18
6d567f2
433622f
00b8fc1
4274172
563149e
d4ed3c9
b039303
985062a
84ac6fe
35c0f87
2053b78
ff55440
8f0090b
56b8676
50245eb
188cdc1
4b44c68
f5eee99
0a3441a
e33ff0f
2f2f755
c0d7138
defc002
1426c0c
e843645
2082082
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| name: CI | ||
|
|
||
| # Run on every push and on pull requests targeting any branch. | ||
| on: | ||
| push: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Build GpProfDll + run DUnit tests (Win32) | ||
| runs-on: windows-latest | ||
|
|
||
| env: | ||
| # Set the BDS repository variable to the RAD Studio installation root, | ||
| # e.g. C:\Program Files (x86)\Embarcadero\Studio\23.0 (Delphi 12 Athens) | ||
| # C:\Program Files (x86)\Embarcadero\Studio\22.0 (Delphi 11 Alexandria) | ||
| # On a self-hosted runner the variable is usually already set in the system | ||
| # environment; override it here as needed via Settings → Variables → Actions. | ||
| BDS: ${{ vars.BDS }} | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| # ----------------------------------------------------------------------- | ||
| # Locate the Delphi compiler. We try the BDS repository variable first, | ||
| # then fall back to the most common installation paths for Delphi 12/11. | ||
| # ----------------------------------------------------------------------- | ||
| - name: Locate Delphi installation | ||
| id: delphi | ||
| shell: pwsh | ||
| run: | | ||
| $bds = $env:BDS | ||
| if (-not $bds) { | ||
| $candidates = @( | ||
| 'C:\Program Files (x86)\Embarcadero\Studio\23.0', | ||
| 'C:\Program Files (x86)\Embarcadero\Studio\22.0', | ||
| 'C:\Program Files (x86)\Embarcadero\Studio\21.0', | ||
| 'C:\Program Files (x86)\Embarcadero\Studio\20.0' | ||
| ) | ||
| foreach ($p in $candidates) { | ||
| if (Test-Path "$p\bin\DCC32.exe") { $bds = $p; break } | ||
| } | ||
| } | ||
| if (-not $bds -or -not (Test-Path "$bds\bin\DCC32.exe")) { | ||
| Write-Error @" | ||
| Delphi DCC32.exe not found. | ||
| Set the BDS Actions repository variable to your RAD Studio installation directory, | ||
| e.g. C:\Program Files (x86)\Embarcadero\Studio\23.0 | ||
| or use a self-hosted runner that already has Delphi on PATH. | ||
| "@ | ||
| exit 1 | ||
| } | ||
| Write-Host "Delphi found at: $bds" | ||
| # Export for subsequent steps | ||
| "BDS=$bds" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
|
|
||
| - name: Add MSBuild to PATH | ||
| uses: microsoft/setup-msbuild@v2 | ||
|
|
||
| # ----------------------------------------------------------------------- | ||
| # Build the profiling instrumentation DLL (Win32, Release). | ||
| # ----------------------------------------------------------------------- | ||
| - name: Build GpProfDll (Win32 · Release) | ||
| shell: pwsh | ||
| run: | | ||
| msbuild source\gpprof.dll\GpProfDll.dproj ` | ||
| /t:Build ` | ||
| /p:Config=Release /p:Platform=Win32 ` | ||
| /v:minimal /nologo | ||
|
|
||
| # ----------------------------------------------------------------------- | ||
| # Build the DUnit test console application (Win32, Release). | ||
| # DCC_ExeOutput is set to "." in the project, so the exe lands in | ||
| # source\gpprof.dll.tests\ alongside the stub GpProfDllTests.GPI file. | ||
| # ----------------------------------------------------------------------- | ||
| - name: Build GpProfDllTests (Win32 · Release) | ||
| shell: pwsh | ||
| run: | | ||
| msbuild source\gpprof.dll.tests\GpProfDllTests.dproj ` | ||
| /t:Build ` | ||
| /p:Config=Release /p:Platform=Win32 ` | ||
| /v:minimal /nologo | ||
|
|
||
| # ----------------------------------------------------------------------- | ||
| # Run the DUnit tests. | ||
| # TextTestRunner.RunRegisteredTests sets ExitCode to | ||
| # FailureCount + ErrorCount; exit 0 means all tests passed. | ||
| # ----------------------------------------------------------------------- | ||
| - name: Run DUnit tests | ||
| shell: pwsh | ||
| run: | | ||
| & .\source\gpprof.dll.tests\GpProfDllTests.exe | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Error "DUnit tests failed (exit code $LASTEXITCODE)" | ||
| exit $LASTEXITCODE | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ BIN/gpprof.drc | |
| BIN/gpprof.exe | ||
| BIN/gpprof.map | ||
| *.~dsk | ||
| tests/Win32/Debug/*.* | ||
| source/GpProfDllTestApp/Win32/Debug/*.* | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a Action for the ci Build calling the Tests
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 35c0f87.
To enable the workflow on the GitHub-hosted runner, set a repository variable
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a Action for the ci Build calling the Tests |
||
| *.identcache | ||
| *.rsmres | ||
| *.res | ||
|
|
@@ -19,11 +19,19 @@ bin64/*.map | |
| BIN/*.map | ||
| *.dproj.local | ||
| **/__history | ||
| /source/__recovery/__recovery.ini | ||
| /source/__recovery/gppMain.dfm | ||
| /source/__recovery/gppMain.pas | ||
| /source/VirtualTree.Tools/__recovery/__recovery.ini | ||
| /source/VirtualTree.Tools/__recovery/virtualTree.tools.statistics.pas | ||
| /source/GpProf.UI/__recovery/__recovery.ini | ||
| /source/GpProf.UI/__recovery/gppMain.dfm | ||
| /source/GpProf.UI/__recovery/gppMain.pas | ||
| /source/GpProf.UI/ui/VirtualTree.Tools/__recovery/__recovery.ini | ||
| /source/GpProf.UI/ui/VirtualTree.Tools/__recovery/virtualTree.tools.statistics.pas | ||
| *.dsk | ||
| *.bk2 | ||
| /gpprof_2017* | ||
| source/gpprof.dll.tests/*.exe | ||
| source/gpprof.dll.tests/*.map | ||
| source/gpprof.dll.tests/Win32/ | ||
| source/gpprof.dll.tests/Win64/ | ||
| source/GpProfDllTestApp/Win32/ | ||
| source/GpProfDllTestApp/Win64/ | ||
| /source/gpprof.dll/Win32/** | ||
| /source/gpprof.dll/Win64/** | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the main UI application to
source/GpProf.UI
Leave the .bat where they are. Update the script to point to the proper location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 84ac6fe. All UI application files (
gpprof.dpr/dproj,HISTORY/OPTIONS/baggage/help.inc,gpprof_Icon.ico,gpParser.MeasurePoint.pas,icons/,model/,ui/) have been moved tosource/GpProf.UI/.source/build.batstays in place and has been updated to referenceGpProf.UI\gpprof.dpr,GpProf.UI\baggage.rc, andGpProf.UI\gpprof.rc. All relative paths ingpprof.dprojhave been updated from..\to..\..\.