Skip to content

Commit

Permalink
[repo] Fix conflicts caused by DS upgrade (open-telemetry#4967)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch authored Oct 19, 2023
1 parent 0f58eb1 commit 50d3af0
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-instrumentation-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Install dependencies
- name: dotnet restore
run: dotnet restore ./build/InstrumentationLibraries.proj -p:RunningDotNetPack=true

- name: Build
- name: dotnet build
run: dotnet build ./build/InstrumentationLibraries.proj --configuration Release --no-restore -p:RunningDotNetPack=true

- name: Test ${{ matrix.version }}
- name: dotnet test
run: dotnet test **/bin/Release/${{ matrix.version }}/OpenTelemetry.Instrumentation*.Tests.dll --framework ${{ matrix.version }} --configuration Release --no-restore --no-build --logger:"console;verbosity=detailed"
4 changes: 2 additions & 2 deletions .github/workflows/package-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/setup-dotnet@v3

- name: Pack
run: dotnet pack --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=false
run: dotnet pack OpenTelemetry.proj --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=false

build-test-experimental:
runs-on: windows-latest
Expand All @@ -33,4 +33,4 @@ jobs:
uses: actions/setup-dotnet@v3

- name: Pack
run: dotnet pack --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=true
run: dotnet pack OpenTelemetry.proj --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=true
11 changes: 4 additions & 7 deletions .github/workflows/publish-packages-1.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ jobs:
build-pack:
runs-on: windows-latest

env:
RunningDotNetPack: true

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -29,14 +26,14 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Install dependencies
run: dotnet restore OpenTelemetry.proj
- name: dotnet restore
run: dotnet restore OpenTelemetry.proj -p:RunningDotNetPack=true

- name: dotnet build
run: dotnet build OpenTelemetry.proj --configuration Release --no-restore -p:Deterministic=true -p:BuildNumber=${{ github.run_number }}
run: dotnet build OpenTelemetry.proj --configuration Release --no-restore -p:Deterministic=true -p:BuildNumber=${{ github.run_number }} -p:RunningDotNetPack=true

- name: dotnet pack
run: dotnet pack OpenTelemetry.proj --configuration Release --no-build
run: dotnet pack OpenTelemetry.proj --configuration Release --no-build --no-restore

- name: Publish Artifacts
uses: actions/upload-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<PackageVersion Include="OpenTelemetry.Api.ProviderBuilderExtensions" Version="$(OTelLatestStableVer)" />
<PackageVersion Include="OpenTelemetry.Exporter.InMemory" Version="$(OTelLatestStableVer)" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="$(OTelLatestStableVer)" />
<PackageVersion Include="OpenTelemetry.Extensions.Propagators" Version="$(OTelLatestStableVer)" />
<PackageVersion Include="OpenTracing" Version="[0.12.1,0.13)" />

<!--
Expand Down
20 changes: 14 additions & 6 deletions OpenTelemetry.proj
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
<Project>
<ItemGroup>
<SolutionProjects Include="**\*.csproj" />

<PackProjects Include="src\**\*.csproj" />
<TestProjects Include="test\**\*.csproj" />

<!-- Not pack SemanticConventions project for now -->
<SolutionProjects Remove="src\OpenTelemetry.SemanticConventions\OpenTelemetry.SemanticConventions.csproj" />
<PackProjects Remove="src\OpenTelemetry.SemanticConventions\OpenTelemetry.SemanticConventions.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(RunningDotNetPack)' == 'true'">
<!-- Skip building these projects when publish packages workflow runs as these projects need to depend upon instrumentation libraries taking a project reference
instead of package reference on API/SDK-->
<!-- Skip building these projects when publish packages workflow runs as
these projects need to depend upon instrumentation libraries taking a
project reference instead of package reference on API/SDK -->
<SolutionProjects Remove="docs\**\**\*.csproj" />
<SolutionProjects Remove="examples\**\*.csproj" />
<SolutionProjects Remove="test\Benchmarks\Benchmarks.csproj" />
<SolutionProjects Remove="test\OpenTelemetry.Exporter.Zipkin.Tests\OpenTelemetry.Exporter.Zipkin.Tests.csproj" />
<SolutionProjects Remove="@(TestProjects)" />
</ItemGroup>

<Target Name="Build">
<MSBuild Projects="@(SolutionProjects)" Targets="Restore;Build" ContinueOnError="ErrorAndStop" />
<MSBuild Projects="@(SolutionProjects)" Targets="Build" ContinueOnError="ErrorAndStop" />
</Target>

<Target Name="Restore">
<MSBuild Projects="@(SolutionProjects)" Targets="Restore" ContinueOnError="ErrorAndStop" />
</Target>

<Target Name="VSTest">
<MSBuild Projects="@(TestProjects)" Targets="VSTest" ContinueOnError="ErrorAndStop" />
</Target>

<Target Name="Pack">
Expand Down
1 change: 1 addition & 0 deletions build/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions build/InstrumentationLibraries.proj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>
<ItemGroup>
<SolutionProjects Include="..\**\OpenTelemetry.Instrumentation*.csproj" />
<TestProjects Include="..\test\**\OpenTelemetry.Instrumentation*.csproj" />
</ItemGroup>

<Target Name="Build">
Expand All @@ -10,4 +11,8 @@
<Target Name="Restore">
<MSBuild Projects="@(SolutionProjects)" Targets="Restore" ContinueOnError="ErrorAndStop" />
</Target>

<Target Name="VSTest">
<MSBuild Projects="@(TestProjects)" Targets="VSTest" ContinueOnError="ErrorAndStop" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,19 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Extensions.Propagators\OpenTelemetry.Extensions.Propagators.csproj" />
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Instrumentation.GrpcNetClient\OpenTelemetry.Instrumentation.GrpcNetClient.csproj" />
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Instrumentation.Http\OpenTelemetry.Instrumentation.Http.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(RunningDotNetPack)' != 'true'">
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.InMemory\OpenTelemetry.Exporter.InMemory.csproj" />
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Extensions.Propagators\OpenTelemetry.Extensions.Propagators.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(RunningDotNetPack)' == 'true'">
<PackageReference Include="OpenTelemetry.Api" />
<PackageReference Include="OpenTelemetry.Exporter.InMemory" />
<PackageReference Include="OpenTelemetry.Extensions.Propagators" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 50d3af0

Please sign in to comment.