diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb412f3e4..7162ed78d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,8 +3,8 @@ stages: - deploy variables: - GIT_SUBMODULE_STRATEGY: recursive VIEWER_USE_CRASHPAD: "TRUE" + VIEWER_CRASHPAD_URL: $SENTRY_DSN .win_build: &win_build stage: build @@ -18,23 +18,35 @@ variables: { $env:VIEWER_CHANNEL_CODENAME = $env:CI_COMMIT_REF_NAME[8..100] -join '' } - - pipenv run autobuild configure -c Release -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DVIEWER_CHANNEL_TYPE="Test" + - pipenv run autobuild configure -c Release -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON - pipenv run autobuild build -c Release --no-configure - If ($env:VIEWER_USE_CRASHPAD) { - Push-Location .\build-vc-*\newview\Release\ -# - If ($env:VIEWER_CHANNEL_TYPE -eq 'Project') { $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_NONPROD } ElseIf ($env:VIEWER_CHANNEL_TYPE -eq 'Beta' -OR $env:VIEWER_CHANNEL_TYPE -eq 'Release') {$env:SENTRY_PROJECT = $env:SENTRY_PROJECT_NONPROD } - - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll libhunspell.dll libhunspell.pdb glod.dll + - sentry-cli upload-dif --include-sources singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1.dll libcrypto-1_1.pdb libssl-1_1.dll libssl-1_1.pdb libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll libhunspell.dll libhunspell.pdb glod.dll - Pop-Location } artifacts: name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" - expire_in: 4 week + expire_in: 2 week paths: - build-vc-*/newview/Release/build_data.json - build-vc-*/newview/Release/singularity-bin.pdb - build-vc-*/newview/Release/Singularity_*_Setup.exe +.beta_rules: &beta_rules + only: + - /^.*-beta$/ + except: + - branches + +.release_rules: &release_rules + only: + - /^.*-release$/ + except: + - branches + build:master:windows32: <<: *win_build + interruptible: true variables: AUTOBUILD_ADDRSIZE: 32 VIEWER_CHANNEL_TYPE: Test @@ -44,6 +56,7 @@ build:master:windows32: build:master:windows64: <<: *win_build + interruptible: true variables: AUTOBUILD_ADDRSIZE: 64 VIEWER_CHANNEL_TYPE: Test @@ -53,122 +66,98 @@ build:master:windows64: build:project:windows32: <<: *win_build + interruptible: true variables: AUTOBUILD_ADDRSIZE: 32 VIEWER_CHANNEL_TYPE: Project - VIEWER_CRASHPAD_URL: $SENTRY_DSN_NONPROD - SENTRY_PROJECT: $SENTRY_PROJECT_NONPROD only: - /^project-.*$/ - - schedules - except: - - beta - - release build:project:windows64: <<: *win_build + interruptible: true variables: AUTOBUILD_ADDRSIZE: 64 VIEWER_CHANNEL_TYPE: Project - VIEWER_CRASHPAD_URL: $SENTRY_DSN_NONPROD - SENTRY_PROJECT: $SENTRY_PROJECT_NONPROD only: - /^project-.*$/ - - schedules - except: - - beta - - release build:beta:windows32: <<: *win_build variables: AUTOBUILD_ADDRSIZE: 32 VIEWER_CHANNEL_TYPE: Beta - VIEWER_CRASHPAD_URL: $SENTRY_DSN_PROD - SENTRY_PROJECT: $SENTRY_PROJECT_PROD - only: - - beta - - schedules - except: - - /^project-.*$/ - - release + <<: *beta_rules build:beta:windows64: <<: *win_build variables: AUTOBUILD_ADDRSIZE: 64 VIEWER_CHANNEL_TYPE: Beta - VIEWER_CRASHPAD_URL: $SENTRY_DSN_PROD - SENTRY_PROJECT: $SENTRY_PROJECT_PROD - only: - - beta - - schedules - except: - - /^project-.*$/ - - release + <<: *beta_rules build:release:windows32: <<: *win_build variables: - AUTOBUILD_ADDRSIZE: 64 + AUTOBUILD_ADDRSIZE: 32 VIEWER_CHANNEL_TYPE: Release - VIEWER_CRASHPAD_URL: $SENTRY_DSN_PROD - SENTRY_PROJECT: $SENTRY_PROJECT_PROD - only: - - release - - schedules - except: - - /^project-.*$/ - - beta + <<: *release_rules build:release:windows64: <<: *win_build variables: AUTOBUILD_ADDRSIZE: 64 VIEWER_CHANNEL_TYPE: Release - VIEWER_CRASHPAD_URL: $SENTRY_DSN_PROD - SENTRY_PROJECT: $SENTRY_PROJECT_PROD - only: - - release - - schedules - except: - - /^project-.*$/ - - beta + <<: *release_rules -deploy:nexus: +.deploy_template: &deploy_template stage: deploy tags: - autobuild - windows script: - $BuildData = Get-Content .\build-vc-64\newview\Release\build_data.json | ConvertFrom-Json - - $UploadDestViewerDir = $BuildData."Channel".ToLower().Replace(" ", "/") - - $UploadDestVer = $BuildData."Version" - - $UploadDestURL = "https://pkg.alchemyviewer.org/repository/viewer/${$UploadDestViewerDir}/${$UploadDestVer}" + - $BuildChannelVersion = $BuildData."Channel" + ' ' + $BuildData."Version" + - $UploadDestViewerDir = $BuildChannelVersion.ToLower().Replace(" ", "/") + - $UploadDestURL = "https://pkg.alchemyviewer.org/repository/viewer/${UploadDestViewerDir}" - - $UploadParams = @{ - UseBasicParsing = $true - Method = "PUT" + - $UploadParams = @{ UseBasicParsing = $true; + Method = "PUT"; Headers = @{ - ContentType = "application/x-executable" - Authorization = "Basic $([System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("$env:AUTOBUILD_HTTP_USER`:$env:AUTOBUILD_HTTP_PASS")))" - } - Verbose = $true - } + ContentType = "application/x-executable"; + Authorization = "Basic $([System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("$env:AUTOBUILD_HTTP_USER`:$env:AUTOBUILD_HTTP_PASS")))"; }; + Verbose = $true; }; - Push-Location .\build-vc-32\newview\Release\ - $FileNameWin32 = Get-ChildItem -Path . -Name -Include Singularity_*_Setup.exe - - Invoke-WebRequest @$UploadParams -InFile .\$FileNameWin32 --Uri "${$UploadDestURL}/${FileNameWin32}" + - Invoke-WebRequest @UploadParams -InFile .\$FileNameWin32 -Uri "${UploadDestURL}/${FileNameWin32}" - Pop-Location - Push-Location .\build-vc-64\newview\Release\ - $FileNameWin64 = Get-ChildItem -Path . -Name -Include Singularity_*_Setup.exe - - Invoke-WebRequest @$UploadParams -InFile .\$FileNameWin32 --Uri "${$UploadDestURL}/${FileNameWin64}" + - Invoke-WebRequest @UploadParams -InFile .\$FileNameWin64 -Uri "${UploadDestURL}/${FileNameWin64}" - Pop-Location + + - sentry-cli releases new $BuildChannelVersion + - sentry-cli releases set-commits --auto $BuildChannelVersion + - sentry-cli releases finalize $BuildChannelVersion when: manual + +deploy_project: + <<: *deploy_template + environment: + name: qa only: - /^project-.*$/ - - beta - - release - except: - - master \ No newline at end of file + +deploy_beta: + <<: *deploy_template + environment: + name: staging + <<: *beta_rules + +deploy_release: + <<: *deploy_template + environment: + name: production + <<: *release_rules diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 1de317e3c..38c252745 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -48,6 +48,10 @@ option(USE_LTO "Enable global and interprocedural optimizations" OFF) # Configure crash reporting option(USE_CRASHPAD "Build support for crashpad reporting engine" OFF) +if (DEFINED ENV{VIEWER_USE_CRASHPAD}) + set(USE_CRASHPAD $ENV{VIEWER_USE_CRASHPAD}) +endif() + if (DEFINED ENV{VIEWER_CRASHPAD_URL}) set(CRASHPAD_URL $ENV{VIEWER_CRASHPAD_URL} CACHE STRING "Viewer Channel Base Name") else() diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 56c2c6550..76ae9bc2d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -726,6 +726,8 @@ void LLAppViewer::initCrashReporting() annotations.emplace("sentry[contexts][app][app_version]", LLVersionInfo::getVersion()); annotations.emplace("sentry[contexts][app][app_build]", LLVersionInfo::getChannelAndVersion()); + annotations.emplace("sentry[release]", LLVersionInfo::getChannelAndVersion()); + annotations.emplace("sentry[tags][second_instance]", fmt::to_string(isSecondInstance())); //annotations.emplace("sentry[tags][bitness]", fmt::to_string(ADDRESS_SIZE)); annotations.emplace("sentry[tags][bitness]", @@ -738,7 +740,6 @@ void LLAppViewer::initCrashReporting() // Optional arguments to pass to the handler std::vector arguments; - arguments.push_back("--no-upload-gzip"); arguments.push_back("--no-rate-limit"); arguments.push_back("--monitor-self");