From 97f6f3c4dafec239258be82a0e8d6eb23b741ec7 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Mon, 22 Jul 2024 11:44:39 -0700 Subject: [PATCH] misc,tests: Attempt fix daily downloads (#1369) This tests attempts to infer which tests to download per job in the matrix thereby significantly reducing the download times for each job. Change-Id: I61b4f4b6410aa86de7437caf213499d805861e0c --- .github/workflows/daily-tests.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/daily-tests.yaml b/.github/workflows/daily-tests.yaml index 6ebdd5e8bd..021ce89f8d 100644 --- a/.github/workflows/daily-tests.yaml +++ b/.github/workflows/daily-tests.yaml @@ -89,12 +89,18 @@ jobs: - name: Clean runner run: rm -rf ./* || true rm -rf ./.??* || true rm -rf ~/.cache || true - uses: actions/checkout@v4 - # download all artifacts for each test. Thoguh this is inelegant, - # it's simpler than figuring otu which long tests requires which - # binary. + + # Determine the build targets for the test. + - working-directory: ${{ github.workspace }}/tests + id: artifact-targets + run: | + echo "targets=$(/main.py list --build-targets -q --length=long gem5/${{ matrix.test-type }} | rev | cut -d / -f 2 | rev | while read x; do echo "${ needs.name-artifacts.outputs.build-name }}-${x}"; done)" >>$GITHUB_OUTPUT + + # Download the build artifacts for the test. - uses: actions/download-artifact@v4 with: - pattern: ${{needs.name-artifacts.outputs.build-name}}* + pattern: | + ${{ steps.artifact-targets.outputs.targets }} merge-multiple: true # The upload/download GitHub actions do not preserve the executable # bit of the files. We need to set the executable bit for the