* [dpdk-dev] [PATCH] ci: fix default ccache in GitHub Actions
@ 2021-01-05 12:16 David Marchand
2021-01-05 14:09 ` Aaron Conole
0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2021-01-05 12:16 UTC (permalink / raw)
To: dev, aconole; +Cc: Michael Santana, Thomas Monjalon
'main' might not be the default branch name.
Fixes: 87009585e293 ("ci: hook to GitHub Actions")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
I found no other option but to call to the remote repository since github
does not seem to expose a HEAD symbolic reference.
The other alternative would be to simply rename ovsrobot/dpdk default
branch from 'master' to 'main'.
Example: https://github.com/ovsrobot/dpdk/runs/1641274373?check_suite_focus=true#step:4:4
---
.github/workflows/build.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0b72df0ebe..751eb82c16 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -67,13 +67,15 @@ jobs:
echo 'libabigail-${{ matrix.config.os }}'
echo -n '::set-output name=abi::'
echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}'
+ echo -n '::set-output name=default_branch::'
+ git ls-remote --symref origin HEAD |awk '/^ref:/ {print $2}'
- name: Retrieve ccache cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
restore-keys: |
- ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
+ ${{ steps.get_ref_keys.outputs.ccache }}-${{ steps.get_ref_keys.outputs.default_branch }}
- name: Retrieve libabigail cache
id: libabigail-cache
uses: actions/cache@v2
--
2.23.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] ci: fix default ccache in GitHub Actions
2021-01-05 12:16 [dpdk-dev] [PATCH] ci: fix default ccache in GitHub Actions David Marchand
@ 2021-01-05 14:09 ` Aaron Conole
2021-01-19 12:17 ` David Marchand
0 siblings, 1 reply; 3+ messages in thread
From: Aaron Conole @ 2021-01-05 14:09 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Michael Santana, Thomas Monjalon
David Marchand <david.marchand@redhat.com> writes:
> 'main' might not be the default branch name.
>
> Fixes: 87009585e293 ("ci: hook to GitHub Actions")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> I found no other option but to call to the remote repository since github
> does not seem to expose a HEAD symbolic reference.
Ugh... I thought I had set it to 'main' during DPDKs transition, but
seems I didn't (guess it was just an oversight on my part - sorry).
> The other alternative would be to simply rename ovsrobot/dpdk default
> branch from 'master' to 'main'.
I will do that rename anyway - it should be consistent.
> Example: https://github.com/ovsrobot/dpdk/runs/1641274373?check_suite_focus=true#step:4:4
>
> ---
> .github/workflows/build.yml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
> index 0b72df0ebe..751eb82c16 100644
> --- a/.github/workflows/build.yml
> +++ b/.github/workflows/build.yml
> @@ -67,13 +67,15 @@ jobs:
> echo 'libabigail-${{ matrix.config.os }}'
> echo -n '::set-output name=abi::'
> echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}'
> + echo -n '::set-output name=default_branch::'
> + git ls-remote --symref origin HEAD |awk '/^ref:/ {print $2}'
> - name: Retrieve ccache cache
> uses: actions/cache@v2
> with:
> path: ~/.ccache
> key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
> restore-keys: |
> - ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
> + ${{ steps.get_ref_keys.outputs.ccache }}-${{ steps.get_ref_keys.outputs.default_branch }}
> - name: Retrieve libabigail cache
> id: libabigail-cache
> uses: actions/cache@v2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] ci: fix default ccache in GitHub Actions
2021-01-05 14:09 ` Aaron Conole
@ 2021-01-19 12:17 ` David Marchand
0 siblings, 0 replies; 3+ messages in thread
From: David Marchand @ 2021-01-19 12:17 UTC (permalink / raw)
To: Aaron Conole; +Cc: dev, Michael Santana, Thomas Monjalon
On Tue, Jan 5, 2021 at 3:09 PM Aaron Conole <aconole@redhat.com> wrote:
>
> David Marchand <david.marchand@redhat.com> writes:
>
> > 'main' might not be the default branch name.
> >
> > Fixes: 87009585e293 ("ci: hook to GitHub Actions")
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> > I found no other option but to call to the remote repository since github
> > does not seem to expose a HEAD symbolic reference.
>
> Ugh... I thought I had set it to 'main' during DPDKs transition, but
> seems I didn't (guess it was just an oversight on my part - sorry).
>
> > The other alternative would be to simply rename ovsrobot/dpdk default
> > branch from 'master' to 'main'.
>
> I will do that rename anyway - it should be consistent.
I dropped the patch, thanks for fixing on the robot side.
--
David marchand
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-19 12:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 12:16 [dpdk-dev] [PATCH] ci: fix default ccache in GitHub Actions David Marchand
2021-01-05 14:09 ` Aaron Conole
2021-01-19 12:17 ` David Marchand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).