-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,25 +23,36 @@ jobs: | |
log-dir: "/var/log/opentelemetry/dotnet" | ||
runs-on: ${{ matrix.machine }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 # fetching all, needed to correctly calculate version | ||
- uses: actions/[email protected] | ||
|
||
- name: Setup Conditional ENVs | ||
if: ${{ matrix.machine == 'actuated-arm64' }} | ||
run: | | ||
echo "DOTNET_INSTALL_DIR=~/.dotnet" >> $GITHUB_ENV | ||
- name: Setup .NET | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: | | ||
6.0.419 | ||
7.0.406 | ||
8.0.200 | ||
- name: Check for NuGet packages cache | ||
uses: actions/[email protected] | ||
id: nuget-cache | ||
with: | ||
key: ${{ hashFiles('**/Directory.packages.props', './build/LibraryVersions.g.cs', '**/packages.config' ) }} | ||
path: ${{ env.NUGET_PACKAGES }} | ||
|
||
- if: ${{ steps.nuget-cache.outputs.cache-hit != 'true' }} | ||
name: Restore NuGet packages | ||
continue-on-error: false | ||
run: ./build.cmd Restore | ||
|
||
- if: ${{ steps.nuget-cache.outputs.cache-hit != 'true' }} | ||
name: Cache NuGet packages | ||
uses: actions/cache/[email protected] | ||
|
@@ -57,16 +68,20 @@ jobs: | |
with: | ||
name: bin-centos-native | ||
path: bin/ci-artifacts/bin-centos-native | ||
|
||
- name: Replace Ubuntu native code by Centos artifacts | ||
run: | | ||
rm ./bin/tracer-home/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so | ||
cp ./bin/ci-artifacts/bin-centos-native/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so ./bin/tracer-home/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so | ||
if: ${{ matrix.machine == 'ubuntu-20.04' }} | ||
|
||
- run: brew install coreutils | ||
if: ${{ runner.os == 'macOS' }} | ||
|
||
- name: Create test directory | ||
run: sudo mkdir -p ${{ matrix.log-dir }} && sudo chmod a+rwx ${{ matrix.log-dir }} # the instrumented process has no permissions to create log dir | ||
if: ${{ runner.os != 'Windows' }} | ||
|
||
- name: Test the Shell scripts from README.md | ||
shell: bash | ||
run: | | ||
|
@@ -76,6 +91,7 @@ jobs: | |
. ./instrument.sh | ||
./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net8.0/publish/TestApplication.Smoke | ||
test "$(ls -A '${{ matrix.log-dir }}' )" | ||
- name: Test the PowerShell module instructions from README.md | ||
if: ${{ runner.os == 'Windows' }} | ||
shell: powershell | ||
|
@@ -92,21 +108,25 @@ jobs: | |
./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net8.0/TestApplication.Smoke.exe | ||
if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" } | ||
if (Test-Path $log_path) { throw "Log file exists. Instrumentation unregister failed." } | ||
- name: Upload binaries | ||
uses: actions/[email protected] | ||
if: always() | ||
with: | ||
name: bin-${{ matrix.machine }} | ||
path: bin/tracer-home | ||
|
||
- name: Upload installation scripts | ||
uses: actions/[email protected] | ||
if: always() | ||
with: | ||
name: installation-scripts-${{ matrix.machine }} | ||
path: bin/installation-scripts | ||
|
||
- name: Regenerate LibraryVersions.g.cs | ||
# Regenerate the library versions file to surface any version changes made to the packages being tested. | ||
run: ./build.cmd GenerateLibraryVersionFiles | ||
|
||
- name: Generated files unchanged | ||
shell: bash | ||
run: | | ||
|