Skip to content

Commit 4a4f19f

Browse files
committed
wip: gh action
1 parent 3b33a51 commit 4a4f19f

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ jobs:
212212
library_name="$(basename $example | tr '-' '_').dll"
213213
fi
214214
215-
cp build/examples-native/$example_name/$bin_path/$library_name artifacts/shared_libs/lib$(basename $example | tr '-' '_').so
215+
cp build/examples-native/$example_name/$bin_path/$library_name artifacts/shared_libs
216216
done
217217
218218
- name: Upload Example Binaries
@@ -285,14 +285,24 @@ jobs:
285285
cp $test tests/$test_name/bin/$test_name
286286
done
287287
288-
if [ "${{ runner.os }}" = "Linux" ]; then
289-
export LD_LIBRARY_PATH="$(realpath artifacts/shared_libs):$LD_LIBRARY_PATH"
290-
elif [ "${{ runner.os }}" = "Windows" ]; then
291-
export PATH="$(realpath artifacts/shared_libs):$PATH"
292-
else
293-
echo "Unknown runner!"
294-
exit 1
295-
fi
288+
for example in artifacts/shared_libs/*; do
289+
example_name="$(basename $example | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/^lib//' | tr '_' '-')"
290+
if [ "${{ runner.os }}" = "Linux" ]; then
291+
bin_path="."
292+
elif [ "${{ runner.os }}" = "Windows" ]; then
293+
bin_path="Debug"
294+
fi
295+
mkdir -p examples-native/$example_name/build/$bin_path
296+
cp $example examples-native/$example_name/build/$bin_path
297+
echo "----"
298+
ls examples-native
299+
echo "----"
300+
ls examples-native/$example_name
301+
echo "----"
302+
ls examples-native/$example_name/build
303+
echo "----"
304+
ls examples-native/$example_name/build/$bin_path
305+
done
296306
297307
pushd examples-native
298308
renode-test -t all_examples.yaml

0 commit comments

Comments
 (0)