Skip to content

Commit

Permalink
misc: Update where runners are cleaned in workflow files (#163)
Browse files Browse the repository at this point in the history
This moves the clean runner step in our yaml files to be at the
beginning of a job, so that if a runner goes down and is unable to clean
at the end, we can ensure that
subsequent jobs still run as expected.

Change-Id: Iba52694aefe03c550ad0bfdb5b5f938305273988
  • Loading branch information
BobbyRBruce authored Aug 8, 2023
2 parents faed0d3 + 8b6912f commit 572c6bc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ jobs:
needs: [pre-commit, build-gem5, check-for-change-id]
timeout-minutes: 360 # 6 hours
steps:
- name: Clean runner
run:
rm -rf ./* || true
rm -rf ./.??* || true
rm -rf ~/.cache || true
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
Expand All @@ -102,10 +107,4 @@ jobs:
name: ${{ env.MY_STEP_VAR }}
path: output.zip
retention-days: 7
- name: Clean runner
if: success() || failure()
run:
rm -rf ./* || true
rm -rf ./.??* || true
rm -rf ~/.cache || true
- run: echo "This job's status is ${{ job.status }}."
22 changes: 10 additions & 12 deletions .github/workflows/daily-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ jobs:
needs: [name-artifacts, build-gem5]
timeout-minutes: 1440 # 24 hours for entire matrix to run
steps:
- name: Clean runner
run:
rm -rf ./* || true
rm -rf ./.??* || true
rm -rf ~/.cache || true
- uses: actions/checkout@v3
with:
# Scheduled workflows run on the default branch by default. We
Expand Down Expand Up @@ -152,12 +157,6 @@ jobs:
name: ${{ env.MY_STEP_VAR }}
path: output.zip
retention-days: 7
- name: Clean runner
if: success() || failure()
run:
rm -rf ./* || true
rm -rf ./.??* || true
rm -rf ~/.cache || true
- run: echo "This job's status is ${{ job.status }}."

# split library example tests into runs based on Suite UID
Expand All @@ -171,6 +170,11 @@ jobs:
needs: [name-artifacts, build-gem5]
timeout-minutes: 1440 # 24 hours
steps:
- name: Clean runner
run:
rm -rf ./* || true
rm -rf ./.??* || true
rm -rf ~/.cache || true
- uses: actions/checkout@v3
with:
# Scheduled workflows run on the default branch by default. We
Expand Down Expand Up @@ -198,12 +202,6 @@ jobs:
name: ${{ env.MY_STEP_VAR }}
path: output.zip
retention-days: 7
- name: Clean runner
if: success() || failure()
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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/weekly-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ jobs:
needs: [build-gem5]
timeout-minutes: 4320 # 3 days
steps:
- name: Clean runner
run:
rm -rf ./* || true
rm -rf ./.??* || true
rm -rf ~/.cache || true
- uses: actions/checkout@v3
with:
# Scheduled workflows run on the default branch by default. We
Expand Down Expand Up @@ -70,9 +75,4 @@ 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 }}."

0 comments on commit 572c6bc

Please sign in to comment.