When a community member submits a pull request, they will most likely fork this repository and then submit the PR. Right now the benchmarks fail to checkout code correctly from the forked repo. This is due to how the ref is piped from the first build to the next. It assumes that it is retrieving the ref from the origin repository and doesn't take into account forked repositories.
Root Cause
The benchmark.yml build checks if it is a new PR or been requested to run via the check-command job. It will then store the current git ref and pass that value to the next job benchmark-build. This job will try and checkout the code and compile, but it assumes that it is checking out the origin repo. If the PR is a forked repository then the checkout command will fail.
Build Log from #42
```
Fetching the repository
"C:\Program Files\Git\bin\git.exe" -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/libjpeg-turbo*:refs/remotes/origin/libjpeg-turbo* +refs/tags/libjpeg-turbo*:refs/tags/libjpeg-turbo*
The process 'C:\Program Files\Git\bin\git.exe' failed with exit code 1
Waiting 14 seconds before trying again
"C:\Program Files\Git\bin\git.exe" -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/libjpeg-turbo*:refs/remotes/origin/libjpeg-turbo* +refs/tags/libjpeg-turbo*:refs/tags/libjpeg-turbo*
The process 'C:\Program Files\Git\bin\git.exe' failed with exit code 1
Waiting 13 seconds before trying again
"C:\Program Files\Git\bin\git.exe" -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/libjpeg-turbo*:refs/remotes/origin/libjpeg-turbo* +refs/tags/libjpeg-turbo*:refs/tags/libjpeg-turbo*
Error: The process 'C:\Program Files\Git\bin\git.exe' failed with exit code 1
```
Proposed Changes
Update the benchmark.yml to work with forked repositories
Description
When a community member submits a pull request, they will most likely fork this repository and then submit the PR. Right now the benchmarks fail to checkout code correctly from the forked repo. This is due to how the
ref
is piped from the first build to the next. It assumes that it is retrieving the ref from the origin repository and doesn't take into account forked repositories.Root Cause
The
benchmark.yml
build checks if it is a new PR or been requested to run via thecheck-command
job. It will then store the current gitref
and pass that value to the next jobbenchmark-build
. This job will try and checkout the code and compile, but it assumes that it is checking out the origin repo. If the PR is a forked repository then the checkout command will fail.Build Log from #42
``` Fetching the repository "C:\Program Files\Git\bin\git.exe" -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/libjpeg-turbo*:refs/remotes/origin/libjpeg-turbo* +refs/tags/libjpeg-turbo*:refs/tags/libjpeg-turbo* The process 'C:\Program Files\Git\bin\git.exe' failed with exit code 1 Waiting 14 seconds before trying again "C:\Program Files\Git\bin\git.exe" -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/libjpeg-turbo*:refs/remotes/origin/libjpeg-turbo* +refs/tags/libjpeg-turbo*:refs/tags/libjpeg-turbo* The process 'C:\Program Files\Git\bin\git.exe' failed with exit code 1 Waiting 13 seconds before trying again "C:\Program Files\Git\bin\git.exe" -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/libjpeg-turbo*:refs/remotes/origin/libjpeg-turbo* +refs/tags/libjpeg-turbo*:refs/tags/libjpeg-turbo* Error: The process 'C:\Program Files\Git\bin\git.exe' failed with exit code 1 ```
Proposed Changes
Update the
benchmark.yml
to work with forked repositories