mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 14:21:04 +08:00
Switch back to Codecov GitHub Action with our own token
This commit is contained in:
parent
3ea228434b
commit
2b6194a632
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
@ -205,30 +205,16 @@ jobs:
|
|||||||
gcovr -r $GITHUB_WORKSPACE -x build/coverage.out -s -f 'src/SFML/.*' -f 'include/SFML/.*' ${{ matrix.platform.gcovr_options }} $GITHUB_WORKSPACE
|
gcovr -r $GITHUB_WORKSPACE -x build/coverage.out -s -f 'src/SFML/.*' -f 'include/SFML/.*' ${{ matrix.platform.gcovr_options }} $GITHUB_WORKSPACE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Download Codecov Uploader
|
|
||||||
if: matrix.type.name == 'Debug' && github.repository == 'SFML/SFML' # Disable upload in forks
|
|
||||||
run: |
|
|
||||||
platform=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
|
|
||||||
if [ "$platform" == "windows" ]; then CODECOV_BINARY="codecov.exe"; else CODECOV_BINARY="codecov"; fi
|
|
||||||
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
|
|
||||||
curl -s --remote-name-all "https://uploader.codecov.io/latest/$platform/{$CODECOV_BINARY,$CODECOV_BINARY.SHA256SUM,$CODECOV_BINARY.SHA256SUM.sig}"
|
|
||||||
if [ "$platform" == "windows" ]; then powershell 'If ($(Compare-Object -ReferenceObject $(($(certUtil -hashfile codecov.exe SHA256)[1], "codecov.exe") -join " ") -DifferenceObject $(Get-Content codecov.exe.SHA256SUM)).length -eq 0) {echo "codecov: OK"} Else {exit 1}';
|
|
||||||
else shasum -a 256 -c codecov.SHA256SUM; fi
|
|
||||||
chmod +x "$CODECOV_BINARY"
|
|
||||||
echo "CODECOV_BINARY=$CODECOV_BINARY" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Upload Coverage Report to Codecov
|
- name: Upload Coverage Report to Codecov
|
||||||
|
uses: codecov/codecov-action@v4
|
||||||
if: matrix.type.name == 'Debug' && github.repository == 'SFML/SFML' # Disable upload in forks
|
if: matrix.type.name == 'Debug' && github.repository == 'SFML/SFML' # Disable upload in forks
|
||||||
uses: nick-fields/retry@v3
|
|
||||||
with:
|
with:
|
||||||
timeout_seconds: 30
|
fail_ci_if_error: true
|
||||||
max_attempts: 10
|
name: ${{ matrix.platform.name }} ${{ matrix.config.name }} ${{ matrix.type.name }}
|
||||||
retry_wait_seconds: 60
|
directory: ./build
|
||||||
warning_on_retry: false
|
files: ./build/coverage.out
|
||||||
shell: bash
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
command: |
|
verbose: true
|
||||||
if [[ "${{ github.event_name }}" == "pull_request" || "${{ github.event_name }}" == "pull_request_target" ]]; then COMMIT_OVERRIDE="-C ${{ github.event.pull_request.head.sha }}"; fi
|
|
||||||
./${{ env.CODECOV_BINARY }} -n "${{ matrix.platform.name }} ${{ matrix.config.name }} ${{ matrix.type.name }}" -Z -f ./build/coverage.out $COMMIT_OVERRIDE -s ./build -e GITHUB_ACTION,GITHUB_RUN_ID,GITHUB_REF,GITHUB_REPOSITORY,GITHUB_SHA,GITHUB_HEAD_REF
|
|
||||||
|
|
||||||
- name: Test Install Interface
|
- name: Test Install Interface
|
||||||
if: matrix.platform.name != 'Android'
|
if: matrix.platform.name != 'Android'
|
||||||
|
Loading…
Reference in New Issue
Block a user