mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 13:40:11 +03:00
Azure: Fix CodeCov upload by using a proper login shell
The CodeCov script needs to be run with a `--login` shell s.t. it has access to `shasum`,... . (The previous draft PR was merged with an allowed failure...)
This commit is contained in:
parent
b06929a2c7
commit
2a78210c22
2 changed files with 16 additions and 5 deletions
|
@ -13,10 +13,10 @@ steps:
|
||||||
sh --login .azure-pipelines/windows.sh
|
sh --login .azure-pipelines/windows.sh
|
||||||
displayName: Build and test
|
displayName: Build and test
|
||||||
|
|
||||||
- bash: |
|
# Try to upload the coverage files from the previous step to CodeCov
|
||||||
set -eux
|
# This job is allowed to fail s.t. it does not block PR's in case of
|
||||||
source .azure-pipelines/lib.sh
|
# environmental issues
|
||||||
OS_NAME=windows source ci/codecov.sh
|
- script: bash --login -c "OS_NAME=windows source ci/codecov.sh"
|
||||||
displayName: "Upload coverage report"
|
displayName: "Upload coverage report"
|
||||||
condition: eq( variables.DMD_TEST_COVERAGE, 1)
|
condition: eq( variables.DMD_TEST_COVERAGE, 1)
|
||||||
continueOnError: true
|
continueOnError: true
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euox pipefail
|
||||||
|
|
||||||
# Uploads coverage reports to CodeCov
|
# Uploads coverage reports to CodeCov
|
||||||
|
|
||||||
|
# Check whether this script was called on it's own
|
||||||
|
if [[ "${CURL_USER_AGENT:-}" == "" ]]
|
||||||
|
then
|
||||||
|
CI_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
source "$CI_DIR/../.azure-pipelines/lib.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
# CodeCov gets confused by lst files which it can't match
|
# CodeCov gets confused by lst files which it can't match
|
||||||
rm -rf test/runnable/extra-files test/*.lst
|
rm -rf test/runnable/extra-files test/*.lst
|
||||||
|
|
||||||
|
@ -57,8 +65,11 @@ fi
|
||||||
gpg --verify "$UPLOADER.SHA256SUM.sig" "$UPLOADER.SHA256SUM"
|
gpg --verify "$UPLOADER.SHA256SUM.sig" "$UPLOADER.SHA256SUM"
|
||||||
shasum -a 256 -c "$UPLOADER.SHA256SUM"
|
shasum -a 256 -c "$UPLOADER.SHA256SUM"
|
||||||
|
|
||||||
|
# Remove signature files as the uploader apparently includes them...
|
||||||
|
rm $UPLOADER.*
|
||||||
|
|
||||||
# Upload the sources
|
# Upload the sources
|
||||||
chmod +x "$UPLOADER"
|
chmod +x "$UPLOADER"
|
||||||
"./$UPLOADER" -p . -Z $UPLOADER_ARGS
|
"./$UPLOADER" -p . -Z $UPLOADER_ARGS
|
||||||
|
|
||||||
rm codecov*
|
rm "$UPLOADER"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue