Skip to content

Commit 94fc6f2

Browse files
Update Build_Examples.yml (#185)
* Update Build_Examples.yml * Cleaning before checkout. * Ignoring errors while cleaning. * Continue on error. * Deleting workspace if clean fails. * Fixing error handling. * Entering the msdk repo directory. * printing directories. * Not deleting entire msdk subdir. * Applying updated clean to all workflows. Co-authored-by: Kevin Gillespie <[email protected]>
1 parent d883bd6 commit 94fc6f2

File tree

6 files changed

+110
-1
lines changed

6 files changed

+110
-1
lines changed

.github/workflows/BLE_Examples_Test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,27 @@ jobs:
1616
build:
1717
# The type of runner that the job will run on
1818
runs-on: [ self-hosted, btm-ci ]
19+
1920
# Steps represent a sequence of tasks that will be executed as part of the job
2021
steps:
22+
- name: Clean
23+
continue-on-error: true
24+
run: |
25+
# Remove local modifications
26+
set +e
27+
28+
# Attempt to clean the repo
29+
git scorch
30+
retval=$?
31+
32+
# Remove everything if this fails
33+
if [[ $retval -ne 0 ]]
34+
then
35+
rm -rf *
36+
fi
37+
38+
set -e
39+
2140
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2241
- uses: actions/checkout@v3
2342
with:

.github/workflows/Build_Examples.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,25 @@ jobs:
2020
- self-hosted
2121
- software
2222

23-
# Steps represent a sequence of tasks that will be executed as part of the job
2423
steps:
24+
- name: Clean
25+
continue-on-error: true
26+
run: |
27+
# Remove local modifications
28+
set +e
29+
30+
# Attempt to clean the repo
31+
git scorch
32+
retval=$?
33+
34+
# Remove everything if this fails
35+
if [[ $retval -ne 0 ]]
36+
then
37+
rm -rf *
38+
fi
39+
40+
set -e
41+
2542
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2643
- uses: actions/checkout@v3
2744
with:

.github/workflows/clang-format-check.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,24 @@ jobs:
2222

2323
# Steps represent a sequence of tasks that will be executed as part of the job
2424
steps:
25+
- name: Clean
26+
continue-on-error: true
27+
run: |
28+
# Remove local modifications
29+
set +e
30+
31+
# Attempt to clean the repo
32+
git scorch
33+
retval=$?
34+
35+
# Remove everything if this fails
36+
if [[ $retval -ne 0 ]]
37+
then
38+
rm -rf *
39+
fi
40+
41+
set -e
42+
2543
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2644
- uses: actions/checkout@v3
2745
with:

.github/workflows/clang-format-run-pr.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,25 @@ jobs:
1717
- software
1818

1919
steps:
20+
21+
- name: Clean
22+
continue-on-error: true
23+
run: |
24+
# Remove local modifications
25+
set +e
26+
27+
# Attempt to clean the repo
28+
git scorch
29+
retval=$?
30+
31+
# Remove everything if this fails
32+
if [[ $retval -ne 0 ]]
33+
then
34+
rm -rf *
35+
fi
36+
37+
set -e
38+
2039
- uses: actions/github-script@v3
2140
id: get-pr
2241
with:

.github/workflows/clang-format-run.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,24 @@ jobs:
1919
- software
2020

2121
steps:
22+
- name: Clean
23+
continue-on-error: true
24+
run: |
25+
# Remove local modifications
26+
set +e
27+
28+
# Attempt to clean the repo
29+
git scorch
30+
retval=$?
31+
32+
# Remove everything if this fails
33+
if [[ $retval -ne 0 ]]
34+
then
35+
rm -rf *
36+
fi
37+
38+
set -e
39+
2240
- uses: actions/checkout@v3
2341
with:
2442
submodules: false

.github/workflows/linter.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,24 @@ jobs:
3939
# Load all steps #
4040
##################
4141
steps:
42+
- name: Clean
43+
continue-on-error: true
44+
run: |
45+
# Remove local modifications
46+
set +e
47+
48+
# Attempt to clean the repo
49+
git scorch
50+
retval=$?
51+
52+
# Remove everything if this fails
53+
if [[ $retval -ne 0 ]]
54+
then
55+
rm -rf *
56+
fi
57+
58+
set -e
59+
4260
##########################
4361
# Checkout the code base #
4462
##########################

0 commit comments

Comments
 (0)