Skip to content

Commit 1e1eef7

Browse files
Post-action cleanup
1 parent d3c65a8 commit 1e1eef7

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

.github/cleanup.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
set -o errexit -o nounset -o xtrace -o pipefail
3+
shopt -s inherit_errexit nullglob dotglob
4+
5+
rm -rf "${HOME:?}"/* "${GITHUB_WORKSPACE:?}"/*
6+
7+
if test "${RUNNER_DEBUG:-0}" != '1'; then
8+
set +o xtrace
9+
fi

.github/workflows/build.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
with:
4343
name: gfruit-image
4444
path: "./buck-out/v2/gen/root/**/*"
45+
- name: Cleanup
46+
run: bash .github/cleanup.sh
4547

4648
cosmo_seq:
4749
needs: changes
@@ -63,6 +65,8 @@ jobs:
6365
with:
6466
name: cosmo-seq-image
6567
path: "./buck-out/v2/gen/root/**/*"
68+
- name: Cleanup
69+
run: bash .github/cleanup.sh
6670

6771
cosmo_hp:
6872
needs: changes
@@ -84,6 +88,8 @@ jobs:
8488
with:
8589
name: cosmo-hp-image
8690
path: "./buck-out/v2/gen/root/**/*"
91+
- name: Cleanup
92+
run: bash .github/cleanup.sh
8793

8894
bsv-streams:
8995
needs: changes
@@ -113,4 +119,6 @@ jobs:
113119
- uses: actions/upload-artifact@v4
114120
with:
115121
name: bsv-images
116-
path: "./build/latest/**/*"
122+
path: "./build/latest/**/*"
123+
- name: Cleanup
124+
run: bash .github/cleanup.sh

.github/workflows/simulation.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
cobble: ${{ steps.filter.outputs.cobble }}
1212
buck2: ${{ steps.filter.outputs.buck2 }}
1313
steps:
14+
- uses: TooMuch4U/actions-clean@v2.1
1415
- uses: actions/checkout@v4
1516
with:
1617
submodules: 'true'
@@ -35,6 +36,8 @@ jobs:
3536
run: echo "~/.cargo/bin" >> "$GITHUB_PATH"
3637
- name: Run VUnit tests
3738
run: set -o pipefail; buck2 bxl //tools/vunit-sims.bxl:vunit_sim_gen | while IFS= read -r line; do eval "$line" ; done
39+
- name: Cleanup
40+
run: bash .github/cleanup.sh
3841

3942
bsv-sim:
4043
needs: changes
@@ -60,4 +63,6 @@ jobs:
6063
run: ./cobble bluesim_test "//.*Test.*"
6164
working-directory: ./build
6265
- name: backup build-dir
63-
run: cp -R ./build /tmp/cobble_build_bkup
66+
run: cp -R ./build /tmp/cobble_build_bkup
67+
- name: Cleanup
68+
run: bash .github/cleanup.sh

0 commit comments

Comments
 (0)