diff --git a/.github/codecov.yml b/.github/codecov.yml index b20bf1b2972..c381869ce70 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -33,22 +33,22 @@ ignore: - "test" flags: - unittests-Solution-Stable: + unittests-Solution: carryforward: true paths: - src - unittests-Solution-Experimental: + unittests-Project-Stable: carryforward: true paths: - src - unittests-Instrumentation-Stable: + unittests-Project-Experimental: carryforward: true paths: - src - unittests-Instrumentation-Experimental: + unittests-UnstableCoreLibraries-Experimental: carryforward: true paths: - src diff --git a/.github/workflows/Component.BuildTest.yml b/.github/workflows/Component.BuildTest.yml index f97c8b94f9b..f5ef85e0dc3 100644 --- a/.github/workflows/Component.BuildTest.yml +++ b/.github/workflows/Component.BuildTest.yml @@ -65,7 +65,7 @@ jobs: run: dotnet tool install -g dotnet-coverage - name: Merging test results - run: dotnet-coverage merge -r -f cobertura -o ./TestResults/Cobertura.xml ./TestResults/*.coverage + run: dotnet-coverage merge -f cobertura -o ./TestResults/Cobertura.xml ./TestResults/**/*.coverage - name: Upload code coverage ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }} uses: codecov/codecov-action@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1a0d80bac4..7f222b07cc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,7 @@ jobs: build: ['build/**', '.github/**/*.yml', '**/*.targets', '**/*.props'] shared: ['src/Shared/**'] code: ['**.cs', '**.csproj', '.editorconfig'] + solution: ['OpenTelemetry.sln'] packaged-code: ['src/**', '!**/*.md'] api-code: ['*/OpenTelemetry.Api*/**', '!**/*.md'] api-packages: ['src/OpenTelemetry.Api*/**', '!**/*.md'] @@ -50,19 +51,30 @@ jobs: || contains(needs.detect-changes.outputs.changes, 'build') uses: ./.github/workflows/dotnet-format.yml - build-test-solution-stable: + build-test-solution: needs: detect-changes if: | - contains(needs.detect-changes.outputs.changes, 'code') + contains(needs.detect-changes.outputs.changes, 'solution') || contains(needs.detect-changes.outputs.changes, 'build') || contains(needs.detect-changes.outputs.changes, 'shared') uses: ./.github/workflows/Component.BuildTest.yml with: project-name: 'OpenTelemetry.sln' + code-cov-name: 'Solution' + + build-test-project-stable: + needs: detect-changes + if: | + contains(needs.detect-changes.outputs.changes, 'code') + || contains(needs.detect-changes.outputs.changes, 'build') + || contains(needs.detect-changes.outputs.changes, 'shared') + uses: ./.github/workflows/Component.BuildTest.yml + with: + project-name: './build/OpenTelemetry.proj' project-build-commands: '-p:ExposeExperimentalFeatures=false' - code-cov-name: 'Solution-Stable' + code-cov-name: 'Project-Stable' - build-test-solution-experimental: + build-test-project-experimental: needs: detect-changes if: | contains(needs.detect-changes.outputs.changes, 'code') @@ -70,9 +82,9 @@ jobs: || contains(needs.detect-changes.outputs.changes, 'shared') uses: ./.github/workflows/Component.BuildTest.yml with: - project-name: 'OpenTelemetry.sln' + project-name: './build/OpenTelemetry.proj' project-build-commands: '-p:ExposeExperimentalFeatures=true' - code-cov-name: 'Solution-Experimental' + code-cov-name: 'Project-Experimental' # Build unstable core libraries using stable packages released to NuGet build-test-unstable-core: @@ -85,7 +97,7 @@ jobs: with: project-name: './build/UnstableCoreLibraries.proj' project-build-commands: '-p:RunningDotNetPack=true -p:ExposeExperimentalFeatures=true' - code-cov-name: 'Unstable-Core' + code-cov-name: 'UnstableCoreLibraries-Experimental' otlp-integration-test: needs: detect-changes @@ -163,8 +175,9 @@ jobs: detect-changes, lint-md, lint-dotnet-format, - build-test-solution-stable, - build-test-solution-experimental, + build-test-solution, + build-test-project-stable, + build-test-project-experimental, build-test-unstable-core, otlp-integration-test, w3c-trace-context-integration-test, diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c091dc85184..3cdd6a57b6d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,8 +39,8 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 - - name: dotnet pack OpenTelemetry.proj - run: dotnet pack OpenTelemetry.proj --configuration Release + - name: dotnet pack + run: dotnet pack ./build/OpenTelemetry.proj --configuration Release - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/dotnet-format.yml b/.github/workflows/dotnet-format.yml index b6baf18aab0..2ea4834570f 100644 --- a/.github/workflows/dotnet-format.yml +++ b/.github/workflows/dotnet-format.yml @@ -17,10 +17,10 @@ jobs: uses: actions/setup-dotnet@v4 - name: dotnet restore - run: dotnet restore + run: dotnet restore OpenTelemetry.sln - name: dotnet format - run: dotnet format OpenTelemetry.sln --no-restore --verify-no-changes + run: dotnet format OpenTelemetry.sln --no-restore --verify-no-changes # Note: .proj files are currently not supported by dotnet format env: ExposeExperimentalFeatures: false @@ -35,9 +35,9 @@ jobs: uses: actions/setup-dotnet@v4 - name: dotnet restore - run: dotnet restore + run: dotnet restore OpenTelemetry.sln - name: dotnet format - run: dotnet format OpenTelemetry.sln --no-restore --verify-no-changes + run: dotnet format OpenTelemetry.sln --no-restore --verify-no-changes # Note: .proj files are currently not supported by dotnet format env: ExposeExperimentalFeatures: true diff --git a/.github/workflows/package-validation.yml b/.github/workflows/package-validation.yml index 757b38c18a5..d1f7658ee2d 100644 --- a/.github/workflows/package-validation.yml +++ b/.github/workflows/package-validation.yml @@ -20,8 +20,8 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 - - name: Pack - run: dotnet pack OpenTelemetry.proj --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=false /p:RunningDotNetPack=true + - name: dotnet pack + run: dotnet pack ./build/OpenTelemetry.proj --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=false /p:RunningDotNetPack=true run-package-validation-experimental: runs-on: windows-latest @@ -37,5 +37,5 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 - - name: Pack - run: dotnet pack OpenTelemetry.proj --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=true /p:RunningDotNetPack=true + - name: dotnet pack + run: dotnet pack ./build/OpenTelemetry.proj --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=true /p:RunningDotNetPack=true diff --git a/.github/workflows/publish-packages-1.0.yml b/.github/workflows/publish-packages-1.0.yml index dd2e568f2d5..1391382e3ca 100644 --- a/.github/workflows/publish-packages-1.0.yml +++ b/.github/workflows/publish-packages-1.0.yml @@ -51,13 +51,13 @@ jobs: uses: actions/setup-dotnet@v4 - name: dotnet restore - run: dotnet restore OpenTelemetry.proj -p:RunningDotNetPack=true + run: dotnet restore ./build/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 }} -p:RunningDotNetPack=true + run: dotnet build ./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-restore --no-build -p:PackTag=${{ github.ref_type == 'tag' && github.ref_name || inputs.tag || '' }} + run: dotnet pack ./build/OpenTelemetry.proj --configuration Release --no-restore --no-build -p:PackTag=${{ github.ref_type == 'tag' && github.ref_name || inputs.tag || '' }} - name: Publish Artifacts id: upload-artifacts diff --git a/OpenTelemetry.sln b/OpenTelemetry.sln index 86455353f31..5f26ccbedf3 100644 --- a/OpenTelemetry.sln +++ b/OpenTelemetry.sln @@ -17,7 +17,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution global.json = global.json LICENSE.TXT = LICENSE.TXT NuGet.config = NuGet.config - OpenTelemetry.proj = OpenTelemetry.proj README.md = README.md THIRD-PARTY-NOTICES.TXT = THIRD-PARTY-NOTICES.TXT VERSIONING.md = VERSIONING.md @@ -38,6 +37,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{7CB2F02E build\opentelemetry-icon-color.png = build\opentelemetry-icon-color.png build\OpenTelemetry.prod.loose.ruleset = build\OpenTelemetry.prod.loose.ruleset build\OpenTelemetry.prod.ruleset = build\OpenTelemetry.prod.ruleset + build\OpenTelemetry.proj = build\OpenTelemetry.proj build\OpenTelemetry.test.ruleset = build\OpenTelemetry.test.ruleset build\RELEASING.md = build\RELEASING.md build\stylecop.json = build\stylecop.json diff --git a/OpenTelemetry.proj b/build/OpenTelemetry.proj similarity index 61% rename from OpenTelemetry.proj rename to build/OpenTelemetry.proj index b55859fe017..86987bbbe2a 100644 --- a/OpenTelemetry.proj +++ b/build/OpenTelemetry.proj @@ -1,16 +1,18 @@ + + $([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory)).Parent.FullName) + + - - - + + + - - - + + + diff --git a/build/UnstableCoreLibraries.proj b/build/UnstableCoreLibraries.proj index 8d333db2d94..7686376563a 100644 --- a/build/UnstableCoreLibraries.proj +++ b/build/UnstableCoreLibraries.proj @@ -1,12 +1,16 @@ + + $([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory)).Parent.FullName) + + - - - + + + - - - + + +