Skip to content

Commit

Permalink
Native Linux and MacOS test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek committed Jul 24, 2023
1 parent 8455fcf commit 7917a05
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 3 additions & 1 deletion build/Build.Steps.Linux.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ partial class Build
var buildDirectory = NativeProfilerProject.Directory / "build";
buildDirectory.CreateDirectory();
Log.Logger.Warning($"XXXXXXXXXXXX DOTEL_AUTO_VERSION={VersionHelper.GetVersionWithoutSuffixes()}");
CMake.Value(
arguments: $"../ -DCMAKE_BUILD_TYPE=Release",
arguments: $"../ -DCMAKE_BUILD_TYPE=Release -DOTEL_AUTO_VERSION={VersionHelper.GetVersionWithoutSuffixes()}",
workingDirectory: buildDirectory);
Make.Value(
arguments: $"",
Expand Down
8 changes: 6 additions & 2 deletions build/Build.Steps.MacOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ partial class Build
.Executes(() =>
{
var nativeProjectDirectory = NativeProfilerProject.Directory;
CMake.Value(arguments: $".", workingDirectory: nativeProjectDirectory);
Make.Value(arguments: $"", workingDirectory: nativeProjectDirectory);
CMake.Value(
arguments: $". -DOTEL_AUTO_VERSION={VersionHelper.GetVersionWithoutSuffixes()}",
workingDirectory: nativeProjectDirectory);
Make.Value(
arguments: $"",
workingDirectory: nativeProjectDirectory);
});

Target PublishNativeProfilerMacOs => _ => _
Expand Down
5 changes: 5 additions & 0 deletions build/VersionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ public static string GetVersion()
{
return typeof(VersionHelper).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()!.InformationalVersion.Split('+')[0];
}

public static string GetVersionWithoutSuffixes()
{
return GetVersion().Split('-')[0];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cmake_policy(SET CMP0015 NEW)
# Project definition
# ******************************************************

project("OpenTelemetry.AutoInstrumentation.Native" VERSION 1.0.0)
project("OpenTelemetry.AutoInstrumentation.Native" VERSION OTEL_AUTO_VERSION)

# ******************************************************
# Environment detection
Expand Down

0 comments on commit 7917a05

Please sign in to comment.