Skip to content

Commit f0643cf

Browse files
Post-action cleanup
1 parent d3c65a8 commit f0643cf

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-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

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
run: echo "~/.cargo/bin" >> "$GITHUB_PATH"
3636
- name: Run VUnit tests
3737
run: set -o pipefail; buck2 bxl //tools/vunit-sims.bxl:vunit_sim_gen | while IFS= read -r line; do eval "$line" ; done
38+
- name: Cleanup
39+
run: bash .github/cleanup.sh
3840

3941
bsv-sim:
4042
needs: changes
@@ -60,4 +62,6 @@ jobs:
6062
run: ./cobble bluesim_test "//.*Test.*"
6163
working-directory: ./build
6264
- name: backup build-dir
63-
run: cp -R ./build /tmp/cobble_build_bkup
65+
run: cp -R ./build /tmp/cobble_build_bkup
66+
- name: Cleanup
67+
run: bash .github/cleanup.sh

0 commit comments

Comments
 (0)