Skip to content

Commit 7bfb41c

Browse files
committed
wip: gh action
1 parent 3b33a51 commit 7bfb41c

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

.github/workflows/test.yml

Lines changed: 31 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
@@ -305,3 +315,15 @@ jobs:
305315
pushd tests
306316
renode-test -t all_tests.yaml
307317
popd
318+
- name: Upload logs on failure
319+
320+
- uses: actions/upload-artifact@v4
321+
if: failure()
322+
with:
323+
name: failure-artifacts
324+
path: |
325+
examples-native/logs
326+
examples-native/robot_output.xml
327+
examples-native/log.html
328+
examples-native/report.html
329+
if-no-files-found: ignore

examples-native/timesync-native/renode/timesync.resc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ showAnalyzer usart1 Antmicro.Renode.Analyzers.LoggingUartAnalyzer
1111
sysbus LoadELF $bin
1212
sysbus LogPeripheralAccess systemc true
1313
sysbus.systemc SimulationFilePathLinux $ORIGIN/../build/libtimesync_native.so
14-
sysbus.systemc SimulationFilePathWindows @ORIGIN/../build/Debug/timesync_native.dll
14+
sysbus.systemc SimulationFilePathWindows $ORIGIN/../build/Debug/timesync_native.dll

0 commit comments

Comments
 (0)