Skip to content

Commit

Permalink
Merge pull request #125 from boostorg/remove-appveyor-codecov-workaround
Browse files Browse the repository at this point in the history
Remove codecov workarounds
  • Loading branch information
Flamefire committed May 6, 2022
2 parents 5b22d1d + 815b0a1 commit 5222655
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
7 changes: 2 additions & 5 deletions ci/codecov.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ if (Get-Command "gpg.exe" -ErrorAction SilentlyContinue){
Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM.sig -Outfile codecov.exe.SHA256SUM.sig

$ErrorActionPreference = "Continue"
gpg.exe --import codecov.asc
gpg.exe --logger-fd 1 --import codecov.asc
if ($LASTEXITCODE -ne 0) { Throw "Importing the key failed." }
gpg.exe --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM
gpg.exe --logger-fd 1 --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM
if ($LASTEXITCODE -ne 0) { Throw "Signature validation of the SHASUM failed." }
If ($(Compare-Object -ReferenceObject $(($(certUtil -hashfile codecov.exe SHA256)[1], "codecov.exe") -join " ") -DifferenceObject $(Get-Content codecov.exe.SHA256SUM)).length -eq 0) {
echo "SHASUM verified"
Expand All @@ -31,9 +31,6 @@ if (Get-Command "gpg.exe" -ErrorAction SilentlyContinue){
&"$scriptPath\opencppcoverage.ps1"
if ($LASTEXITCODE -ne 0) { Throw "Coverage collection failed." }

# Workaround for https://github.com/codecov/uploader/issues/525
if("${env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT}" -ne ""){ $env:APPVEYOR_REPO_COMMIT = "${env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT}" }

# Upload
./codecov.exe --name Appveyor --env APPVEYOR_BUILD_WORKER_IMAGE --verbose --nonZero --dir __out --rootDir "${env:BOOST_CI_SRC_FOLDER}"
if ($LASTEXITCODE -ne 0) { Throw "Upload of coverage data failed." }
5 changes: 0 additions & 5 deletions ci/codecov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ elif [[ "$1" == "upload" ]]; then
shasum -a 256 -c codecov.SHA256SUM
fi

# Workaround for https://github.com/codecov/uploader/issues/525
if [ -n "$GITHUB_HEAD_REF" ]; then
export GITHUB_SHA=$(git show --no-patch --format="%P" | awk '{print $NF}')
fi

chmod +x codecov
./codecov --verbose --nonZero ${CODECOV_NAME:+--name "$CODECOV_NAME"} -f coverage.info -X search
else
Expand Down

0 comments on commit 5222655

Please sign in to comment.