From 94337e0dbe1c610ab6c57788f34aaf67e2f4edf6 Mon Sep 17 00:00:00 2001 From: Aleksander Kiryk Date: Thu, 31 Oct 2024 15:20:39 +0100 Subject: [PATCH] Reduce cache usage Removed references to cache which used time as the key and didn't speed up the CI --- .../workflows/test-regression-exceptions.yml | 22 -------- .github/workflows/test-regression.yml | 22 -------- .github/workflows/test-riscof.yml | 36 ------------- .github/workflows/test-riscv-dv.yml | 53 ------------------- .github/workflows/test-uarch.yml | 23 -------- .github/workflows/test-uvm.yml | 22 -------- .github/workflows/test-verification.yml | 23 -------- 7 files changed, 201 deletions(-) diff --git a/.github/workflows/test-regression-exceptions.yml b/.github/workflows/test-regression-exceptions.yml index 78b4dcb18ab..e84c3f2b59c 100644 --- a/.github/workflows/test-regression-exceptions.yml +++ b/.github/workflows/test-regression-exceptions.yml @@ -31,28 +31,6 @@ jobs: gcc-riscv64-unknown-elf pip3 install meson - - name: Setup Cache Metadata - id: cache_metadata - run: | - date=$(date +"%Y_%m_%d") - time=$(date +"%Y%m%d_%H%M%S_%N") - cache_test_restore_key=${{ matrix.test }}_${{ matrix.coverage }}_ - cache_test_key=${cache_test_restore_key}${time} - - echo "date=$date" | tee -a "$GITHUB_ENV" - echo "time=$time" | tee -a "$GITHUB_ENV" - echo "cache_test_restore_key=$cache_test_restore_key" | tee -a "$GITHUB_ENV" - echo "cache_test_key=$cache_test_key" | tee -a "$GITHUB_ENV" - - - name: Setup tests cache - uses: actions/cache@v3 - id: cache-test-setup - with: - path: | - ${{ env.CCACHE_DIR }} - key: ${{ env.cache_test_key }} - restore-keys: ${{ env.cache_test_restore_key }} - - name: Setup repository uses: actions/checkout@v3 with: diff --git a/.github/workflows/test-regression.yml b/.github/workflows/test-regression.yml index 0fdaf396fbb..b87cfb4bbbc 100644 --- a/.github/workflows/test-regression.yml +++ b/.github/workflows/test-regression.yml @@ -31,28 +31,6 @@ jobs: gcc-riscv64-unknown-elf pip3 install meson - - name: Setup Cache Metadata - id: cache_metadata - run: | - date=$(date +"%Y_%m_%d") - time=$(date +"%Y%m%d_%H%M%S_%N") - cache_test_restore_key=${{ matrix.test }}_${{ matrix.coverage }}_ - cache_test_key=${cache_test_restore_key}${time} - - echo "date=$date" | tee -a "$GITHUB_ENV" - echo "time=$time" | tee -a "$GITHUB_ENV" - echo "cache_test_restore_key=$cache_test_restore_key" | tee -a "$GITHUB_ENV" - echo "cache_test_key=$cache_test_key" | tee -a "$GITHUB_ENV" - - - name: Setup tests cache - uses: actions/cache@v3 - id: cache-test-setup - with: - path: | - ${{ env.CCACHE_DIR }} - key: ${{ env.cache_test_key }} - restore-keys: ${{ env.cache_test_restore_key }} - - name: Setup repository uses: actions/checkout@v3 with: diff --git a/.github/workflows/test-riscof.yml b/.github/workflows/test-riscof.yml index b452eb2fcca..f8cf767926f 100644 --- a/.github/workflows/test-riscof.yml +++ b/.github/workflows/test-riscof.yml @@ -25,42 +25,6 @@ jobs: git ccache python3-minimal python3-pip device-tree-compiler \ gcc-riscv64-unknown-elf build-essential ninja-build - - name: Setup Cache Metadata - id: cache_metadata - run: | - date=$(date +"%Y_%m_%d") - time=$(date +"%Y%m%d_%H%M%S_%N") - cache_test_restore_key=${{ matrix.test }}_${{ matrix.coverage }}_ - cache_test_key=${cache_test_restore_key}${time} - echo "date=$date" | tee -a "$GITHUB_ENV" - echo "time=$time" | tee -a "$GITHUB_ENV" - echo "cache_test_restore_key=$cache_test_restore_key" | tee -a "$GITHUB_ENV" - echo "cache_test_key=$cache_test_key" | tee -a "$GITHUB_ENV" - - - name: Setup tests cache - uses: actions/cache@v3 - id: cache-test-setup - with: - path: | - ${{ env.CCACHE_DIR }} - key: ${{ env.cache_test_key }} - restore-keys: ${{ env.cache_test_restore_key }} - - - name: Create Cache Timestamp - id: cache_timestamp - uses: nanzm/get-time-action@v1.1 - with: - format: 'YYYY-MM-DD-HH-mm-ss' - - - name: Setup cache - uses: actions/cache@v2 - timeout-minutes: 60 - continue-on-error: true - with: - path: "/opt/veer-el2/.cache/" - key: cache_riscof_tests_${{ steps.cache_timestamp.outputs.time }} - restore-keys: cache_riscof_tests_ - - name: Setup repository uses: actions/checkout@v2 with: diff --git a/.github/workflows/test-riscv-dv.yml b/.github/workflows/test-riscv-dv.yml index ff7a0b78dbf..3ce5addb1a1 100644 --- a/.github/workflows/test-riscv-dv.yml +++ b/.github/workflows/test-riscv-dv.yml @@ -148,21 +148,6 @@ jobs: gcc-riscv64-unknown-elf riscv64-unknown-elf-gcc --version - - name: Setup Cache Metadata - id: cache_metadata - run: | - date=$(date +"%Y_%m_%d") - time=$(date +"%Y%m%d_%H%M%S_%N") - cache_test_restore_key=${{ matrix.test }}_${{ matrix.coverage }}_ - cache_test_key=${cache_test_restore_key}${time} - cache_code=cache_${{ matrix.test }}_${{ matrix.version }} - - echo "date=$date" | tee -a "$GITHUB_ENV" - echo "time=$time" | tee -a "$GITHUB_ENV" - echo "cache_test_restore_key=$cache_test_restore_key" | tee -a "$GITHUB_ENV" - echo "cache_test_key=$cache_test_key" | tee -a "$GITHUB_ENV" - echo "cache_code=${cache_code}_${{ env.CACHE_HASH }}" | tee -a "$GITHUB_ENV" - - name: Setup repository uses: actions/checkout@v3 with: @@ -181,21 +166,6 @@ jobs: run: | pip install -r third_party/riscv-dv/requirements.txt - - name: Create Cache Timestamp - id: cache_timestamp - uses: nanzm/get-time-action@v2.0 - with: - format: 'YYYY-MM-DD-HH-mm-ss' - - - name: Setup cache - uses: actions/cache@v3 - timeout-minutes: 60 - continue-on-error: true - with: - path: "/opt/veer-el2/.cache/" - key: cache_tests_${{ steps.cache_timestamp.outputs.time }} - restore-keys: cache_tests_ - - name: Download Code Artifact uses: actions/download-artifact@v3 with: @@ -284,29 +254,6 @@ jobs: run: | pip3 install -r third_party/riscv-dv/requirements.txt - - name: Setup Cache Metadata - id: cache_metadata - run: | - date=$(date +"%Y_%m_%d") - time=$(date +"%Y%m%d_%H%M%S_%N") - cache_test_restore_key=${{ matrix.test }}_${{ matrix.coverage }}_ - cache_test_key=${cache_test_restore_key}${time} - cache_code=cache_${{ matrix.test }}_${{ matrix.version }} - - echo "date=$date" | tee -a "$GITHUB_ENV" - echo "time=$time" | tee -a "$GITHUB_ENV" - echo "cache_test_restore_key=$cache_test_restore_key" | tee -a "$GITHUB_ENV" - echo "cache_test_key=$cache_test_key" | tee -a "$GITHUB_ENV" - echo "cache_code=${cache_code}_${{ env.CACHE_HASH }}" | tee -a "$GITHUB_ENV" - - - name: Cache Code Restore - uses: actions/cache/restore@v3 - id: cache-code-restore - timeout-minutes: 60 - with: - path: tools/riscv-dv/work/test_${{ matrix.test }}/asm_test - key: ${{ env.cache_code }} - - name: Perform custom tests run: _secret_custom_run env: diff --git a/.github/workflows/test-uarch.yml b/.github/workflows/test-uarch.yml index 033c2c1b8c0..4b2ed5cf4e8 100644 --- a/.github/workflows/test-uarch.yml +++ b/.github/workflows/test-uarch.yml @@ -75,29 +75,6 @@ jobs: python3 -m pip install tools/SiteSpawner python3 -m pip install meson nox - - name: Setup Cache Metadata - id: cache_metadata - shell: bash - run: | - date=$(date +"%Y_%m_%d") - time=$(date +"%Y%m%d_%H%M%S_%N") - cache_test_restore_key=uarch_${{ matrix.test }}_${{ matrix.coverage }}_ - cache_test_key=${cache_test_restore_key}${time} - - echo "date=$date" | tee -a "$GITHUB_ENV" - echo "time=$time" | tee -a "$GITHUB_ENV" - echo "cache_test_restore_key=$cache_test_restore_key" | tee -a "$GITHUB_ENV" - echo "cache_test_key=$cache_test_key" | tee -a "$GITHUB_ENV" - - - name: Setup tests cache - uses: actions/cache@v3 - id: cache-test-setup - with: - path: | - ${{ env.CCACHE_DIR }} - key: ${{ env.cache_test_key }} - restore-keys: ${{ env.cache_test_restore_key }} - - name: Install prerequisities run: | sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \ diff --git a/.github/workflows/test-uvm.yml b/.github/workflows/test-uvm.yml index 5cd50c8125f..2bacc6882c6 100644 --- a/.github/workflows/test-uvm.yml +++ b/.github/workflows/test-uvm.yml @@ -17,28 +17,6 @@ jobs: with: submodules: recursive - - name: Setup Cache Metadata - id: cache_metadata - run: | - date=$(date +"%Y_%m_%d") - time=$(date +"%Y%m%d_%H%M%S_%N") - cache_test_restore_key=${{ matrix.test }}_${{ matrix.coverage }}_ - cache_test_key=${cache_test_restore_key}${time} - - echo "date=$date" | tee -a "$GITHUB_ENV" - echo "time=$time" | tee -a "$GITHUB_ENV" - echo "cache_test_restore_key=$cache_test_restore_key" | tee -a "$GITHUB_ENV" - echo "cache_test_key=$cache_test_key" | tee -a "$GITHUB_ENV" - - - name: Setup tests cache - uses: actions/cache@v3 - id: cache-test-setup - with: - path: | - ${{ env.CCACHE_DIR }} - key: ${{ env.cache_test_key }} - restore-keys: ${{ env.cache_test_restore_key }} - - name: Install prerequisities run: | sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \ diff --git a/.github/workflows/test-verification.yml b/.github/workflows/test-verification.yml index 0dd5bda5060..cc1f2ffbc52 100644 --- a/.github/workflows/test-verification.yml +++ b/.github/workflows/test-verification.yml @@ -28,29 +28,6 @@ jobs: source .venv/bin/activate python3 -m pip install tools/SiteSpawner - - name: Setup Cache Metadata - id: cache_metadata - shell: bash - run: | - date=$(date +"%Y_%m_%d") - time=$(date +"%Y%m%d_%H%M%S_%N") - cache_test_restore_key=${{ matrix.test }}_${{ matrix.coverage }}_ - cache_test_key=${cache_test_restore_key}${time} - - echo "date=$date" | tee -a "$GITHUB_ENV" - echo "time=$time" | tee -a "$GITHUB_ENV" - echo "cache_test_restore_key=$cache_test_restore_key" | tee -a "$GITHUB_ENV" - echo "cache_test_key=$cache_test_key" | tee -a "$GITHUB_ENV" - - - name: Setup tests cache - uses: actions/cache@v3 - id: cache-test-setup - with: - path: | - ${{ env.CCACHE_DIR }} - key: ${{ env.cache_test_key }} - restore-keys: ${{ env.cache_test_restore_key }} - - name: Install prerequisities run: | sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \