Skip to content

Commit 45edbb5

Browse files
committed
step
1 parent 6dc7606 commit 45edbb5

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.github/workflows/package_core.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ jobs:
199199
with:
200200
fetch-depth: 0
201201
persist-credentials: false
202+
sparse-checkout: |
203+
extra/ci_test_list.sh
202204
203205
- uses: actions/download-artifact@v4
204206
with:

extra/ci_test_list.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@
44
# in GitHub Actions environment variables. It also generates a list of all example
55
# .ino files, excluding those specified in a variant's skip list.
66

7-
[ -z "$GITHUB_ENV" ] && { echo "GITHUB_ENV is not set."; exit 1; }
8-
[ ! -d $1 ] && { echo "Invalid variant specified."; exit 1; }
7+
if [ -z "$GITHUB_ENV" ] ; then
8+
echo "Not in a Github CI run, cannot proceed."
9+
exit 0
10+
fi
11+
12+
if [ -z "$1" ] || [ ! -d variants/$1 ] ; then
13+
echo "Invalid variant '$1' specified."
14+
exit 1
15+
fi
916

10-
VARIANT=$1
17+
VARIANT_DIR="variants/$1"
1118
shift
1219

1320
echo "ALL_LIBRARIES<<EOF" >> $GITHUB_ENV
@@ -21,8 +28,8 @@ echo "EOF" >> $GITHUB_ENV
2128

2229
ALL_TESTS=$(mktemp)
2330
find "$@" ArduinoCore-zephyr/libraries/ -name *.ino | sed -e 's/^\.\///' > $ALL_TESTS
24-
if [ -f $VARIANT/skip_these_examples.txt ] ; then
25-
cat $VARIANT/skip_these_examples.txt | sed -e 's/\s*#.*//' -e '/^\s*$/d' | while read -r pattern; do
31+
if [ -f $VARIANT_DIR/skip_these_examples.txt ] ; then
32+
cat $VARIANT_DIR/skip_these_examples.txt | sed -e 's/\s*#.*//' -e '/^\s*$/d' | while read -r pattern; do
2633
sed -i -e "\\|^\\(ArduinoCore-zephyr/\\)\\?${pattern}|d" $ALL_TESTS
2734
done
2835
fi

0 commit comments

Comments
 (0)