From 424350f446fe5965ca44de68acb4b8cd3441fe6a Mon Sep 17 00:00:00 2001 From: Melissa Jost <50555529+mkjost0@users.noreply.github.com> Date: Tue, 18 Jul 2023 10:27:32 -0700 Subject: [PATCH] misc: Update CI test workflow (#88) * misc: Update CI test workflow This updates our CI tests to clean the runners after every workflow, to make sure no hanging files cause problems for future tests Change-Id: Iff6a702bbc2e86a31e4c18ef9764a3cfd3af2f7d * misc: Update scheduled workflows to clean runners This updates our scheduled tests to clean up any remaining files after running tests to avoid anything hanging for future runs. Change-Id: Icfdd5a0559337ad0e62d108a47f4e5a12e0db677 * misc: Fix spacing in workflow files Some commands were incorrectly spaced Change-Id: Id340dc77bfb5c5d579b5f1e5b3ddeabea4a35ea8 --- .github/workflows/ci-tests.yaml | 5 + .github/workflows/daily-tests.yaml | 139 +++++++++++++++++++++------- .github/workflows/weekly-tests.yaml | 20 ++++ 3 files changed, 132 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml index c184e482f1..5e11903a0f 100644 --- a/.github/workflows/ci-tests.yaml +++ b/.github/workflows/ci-tests.yaml @@ -102,4 +102,9 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." diff --git a/.github/workflows/daily-tests.yaml b/.github/workflows/daily-tests.yaml index 5fab058b79..a7d92a2ada 100644 --- a/.github/workflows/daily-tests.yaml +++ b/.github/workflows/daily-tests.yaml @@ -290,6 +290,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-long-fs: @@ -330,6 +335,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-long-gem5_library_example_tests: @@ -370,6 +380,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-long-gpu: @@ -405,6 +420,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-long-insttest_se: @@ -440,36 +460,46 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." # kvm tests don't work on github actions - # testlib-long-kvm-fork-tests: - # runs-on: [self-hosted, linux, x64, run] - # container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest - # needs: build-gem5 - # timeout-minutes: 1440 # 24 hours - # steps: - # - uses: actions/checkout@v3 - # with: - # # Scheduled workflows run on the default branch by default. We - # # therefore need to explicitly checkout the develop branch. - # ref: develop - # - uses: actions/download-artifact@v3 - # with: - # name: ${{ env.artifact-name }} - # path: build/ALL/gem5.opt - # - run: chmod u+x build/ALL/gem5.opt - # - name: long kvm-fork-tests - # working-directory: ${{ github.workspace }}/tests - # run: ./main.py run gem5/kvm-fork-tests --length=long --skip-build -vv -t $(nproc) - # - uses: actions/upload-artifact@v3 - # env: - # MY_STEP_VAR: ${{github.job}}_COMMIT.${{github.sha}}_RUN.${{github.run_id}}_ATTEMPT.${{github.run_attempt}} - # with: - # name: ${{ env.MY_STEP_VAR }} - # path: tests/testing-results - # retention-days: 7 - # - run: echo "This job's status is ${{ job.status }}." +# testlib-long-kvm-fork-tests: +# runs-on: [self-hosted, linux, x64, run] +# container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +# needs: build-gem5 +# timeout-minutes: 1440 # 24 hours +# steps: +# - uses: actions/checkout@v3 +# with: +# # Scheduled workflows run on the default branch by default. We +# # therefore need to explicitly checkout the develop branch. +# ref: develop +# - uses: actions/download-artifact@v3 +# with: +# name: ${{ env.artifact-name }} +# path: build/ALL/gem5.opt +# - run: chmod u+x build/ALL/gem5.opt +# - name: long kvm-fork-tests +# working-directory: ${{ github.workspace }}/tests +# run: ./main.py run gem5/kvm-fork-tests --length=long --skip-build -vv -t $(nproc) +# - uses: actions/upload-artifact@v3 +# env: +# MY_STEP_VAR: ${{github.job}}_COMMIT.${{github.sha}}_RUN.${{github.run_id}}_ATTEMPT.${{github.run_attempt}} +# with: +# name: ${{ env.MY_STEP_VAR }} +# path: tests/testing-results +# retention-days: 7 +# - name: Clean runner +# run: +# rm -rf ./* || true +# rm -rf ./.??* || true +# rm -rf ~/.cache || true +# - run: echo "This job's status is ${{ job.status }}." # testlib-long-kvm-switch-tests: # runs-on: [self-hosted, linux, x64, run] @@ -477,11 +507,11 @@ jobs: # needs: build-gem5 # timeout-minutes: 1440 # 24 hours # steps: - # - uses: actions/checkout@v3 - # with: - # # Scheduled workflows run on the default branch by default. We - # # therefore need to explicitly checkout the develop branch. - # ref: develop + # - uses: actions/checkout@v3 + # with: + # # Scheduled workflows run on the default branch by default. We + # # therefore need to explicitly checkout the develop branch. + # ref: develop # - uses: actions/download-artifact@v3 # with: # name: ${{ env.artifact-name }} @@ -497,6 +527,11 @@ jobs: # name: ${{ env.MY_STEP_VAR }} # path: tests/testing-results # retention-days: 7 + # - name: Clean runner + # run: + # rm -rf ./* || true + # rm -rf ./.??* || true + # rm -rf ~/.cache || true # - run: echo "This job's status is ${{ job.status }}." testlib-long-learning_gem5: @@ -532,6 +567,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-long-m5_threads: @@ -567,6 +607,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-long-memory: @@ -602,6 +647,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-long-multi_isa: @@ -647,6 +697,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-long-replacement-policies: @@ -682,6 +737,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-long-riscv-boot-tests: @@ -717,6 +777,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-long-stdlib: @@ -762,6 +827,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-long-x86-boot-tests: @@ -797,6 +867,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." # This runs the SST-gem5 integration compilation and tests it with diff --git a/.github/workflows/weekly-tests.yaml b/.github/workflows/weekly-tests.yaml index 4c3f6b55bc..dd81555f00 100644 --- a/.github/workflows/weekly-tests.yaml +++ b/.github/workflows/weekly-tests.yaml @@ -67,6 +67,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." @@ -103,6 +108,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-very-long-parsec-benchmarks: @@ -138,6 +148,11 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}." testlib-very-long-x86-boot-tests: @@ -173,4 +188,9 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: output.zip retention-days: 7 + - name: Clean runner + run: + rm -rf ./* || true + rm -rf ./.??* || true + rm -rf ~/.cache || true - run: echo "This job's status is ${{ job.status }}."