-
-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Problem
Github no longer supports Ubuntu 20.04 runners, causing us to not be able to release without potentially breaking user's builds when running their game/server on older Ubuntu versions.
Context
We're currently building sentry-native as part of our CI (and package & release process).
For Linux, we've pinned the runner version to Ubuntu 20.04 which is no longer supported. We were building on the oldest available version to maintain compatibility.
sentry-unity/.github/workflows/ci.yml
Lines 34 to 37 in 3add276
| - target: Linux | |
| # Build using older Linux version to preserve sdk compatibility with old GLIBC | |
| # See discussion in https://github.com/getsentry/sentry-unity/issues/1730 for more details | |
| host: ubuntu-20.04 |
We're already fixing and installing additional Linux dependencies as part of the build pipeline.
The actual building happens from within a MSBuild target
sentry-unity/Directory.Build.targets
Lines 303 to 319 in 3add276
| <Target Name="BuildLinuxSDK" Condition="'$(MSBuildProjectName)' == 'Sentry.Unity' | |
| And $([MSBuild]::IsOsPlatform('Linux')) | |
| And !Exists('$(SentryLinuxArtifactsDestination)libsentry.so')" BeforeTargets="BeforeBuild"> | |
| <Error Condition="!Exists('$(SentryNativeRoot)')" Text="Couldn't find the Native root at $(SentryNativeRoot)."></Error> | |
| <Message Importance="High" Text="Building artifacts of Sentry Native SDK for Linux." /> | |
| <Exec WorkingDirectory="$(SentryNativeRoot)" Command="cmake -B build -D SENTRY_BACKEND=breakpad -D SENTRY_SDK_NAME=sentry.native.unity -D CMAKE_BUILD_TYPE=RelWithDebInfo -S ." /> | |
| <Exec WorkingDirectory="$(SentryNativeRoot)" Command="cmake --build build --target sentry --parallel" /> | |
| <MakeDir Directories="$(SentryLinuxArtifactsDestination)"/> | |
| <!-- strip all, including exported symbols except those starting with 'sentry_', except for 'sentry__' --> | |
| <Exec WorkingDirectory="$(SentryNativeRoot)" Command="strip -s build/libsentry.so -w -K sentry_[^_]* -o $(SentryLinuxArtifactsDestination)libsentry.so" /> | |
| <Exec WorkingDirectory="$(SentryNativeRoot)" Command="cp build/libsentry.so $(SentryLinuxArtifactsDestination)libsentry.dbg.so" /> | |
| <Exec WorkingDirectory="$(SentryLinuxArtifactsDestination)" Command="objcopy --add-gnu-debuglink=libsentry.dbg.so libsentry.so" /> | |
| </Target> |
Possible Solutions
Dockerize the build process for sentry-native on Linux.
Metadata
Metadata
Assignees
Labels
Projects
Status