From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 89F15A09FF; Tue, 5 Jan 2021 13:16:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36B52160818; Tue, 5 Jan 2021 13:16:37 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 14549160817 for ; Tue, 5 Jan 2021 13:16:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609848995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4tDiGc4btUTU92P4gxCkgMC7X/1g6J4ADts17imfwM8=; b=FdY7s47rAao5Vvj7g6QZ+uSUf+tX7/WepA1VUDoP0n6UpAM/FM6o0sk+glzz7ODZPvmwTG 0Ur0yRsL1r5VZ/v7Prw1YC4Q1g98PJ1lW8q86YqNi7v7AWhwOq3E03kzyWkBXgd5utsL6d 52XlMsaTj5q+VmL/tLtMNwfQYiEj6Og= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-435-_EzV-A2BMuuq_ZeBqjNCWQ-1; Tue, 05 Jan 2021 07:16:33 -0500 X-MC-Unique: _EzV-A2BMuuq_ZeBqjNCWQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 197A3CE646; Tue, 5 Jan 2021 12:16:32 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.118]) by smtp.corp.redhat.com (Postfix) with ESMTP id 592B919C46; Tue, 5 Jan 2021 12:16:30 +0000 (UTC) From: David Marchand To: dev@dpdk.org, aconole@redhat.com Cc: Michael Santana , Thomas Monjalon Date: Tue, 5 Jan 2021 13:16:25 +0100 Message-Id: <20210105121625.8863-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-dev] [PATCH] ci: fix default ccache in GitHub Actions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 'main' might not be the default branch name. Fixes: 87009585e293 ("ci: hook to GitHub Actions") Signed-off-by: David Marchand --- 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