Import open.mp x64 SampSharp code from openmp-sampsharp-x64-poc#457
Conversation
Agent-Logs-Url: https://github.com/ikkentim/SampSharp/sessions/ab918aa2-7bd5-4b16-a758-55123ff486b2 Co-authored-by: ikkentim <2820647+ikkentim@users.noreply.github.com>
|
@copilot instead of copying over the .gitignore, lets instead merge the two. |
Agent-Logs-Url: https://github.com/ikkentim/SampSharp/sessions/2298c241-e0c7-4485-8cd8-2ba16faea243 Co-authored-by: ikkentim <2820647+ikkentim@users.noreply.github.com>
Done in d781313. The merged |
ikkentim
left a comment
There was a problem hiding this comment.
some points from the GH issue have not been addressed.
| @@ -0,0 +1,5 @@ | |||
| cmake_minimum_required(VERSION 3.19) | |||
There was a problem hiding this comment.
dont have this file in the repo root; we build directly the src/sampsharp-component subdir.
There was a problem hiding this comment.
Removed in 033597a. The root CMakeLists.txt is gone; the component is built directly via src/sampsharp-component/build.cmd / build.sh.
| @@ -0,0 +1,91 @@ | |||
| <Project> | |||
There was a problem hiding this comment.
Rename to Directory.Build.props to match MSBuild docs. (upper case B)
There was a problem hiding this comment.
Renamed to Directory.Build.props in 033597a, and updated the SampSharp.sln reference to match.
| @@ -0,0 +1,2 @@ | |||
| cmake -S . -B build -A x64 -T ClangCL -DCMAKE_POLICY_VERSION_MINIMUM=3.5 | |||
There was a problem hiding this comment.
update both build scripts (win/linux) to more closely match the patterns of src/legacy/sampsharp build scripts; it should build like that one to /build; and have publish option to produce artifacts.
There was a problem hiding this comment.
also, update the build scripts in to repo root for both the component build and the dotnet build. the scripts in repo root have stubs that need to be implemented (search 'build not yet implemented')
also, update the build and publish workflows, as mentioned in the issue.
There was a problem hiding this comment.
Done in 033597a:
src/sampsharp-component/build.cmdandbuild.shnow follow the legacy patterns (SRCDIR/ROOTDIR/BUILDDIR structure, builds tobuild/cmake/component/artifacts)- Added
src/sampsharp-component/publish.cmdandpublish.sh(mirrors legacy publish scripts, copies artifacts tobuild/artifacts/sampsharp-component/) - Root
build.cmd/build.sh:componentandcomponent-librariesstubs are fully implemented (delegating to the component scripts) - Workflows
component-linux.yml,component-win.yml, anddotnet.ymlare updated with real build steps, taking inspiration from the legacy workflows
|
@copilot ptal |
…ory.Build.props, update build scripts and workflows Agent-Logs-Url: https://github.com/ikkentim/SampSharp/sessions/8b4fc46e-cbf2-47bf-a25f-d5daa919edf9 Co-authored-by: ikkentim <2820647+ikkentim@users.noreply.github.com>
Addressed in 033597a: hooked up the component build scripts (root |
| echo Component x64 plugin build not yet implemented. | ||
| goto end | ||
| if "%ACTION%"=="" ( | ||
| echo Building component x64 plugin... |
There was a problem hiding this comment.
in the build scripts log lines (both win/linux) call this the 'open.mp component' instead of 'component x64 plugin'
There was a problem hiding this comment.
Updated in 30d96bf — all "component x64 plugin" log lines in the root and component build scripts now say "open.mp component".
| echo Component C# libraries not yet implemented. | ||
| goto end | ||
| if "%ACTION%"=="" ( | ||
| echo Building component C# libraries... |
There was a problem hiding this comment.
in the build scripts log lines (both win/linux) call this the 'C# libraries' instead of 'component C# libraries
There was a problem hiding this comment.
Updated in 30d96bf — "component C# libraries" is now just "C# libraries" in both root build scripts.
|
|
||
| # TODO: Update this workflow when new SampSharp code is in src/sampsharp/ | ||
| # For now, this is a placeholder. | ||
| name: CI - Component Libraries |
There was a problem hiding this comment.
release.yml workflow also needs to be written. can also be much like the release-legacy.yml
There was a problem hiding this comment.
Done in 30d96bf — release.yml is now fully implemented following the same pattern as release-legacy.yml: parallel Windows/Linux component builds, a release job that downloads both artifacts and packages them into a zip, creates a GitHub release, then packs and publishes NuGet packages.
Agent-Logs-Url: https://github.com/ikkentim/SampSharp/sessions/cbf76448-ab4a-4fbc-a059-134e175157cb Co-authored-by: ikkentim <2820647+ikkentim@users.noreply.github.com>
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: '8.0.x' |
There was a problem hiding this comment.
You forgot to also update the naming in the usage section of the scripts
There was a problem hiding this comment.
Fixed in 4305294 — the usage sections in both build.cmd and build.sh now use "open.mp component" and "C# libraries".
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: '8.0.x' |
Agent-Logs-Url: https://github.com/ikkentim/SampSharp/sessions/8d2a697e-852b-4b0d-a15a-3b1b77108e8c Co-authored-by: ikkentim <2820647+ikkentim@users.noreply.github.com>
ikkentim
left a comment
There was a problem hiding this comment.
open.mp component build fails on windows
Run .\build.cmd component publish
Building and publishing open.mp component...
Building open.mp component...
Root: D:\a\SampSharp
Build: D:\a\SampSharp\build\cmake\component
CMake Error: The source directory "D:/a/SampSharp/src/sampsharp-component" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
also, rename the new workflows to match the legacy workflows and the names used in build.cmd
Agent-Logs-Url: https://github.com/ikkentim/SampSharp/sessions/a39a3185-b62b-4fb0-9913-dec6747fa0a7 Co-authored-by: ikkentim <2820647+ikkentim@users.noreply.github.com>
Fixed in 7a448cd:
All open items are addressed. Latest commit is 7a448cd. |
ikkentim
left a comment
There was a problem hiding this comment.
Linux workflow fails for component
Error: SampSharp.so or SampSharp.dll not found at /home/runner/work/SampSharp/build/cmake/component/artifacts
the build result is probably called sampsharp-component.(dll/so) or something? take a look at cmake files and find out fix
Agent-Logs-Url: https://github.com/ikkentim/SampSharp/sessions/0c492243-e3f4-4744-aef9-bf7e929c89e6 Co-authored-by: ikkentim <2820647+ikkentim@users.noreply.github.com>
The CMake target produces |
.gitignorefrom both reposCMakeLists.txtDirectory.Build.props(uppercase B) and update SampSharp.sln referencesrc/sampsharp-component/build.cmdandbuild.shto follow legacy script patternsbuild.cmd,build.sh,publish.cmd,publish.sh) — 2 levels up, not 3src/sampsharp-component/publish.cmdandpublish.shbuild.cmdandbuild.shto implementcomponentandcomponent-librariestargetscomponent-linux.yml,component-win64.yml(renamed fromcomponent-win.yml),dotnet-component.yml(renamed fromdotnet.yml)dotnet-component.ymlto use .NET 10release.ymlmodeled afterrelease-legacy.ymlrelease.ymlto use .NET 10