From 92a70e5f15d80b740f1deed4bec3a4527d901022 Mon Sep 17 00:00:00 2001 From: Edwin Lu Date: Fri, 29 Aug 2025 13:25:34 -0700 Subject: [PATCH 1/2] change to use gh cli for cache and stage2 --- .../common/restore-stage-2/action.yaml | 8 ++--- .github/workflows/lint.yaml | 8 ++--- .github/workflows/run-checks.yaml | 8 ++--- .github/workflows/test-regression.yaml | 32 +++++++++---------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/actions/common/restore-stage-2/action.yaml b/.github/actions/common/restore-stage-2/action.yaml index a2d467c..3294ff1 100644 --- a/.github/actions/common/restore-stage-2/action.yaml +++ b/.github/actions/common/restore-stage-2/action.yaml @@ -18,10 +18,10 @@ runs: using: "composite" steps: - name: Restore stage2 - uses: actions/download-artifact@v4 - with: - name: gcc-${{ inputs.mode }}-${{ inputs.target }}-${{ inputs.gcchash }}-${{ inputs.multilib }}-stage2 - path: ./riscv-gnu-toolchain + run: | + gh run download --repo ${{ github.repository }} "${{ github.run_id }}" --name "${{ inputs.prefix }}gcc-${{ inputs.mode }}-${{ inputs.target }}-${{ inputs.gcchash }}-${{ inputs.multilib }}-stage2" + env: + GH_TOKEN: ${{ github.token }} - name: Unzip artifacts shell: bash diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 6822ec6..b6d112f 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -37,10 +37,10 @@ jobs: free_up_space: false - name: Restore submodules from cache - uses: actions/download-artifact@v4 - with: - name: gcc-sources-${{ inputs.baseline_hash }} - path: ./riscv-gnu-toolchain + run: | + gh run download --repo ${{ github.repository }} "${{ github.run_id }}" --name "gcc-sources-${{ inputs.baseline_hash }}" + env: + GH_TOKEN: ${{ github.token }} - name: Restore submodules run: | diff --git a/.github/workflows/run-checks.yaml b/.github/workflows/run-checks.yaml index 2ab32e8..fc5b4e8 100644 --- a/.github/workflows/run-checks.yaml +++ b/.github/workflows/run-checks.yaml @@ -216,10 +216,10 @@ jobs: free_up_space: false - name: Restore submodules from cache - uses: actions/download-artifact@v4 - with: - name: gcc-sources-${{ inputs.baseline_hash }} - path: ./riscv-gnu-toolchain + run: | + gh run download --repo ${{ github.repository }} "${{ github.run_id }}" --name "gcc-sources-${{ inputs.baseline_hash }}" + env: + GH_TOKEN: ${{ github.token }} - name: Restore submodules run: | diff --git a/.github/workflows/test-regression.yaml b/.github/workflows/test-regression.yaml index 0b6c57a..7c6744a 100644 --- a/.github/workflows/test-regression.yaml +++ b/.github/workflows/test-regression.yaml @@ -60,10 +60,10 @@ jobs: free_up_space: true - name: Restore submodules from cache - uses: actions/download-artifact@v4 - with: - name: gcc-sources-${{ inputs.baseline_hash }} - path: ./riscv-gnu-toolchain + run: | + gh run download --repo ${{ github.repository }} "${{ github.run_id }}" --name "gcc-sources-${{ inputs.baseline_hash }}" + env: + GH_TOKEN: ${{ github.token }} - name: Restore submodules run: | @@ -173,10 +173,10 @@ jobs: free_up_space: true - name: Restore submodules from cache - uses: actions/download-artifact@v4 - with: - name: gcc-sources-${{ inputs.baseline_hash }} - path: ./riscv-gnu-toolchain + run: | + gh run download --repo ${{ github.repository }} "${{ github.run_id }}" --name "gcc-sources-${{ inputs.baseline_hash }}" + env: + GH_TOKEN: ${{ github.token }} - name: Restore submodules run: | @@ -287,10 +287,10 @@ jobs: free_up_space: false - name: Restore submodules from cache - uses: actions/download-artifact@v4 - with: - name: gcc-sources-${{ inputs.baseline_hash }} - path: ./riscv-gnu-toolchain + run: | + gh run download --repo ${{ github.repository }} "${{ github.run_id }}" --name "gcc-sources-${{ inputs.baseline_hash }}" + env: + GH_TOKEN: ${{ github.token }} - name: Restore submodules run: | @@ -382,10 +382,10 @@ jobs: free_up_space: false - name: Restore submodules from cache - uses: actions/download-artifact@v4 - with: - name: gcc-sources-${{ inputs.baseline_hash }} - path: ./riscv-gnu-toolchain + run: | + gh run download --repo ${{ github.repository }} "${{ github.run_id }}" --name "gcc-sources-${{ inputs.baseline_hash }}" + env: + GH_TOKEN: ${{ github.token }} - name: Restore submodules run: | From d04bfe89b63b54e58dc041bdaa50c98517416706 Mon Sep 17 00:00:00 2001 From: Edwin Lu Date: Thu, 4 Sep 2025 09:56:31 -0700 Subject: [PATCH 2/2] fix restore stage 2 issue --- .github/actions/common/restore-stage-2/action.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/common/restore-stage-2/action.yaml b/.github/actions/common/restore-stage-2/action.yaml index 3294ff1..8ff81b4 100644 --- a/.github/actions/common/restore-stage-2/action.yaml +++ b/.github/actions/common/restore-stage-2/action.yaml @@ -18,6 +18,8 @@ runs: using: "composite" steps: - name: Restore stage2 + shell: bash + working-directory: riscv-gnu-toolchain run: | gh run download --repo ${{ github.repository }} "${{ github.run_id }}" --name "${{ inputs.prefix }}gcc-${{ inputs.mode }}-${{ inputs.target }}-${{ inputs.gcchash }}-${{ inputs.multilib }}-stage2" env: